»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
masak | 'night, #perl6 | 00:15 | |
TimToady | 'night | ||
quietfanatic | nught | 00:16 | |
00:21
skids joined
|
|||
jnthn | 'night o/ | 00:32 | |
00:50
replore joined
|
|||
clkao | /wnWW/WIN21 | 00:52 | |
01:00
zhutingting joined
01:10
Guest65764 left
01:21
fgomez joined
01:22
drbean left
01:25
drbean joined
01:35
zhutingting left,
replore left
02:03
orafu left
02:04
orafu joined
02:09
replore joined
02:16
tokuhiro_ left
02:32
replore left
02:37
Psyche^ joined
02:41
Patterner left,
Psyche^ is now known as Patterner
|
|||
dalek | ast: e8c9ac5 | coke++ | S10-packages/scope.t: pugs fudge |
02:55 | |
03:00
xinming left
|
|||
takadonet | good job coke :) | 03:00 | |
03:02
xinming joined
03:19
crab2313 joined
03:24
jaldhar joined
|
|||
[Coke] | takd? | 03:25 | |
takadonet | yes? | ||
03:38
jaldhar left
03:41
jaldhar joined
|
|||
TimToady | nr: say ['a','b'] X~ 1 .. 3; | 04:00 | |
p6eval | rakudo f23a45: OUTPUT«a1 a2 a3 b1 b2 b3» | ||
..niecza v19-15-g051783d: OUTPUT«a b1 a b2 a b3» | |||
TimToady | niecza++ | ||
rakudobug | |||
nr: say ['a','b'],() X~ 1 .. 3; | 04:03 | ||
p6eval | rakudo f23a45, niecza v19-15-g051783d: OUTPUT«a b1 a b2 a b3» | ||
TimToady | nr: say ['a','b'] Z~ 1 .. 3; | ||
p6eval | rakudo f23a45: OUTPUT«a1 b2» | ||
..niecza v19-15-g051783d: OUTPUT«a b1» | |||
TimToady | same deal, rakudobug | ||
04:04
ironcamel joined
|
|||
TimToady | nr: my $a = ['a','b']; say $a X~ 1..3 | 04:04 | |
p6eval | rakudo f23a45: OUTPUT«a1 a2 a3 b1 b2 b3» | 04:05 | |
..niecza v19-15-g051783d: OUTPUT«a b1 a b2 a b3» | |||
TimToady | same deal | ||
TimToady is kinda surprised we haven't noticed this before | 04:06 | ||
nr: say 1..3 X~ ['a','b'] | 04:09 | ||
p6eval | rakudo f23a45: OUTPUT«1a 1b 2a 2b 3a 3b» | ||
..niecza v19-15-g051783d: OUTPUT«1a b 2a b 3a b» | |||
TimToady | nr: say ([1,2] X [3,4]).perl | 04:13 | |
p6eval | niecza v19-15-g051783d: OUTPUT«([1, 2], [3, 4]).list» | ||
..rakudo f23a45: OUTPUT«((ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),)).list» | |||
TimToady | seems to be a generic problem with list infixes not binding both sides like slurpy lists | 04:14 | |
TimToady suspects this may be another manifestation of the problem that pmichaud++ is already working on | 04:15 | ||
04:25
benabik left
04:31
benabik joined
04:37
quietfanatic left
04:39
provider joined,
provider left
04:42
crab2313 left
04:45
kaare_ joined
04:47
tokuhiro_ joined
04:58
skids left
05:37
adu joined
|
|||
moritz | \o | 05:43 | |
sorear | o/ | 05:49 | |
TimToady | backlogged! | 06:42 | |
'course, now I'm about to go to bed and earn some more backlog... | |||
moritz | sleep well, dream of short backlogs | 06:52 | |
TimToady | thanks, o/ | ||
06:56
am0c joined
|
|||
sjohnson | hi | 07:23 | |
07:25
kaxing joined
|
|||
dalek | ar: 12b921c | pmichaud++ | skel/tools/build/ (3 files): Refactor .msi building process a fair bit. |
07:39 | |
ar: a280cf5 | pmichaud++ | skel/tools/build/star-product.wxs: Change INSTALLLOCATION -> INSTALLROOT |
|||
ar: f2057b0 | pmichaud++ | skel/tools/build/Makefile.in: Fix directory argument for building source .wxs file. |
|||
07:56
GlitchMr joined
08:01
benabik left
|
|||
pmichaud | I'm about to publish the 2012.07 star release; anything I should look at or check before doing so? | 08:04 | |
(bbi10) | 08:05 | ||
08:10
sergot joined
|
|||
sergot | hi o/ | 08:10 | |
08:12
cognominal_ joined,
plobsing left
08:14
cognominal left
|
|||
pmichaud | back again | 08:23 | |
moritz | \o sergot, pmichaud | ||
pmichaud | okay, time to upload the release files | 08:25 | |
moritz | pmichaud: does the MSI support installing to arbitrary paths? | 08:26 | |
pmichaud | moritz: no. | ||
(because rakudo/parrot can't support it) | 08:27 | ||
moritz | ok | ||
thought so :( | |||
pmichaud | indeed, the msi would've likely been a bit easier if we could've done that | 08:28 | |
(easier to build, that is) | |||
moritz | another reason to investigate alternative backends | 08:40 | |
pmichaud | release published, announcements made to rakudo.org, p6c, p6u, and parrot-dev | ||
moritz | pmichaud++ | 08:41 | |
pmichaud: do you think it would be beneficial to upload a binary linux build? | |||
pmichaud | I think if we do that, we'd want to package it as a .deb and/or .rpm | 08:42 | |
felher | If i want to have a enumeration of JAN/FEB/... to Date.new("2012-01-01"), is this how i'm supposed to to it: | ||
r: enum Months (JAN => BEGIN {Date.new("2012-01-01")}); JAN.year.say; | |||
p6eval | rakudo f23a45: OUTPUT«2012» | ||
felher | pmichaud++ :) | ||
*to do it | |||
moritz | r: enum Months (Jan => Date.new("2012-01-01"), Feb => Date.new("2012-02-01")); | 08:43 | |
p6eval | rakudo f23a45: OUTPUT«===SORRY!===Enumeration value must be known at compile timeat /tmp/9UjunzXE62:1» | ||
moritz | I guess I should fix that | ||
r: try eval 'enum Months (Jan => Date.new("2012-01-01");'; say $!.WHAT | |||
p6eval | rakudo f23a45: OUTPUT«X::AdHoc()» | ||
pmichaud | so, I've been considering publishing our own .deb and/or .rpm distros... but wanted to get the windows world handled first. | 08:44 | |
we'd also have to figure out how we'd want to coexist with the existing debian packaging, if at all. | |||
moritz | which is why I'd simply go with tar'ing up /opt/rakudo-star-2012.07 | ||
pmichaud | I fear that if we did that people would then say "...why aren't you providing it as a .deb/.rpm ?" | 08:45 | |
moritz | then we can answer "because we haven't figured it out yet" | 08:46 | |
pmichaud | oh, but someone's figured it out, because rakudo .debs are already available. | ||
they just tend to lag our release cycle by a lot | 08:47 | ||
moritz | well, I'm trying to be pragmatic | 08:49 | |
pmichaud | sure | ||
moritz | some people have trouble building rakudo due to memory requirements | ||
and we're not currently in a position to provide polished .deb/.rpm packages | 08:50 | ||
pmichaud | /opt/rakudo-star-2012.07 would include the parrot binaries? | ||
moritz | hence my proposal to give them *something* | ||
pmichaud: yes | |||
pmichaud | I'll think about it a bit more. | 08:52 | |
masak | pmichaud++ # R* | ||
pmichaud | having done the .msi stuff, and having done a few .debs and .rpms before (for other packages, not rakudo), I suspect we can come up with a way to handle .deb/.rpm without too much difficulty. | ||
so, let's revisit it for august (perhaps around yapc::eu) | 08:53 | ||
masak | (morning, #perl6) | ||
pmichaud | since none of us are apparently giving talks, we may have time to work on other things :-/ | ||
masak | pmichaud: is it now final that none of us are giving talks? | ||
if so, that sucks. | |||
pmichaud | masak: I've not heard anything final, no. | 08:54 | |
masak writes to the organizers with some nice but very precise wordings | |||
pmichaud | but the longer things go without hearing anything changing, the less likely I think it is | ||
moritz | masak: the last response from the organizers was that they'll try to figure out how to enable more talks | ||
masak: please do, and set me CC | |||
masak | will do. | ||
will cc pmichaud and jnthn too. | |||
moritz | you might also mention that people in here have pondered not going to YAPC::EU due to absense of Perl 6 talks | 08:55 | |
and I'm not talking about the core hackers here | |||
pmichaud | I can entirely understand that it may have been a statistical or logistical fluke that caused us to end up with no talks there. And I know that my talk proposal wasn't very solid or concrete. | 08:56 | |
I can still update it and make it more solid or concrete; but things got a little hectic here as the talk deadline approached. | 08:57 | ||
masak | pmichaud: "Currently it seems as if some talk votes were counted differently from the expectations." blogs.perl.org/users/moritz/2012/07...ent-179251 | ||
pmichaud | masak: yes, I saw that note. I'm not exactly sure what that meant. :-) | ||
masak | pmichaud: i.e. "we screwed up and accepted some talks before the ones we should've accepted, and now we can't take it back and we have a problem" | 08:58 | |
pmichaud | well, 49 talks seems like a fairly smallish number relative to yapc's past | 08:59 | |
(too) | |||
I'm guessing they only have three tracks/rooms | |||
masak | email sent. | 09:10 | |
moritz | masak++ | ||
I haven't reached my CC yet, but email isn't real-time | |||
s/reached/received/ | |||
moritz should learn English one of these days | |||
huf | did i wake up in another language again? :) | 09:11 | |
masak | oops, sent to questions@yapceu2012, not [email@hidden.address] | 09:12 | |
re-sending, re-cc:ing. sorry 'bout that. | |||
pmichaud | fwiw, yapc::na will be in Austin next year, and here's the first topic request that came on their mailing list: github.com/rakudo/star/blob/master...ce/2012.07 | 09:15 | |
Essentially, "Anyone have an idea on the topics or panel? Would love to see Perl 6 | |||
discussions." | |||
oops, wrong url | |||
mail.pm.org/pipermail/austin/2012-J...01807.html | |||
anyway, I should get some sleep here -- bbiaw | 09:16 | ||
dalek | ast: 17c51d7 | moritz++ | S32-exceptions/misc.t: remove an exception test where we do not strictly need to die |
09:21 | |
kudo/nom: 7d101ef | moritz++ | src/core/List.pm: simplfy List.classify, make it return a Hash as per spec |
|||
kudo/nom: b87659a | moritz++ | src/Perl6/Actions.pm: compile-time evaluate enums instead of complaining that they are not known at compile time |
09:22 | ||
moritz | felher: ok, no more need for BEGIN magic in enums :-) | ||
Coleoid | pmichaud++ # MSIs help me tempt friends... | 09:24 | |
felher | moritz++ # thanks a lot :) | 09:25 | |
jnthn | morning, #perl6 | 09:29 | |
moritz | \o jnthn | ||
09:30
hoelzro|away is now known as hoelzro
|
|||
jnthn | pmichaud++ # Rakudo release | 09:31 | |
*Star | |||
hoelzro | morning perl6 folk | ||
oh hey, release! | |||
hooray | |||
pmichaud++ | 09:32 | ||
masak: when you built that R* bundle for me, you just used the pristine R* 2012.06 archive, right? Did you provide any special options to Parrot's Configure.PL? | 09:33 | ||
masak | no. | 09:36 | |
I did not configure Parrot specifically. just R* itself. | |||
au ponders making a rakuto-star-2012.07.pkg | 09:42 | ||
hoelzro | masak: any special options to Configure.PL there? other than --prefix? | ||
I ask because when I compile Parrot myself, I get the crash | 09:43 | ||
but when I install your parrot and compile everything else, it works fine | |||
I just want a working Rakudo =( | |||
09:47
MayDaniel joined
|
|||
masak | I did `$ perl Configure.pl --gen-parrot`, just like the README says. actually, I just followed the README the whole time. | 09:49 | |
moritz | star: say 1 | 09:50 | |
hoelzro | hmm | ||
p6eval | star 2012.06: OUTPUT«1» | ||
hoelzro | why does it crash for me?! | 09:51 | |
even the Parrot from Arch's repo causes the crash | |||
moritz | star: say 1 | ||
p6eval | star 2012.07: OUTPUT«1» | ||
09:52
whiteknight joined,
whiteknight is now known as Guest74836
10:00
cognominal_ left
10:06
Patterner left
10:07
tokuhiro_ left
|
|||
hoelzro | wtf, now it works?! | 10:15 | |
10:18
spider-mario joined
10:20
crab2313 joined
|
|||
masak | oh, good. | 10:23 | |
10:24
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
masak | lol, I blogged! \o/ strangelyconsistent.org/blog/july-2...-and-dying | 10:25 | |
hoelzro | masak: I think I figured out the issue on my Arch box =) | 10:26 | |
we'll know in about 20 minutes | |||
10:28
cognominal joined
|
|||
masak | people, this is an excellent opportunity to find bugs in the game -- after I finished the whole storyline, but before I've started general cleanup and refactoring. | 10:28 | |
download the game at github.com/masak/crypt/ and start finding deficiencies. I wrote it, so I can guarantee that there are a few! | 10:29 | ||
hoelzro goes to try it | 10:30 | ||
masak | \o/ | ||
hoelzro | masak: I noticed it uses the executable 'nom'; can I run this with R*? | 10:31 | |
10:33
benabik joined
|
|||
moritz | masak: is it normal that the game takes ages to load? | 10:35 | |
hoelzro | is pmichaud still around? or past his bed time =) | 10:36 | |
moritz | 11:16 < pmichaud> anyway, I should get some sleep here -- bbiaw | ||
hoelzro | moritz: thanks | ||
masak | moritz: yes. | ||
hoelzro | what time zone is pmichaud in, anyway? | ||
masak | moritz: this will get lots better once I break the 3kLOC file into modules. | 10:37 | |
hoelzro: you can. I have a /usr/bin/nom on my system, but it's running latest Rakudo. | |||
hoelzro | masak: ok, cool | ||
masak | er, /usr/local/bin/nom | 10:38 | |
10:38
crab2313 left
|
|||
hoelzro | should I just symlink it to $(which prel6)? | 10:38 | |
s/re/er/ | |||
moritz | hoelzro: you can just run perl6 bin/crypt | ||
hoelzro | oh, good point =) | ||
masak | one of the talk proposals I submitted for YAPC::EU is about how I wrote this game and what I learned writing it. | 10:40 | |
hoelzro | I was hoping to do the same with my chat bot | 10:42 | |
moritz | ETOOLATE this time | 10:43 | |
hoelzro | ok, here's what is causing the crash on my Arch box | 10:57 | |
parrot is being built without --optimize | |||
and that causes problems...for some reason. | 10:58 | ||
11:00
zby_home_ joined,
adu left
|
|||
Woodi | afternoon | 11:07 | |
11:10
crab2313 joined,
GlitchMr left
|
|||
jnthn | hi Woodi | 11:11 | |
masak | Woodi! \o/ | ||
Woodi | pmichaud: maybe we can create (deb|rpm)s into /usr/local ? probably Debian/Ubuntu/Fedora/... package maintainers want to compile their own packages to keep it under their control... | 11:12 | |
hallo jnthn++ & masak++ :) | |||
btw. it is nice your boss(es) officially support Perl 6 :) | 11:13 | ||
11:16
GlitchMr joined
|
|||
masak | that is nice. | 11:16 | |
11:16
crab2313 left
|
|||
jnthn | Aye :) | 11:19 | |
11:20
spider-mario left
11:24
jferrero left
11:26
hoelzro is now known as hoelzro|away
|
|||
moritz | they do? | 11:28 | |
ah yes, it says Perl 6 on www.edument.se/konsulter/ | |||
star: use LWP::Simple; say LWP::Simple.get('perl6.org/').substr(0, 20) | 11:29 | ||
p6eval | star 2012.07: OUTPUT«<?xml version="1.0" » | ||
moritz | star: use LWP::Simple; say LWP::Simple.get('perl6.org/').match(rx{'<title>' <( .*? )> '</title>' }).Str | ||
p6eval | star 2012.07: OUTPUT«Perl 6» | 11:30 | |
moritz | star: use LWP::Simple; say LWP::Simple.get('rakudo.org/').match(rx{'<title>' <( .*? )> '</title>' }).Str | ||
p6eval | star 2012.07: OUTPUT«rakudo.org | Rakudo Perl 6» | ||
moritz | jnthn: it's funny that module precompilation is so sensitive, and still it works to load a module that was precompiled with a different setting | 11:31 | |
I guess that's because the "different" setting is still being loaded for p6eval | 11:32 | ||
masak | moritz: our bosses are also fine with us working about 80% so that we'll have time to do Perl 6 the remaining 20%. | ||
jnthn | Not to mention disappearing for conferences... ;-) | 11:34 | |
moritz: Different source or different compilation? | 11:35 | ||
moritz: It uses a sha-1 of the source code to determine "does it match" | 11:36 | ||
mhasch | masak: you do what you do for Perl 6 in just 20% of your time? Or is ist 80% of your leisure time and 20 % of your working time? | ||
masak | mhasch: I try to allocate that time for the macro grant. | 11:38 | |
with varying success. :) | |||
mhasch: the 20% fall inside the working week. in order to get the velocity right, I like to think of another 20% as falling in the weekend. I'm a bachelor, so that tends to work. | 11:39 | ||
moritz | jnthn: well, p6eval runs with --setting=RESTRICTED | ||
jnthn: but around it is still CORE, with which the modules were compiled | 11:40 | ||
but of course the modules still see CORE | |||
jnthn | moritz: Right. | ||
moritz | which is why it probably works | ||
jnthn | Yes. :) | ||
mhasch | masak: I see. It still takes a lot of focus to switch between different projects so frequently. | 11:42 | |
11:43
UncleFester6 joined
|
|||
UncleFester6 | my "make install" has module precompilation failures for lots of modules under both cygwin and low memory linux (using parrot -G) | 11:45 | |
Missing or wrong version of dependency 'src/gen/BOOTSTRAP.pm' (cygwin) | |||
Missing or wrong version of dependency 'src/gen/CORE.setting' (linux) | 11:46 | ||
masak | mhasch: yes, but in a sense the work I do is already switch-intensive in that way. | ||
and mixing a bit of Perl 6 into my regular work seems to make my regular work more interesting, too. :) | |||
jnthn actually can't concentrate on just one thing all the time for prolonged periods, so the variety works well :) | 11:47 | ||
arnsholt | jnthn: Is there anything special I should know about the hash() not-quite-literal in NQP? | ||
jnthn | arnsholt: As in nqp::hash? | ||
arnsholt: I guess that it expects string key/object value/string key/object value/... | 11:48 | ||
arnsholt: Other than that, I don't think there's anything particularly special. | |||
UncleFester6: Are you sure that it's not older .pir files? | |||
arnsholt | Hmm. In World.pm there's a sub called just as hash() is that something else? | 11:49 | |
jnthn | arnsholt: Hmm :) | ||
arnsholt: Oh... | |||
yes, and I just saw its implementation and wtf... | |||
arnsholt: Anyway, it's correct, just inefficient | 11:50 | ||
arnsholt: But unlike nqp::hash it expects you to pass named args. | |||
dalek | kudo/macros-d2: c7c118d | masak++ | src/ (2 files): can parse unquotes in quasis This now works: $ ./perl6 -e 'say "OH HAI"; my $a; {{{$a}}}' ===SORRY!=== Can only use unquote syntax inside a quasi block at -e:1 $ ./perl6 -e 'say "OH HAI"; my $a; quasi { say "woo!"; {{{$a}}} }' OH HAI |
11:52 | |
UncleFester6 | I unpacked rakudo star into a fresh directory with nothing else in both cases ... | ||
masak requests feedback on that initial commit, especially from moritz, jnthn, pmichaud but also from others | |||
jnthn | star: say @*INC | ||
p6eval | star 2012.07: OUTPUT«/home/p6eval/.perl6/lib /home/p6eval/star/lib/parrot/4.6.0/languages/perl6/lib» | ||
arnsholt | Right. 'Cause for some reason my latest set of changes in Rakudo causes a segfault when compiling the setting, and the changes are pretty much just changing World.create_signature to take a hash and some hash literals | 11:53 | |
jnthn | UncleFester6: ^ shows that it will look in your home directory's .perl6 before the place that I guess modules are installed to. | ||
UncleFester6 | that could be a problem - checking | 11:54 | |
11:58
crab2313 joined
|
|||
arnsholt | Arg barg! Why U segfault? | 11:59 | |
jnthn | arnsholt: Hm, then what do you do with that data? | 12:03 | |
arnsholt | Not much ATM | 12:04 | |
Just unpack the parameters key into a variable in World.create_signature | 12:05 | ||
jnthn | arnsholt: If you gist me a diff I can take a look at it and see if I spot anything. | 12:06 | |
12:07
Chillance joined
|
|||
arnsholt | jnthn: gist.github.com/3193047 | 12:08 | |
moritz | masak: looks fine to me | ||
masak | huh. | 12:12 | |
ok, then. :) | |||
I'll just carry on in that direction. | |||
jnthn | arnsholt: Hmm, nothing jumps out at me, other than that I guess I'm not looking at the full patch? | ||
arnsholt: e.g. I see a "+ $*W.create_signature(%signature_info)", but not where %signature_info is being set up. | 12:13 | ||
arnsholt | Yeah, there are two more commits that lead up to this | ||
jnthn | arnsholt: OK, and this is the "switchover" one? | 12:14 | |
arnsholt | Yeah | ||
jnthn | I'm guessing it's possible that the issue is in a previous patch that is building up the data structure...that or I miss the issue in this one. | ||
arnsholt: How quickly does it segfault? | |||
arnsholt | Pretty quickly. In the parse bit | 12:15 | |
12:15
spider-mario joined,
dbr left
|
|||
jnthn | arnsholt: I mean, I can imagine it getting very upset if it thinks it is about to get a parameter and then doesn't. | 12:16 | |
That is, if the @parameters somehow ends up containingg something that's not a Parameter. | |||
12:16
dbr joined
|
|||
UncleFester6 | star: use LWP::Simple; say LWP::Simple.get('rakudo.org/').substr(0, 200) | 12:17 | |
p6eval | star 2012.07: OUTPUT«<!DOCTYPE html><html dir="ltr" lang="en-US"><head><meta charset="UTF-8" /><title>» | ||
UncleFester6 | star: use LWP::Simple; say LWP::Simple.get('rakudo.org/').substr(0, 2000) | ||
p6eval | star 2012.07: OUTPUT«<!DOCTYPE html><html dir="ltr" lang="en-US"><head><meta charset="» | ||
arnsholt | Hmm. Troo | ||
jnthn: Refresh and you'll have git diff HEAD^^ | |||
moritz took a while to not parse that as a smily :-) | 12:19 | ||
but it's the same as HEAD~2 | 12:20 | ||
jnthn | arnsholt: + my $p_sig := $*W.create_signature(hash(nqp::hash('parameters', [$*W.create_parameter(@p_params[0])]))); | 12:21 | |
arnsholt: That looks like a hash in a hash where it shouldn't be | |||
arnsholt: ah, think I see something serious. | 12:23 | ||
+ sub create_signature_object($/, %signature_info, $lexpad, :$no_attr_check) { | |||
Here we get %signature_info, and then | |||
for %signature_info<parameters> { | |||
We loop over what I guess are the hashes | |||
For each one we create a parameter object and then @parameters.push($param_obj); | 12:24 | ||
But then: | |||
- $*W.create_signature(@parameters) | |||
+ $*W.create_signature(%signature_info) | |||
That's being passed to create_signature in the hash there is not the list of parameter objects; it's the list of hashes. | |||
arnsholt | Oh derp. Thanks! | 12:25 | |
jnthn | masak: c7c118d looks good to me. | 12:27 | |
masak | \o/ | ||
$*IN_QUASI is not a STD-ism. but STD derives a grammar Quasi there, and I'm not prepared to do that right now. | 12:28 | ||
UncleFester6 | jnthn: thanks that was it - think I came across an LWP::Simple bug but will deal with that later | 12:32 | |
moritz | star: use LWP::Simple; say LWP::Simple.get("perl6.org/").chars | 12:35 | |
p6eval | star 2012.07: OUTPUT«1755» | ||
moritz | std: {{{1}}} | 12:37 | |
p6eval | std e52e3ca: OUTPUT«ok 00:00 40m» | ||
UncleFester6 | moritz: looking at the LWP::Simple code it seems pretty clear it is only pulling in the first packet of the reply and not later packets. Will double check and plan to file later. | 12:38 | |
12:38
cognominal_ joined
|
|||
masak | moritz: it probably parses as three blocks outside of Quasi. | 12:40 | |
moritz: personally, I'm fine with not allowing it. | |||
moritz | masak: +1 | ||
masak | it's a bit like a `return` outside of a routine. | ||
12:41
cognominal left
|
|||
moritz | masak: but getting STD's behavior with your approach wouldn't be too hard either | 12:41 | |
just '{{{' <?{ !$*IN_QUASI }> <EXPR> '}}}' | 12:42 | ||
masak: speaking of which, are you sure that there need to be an <EXPR> in there, and not something more general like a <statementlist>? | 12:43 | ||
12:44
cognominal_ left
|
|||
masak | <statementlist> sounds more apt. | 12:48 | |
I guess the latter allows `my $blabla = 5; $foo` and not just `$foo`. | |||
then yes. | |||
12:49
grondilu joined
|
|||
grondilu is trying to compile rakudo-star on his new fedora system | 12:50 | ||
12:51
MayDaniel left
|
|||
moritz | masak: exactly | 12:52 | |
12:58
drbean left
|
|||
masak | moritz: well, <?{ $*IN_QUASI }>, but yes ;) | 12:58 | |
13:00
drbean joined
|
|||
moritz | masak: erm, yes | 13:01 | |
dalek | kudo/macros-d2: 8c2db63 | masak++ | src/ (2 files): backpedal on throwing an exception as moritz++ points out, this is closer to how STD does it. |
13:03 | |
kudo/macros-d2: 163c626 | masak++ | src/Perl6/Grammar.pm: <statementlist>, not <EXPR> Much better. moritz++ $ ./perl6 -e 'say "OH HAI"; my $a; {{{say "woot!"; $a}}}' OH HAI woot! $ ./perl6 -e 'say "OH HAI"; my $a; quasi { say "woo!"; {{{$a}}} }' OH HAI |
|||
moritz | masak: fwiw I didn't mean to say throwing an exception is wrong, just pointing out that STD's behavior can easily be emulated too | 13:04 | |
grondilu failed to compile :( | 13:05 | ||
moritz | grondilu: -v | ||
grondilu | « invoke() not implemented in class '1257060743' » | 13:06 | |
moritz | :( | 13:07 | |
grondilu | pretty much the same as lately | ||
and it's a brand new linux system | |||
(Fedora 17) | |||
moritz wonders if shipping parrot 4.5.0 would have helped | |||
grondilu | (on i686) | ||
takadonet | morning all | 13:10 | |
masak | moritz: still, I prefer this behavior. | 13:14 | |
13:19
crab2313 left
13:28
uvtc joined
|
|||
uvtc | The README in the R* release says it's the 2012-06 version. | 13:30 | |
13:30
fgomez left
|
|||
masak | :( | 13:31 | |
uvtc | Also it doesn't mention using "--gen-nqp" in the build instructions. Is that no longer required? | ||
(In the "Configure.pl" step.) | |||
GlitchMr | github.com/rakudo/rakudo | 13:32 | |
$ perl Configure.pl --gen-parrot --gen-nqp | |||
I still see it | |||
uvtc | Turn that frown upsidown, masak. | ||
I mean in the R* readme. | |||
jnthn | It's not required, afaik. | ||
uvtc | jnthn: thanks. | 13:33 | |
13:33
birdwindupbird joined,
sergot left
|
|||
masak | jnthn: about to create QAST::Unquote in nqp. `class QAST::Unquote is QAST::Node {}` in its own file in src/QAST -- anything else? | 13:33 | |
jnthn | masak: Update Makefile.in? | 13:34 | |
masak | good call. I will. | ||
arnsholt | jnthn: Looks like you unbrokeded it. Thanks! | 13:35 | |
jnthn | arnsholt: \o/ | 13:36 | |
masak | what's a BlockMemo? sounds like a three-dimensional corporate document to me. ;) | ||
jnthn | masak: Used by QRegex, but endangered. :) | 13:37 | |
masak | ah. | ||
jnthn | masak: It's used for attaching extra stuff to a block. | ||
masak | I see. | ||
jnthn | masak: All its usages should be refactored to use serialization. | ||
masak: But I didn't want to block toqast on that. | |||
13:38
grondilu left
|
|||
arnsholt | jnthn++ # Unbrokededness | 13:38 | |
uvtc | Attempted to the 2012.07 R*, but it fails for me. Here's some of the leavings in my terminal window: gist.github.com/3193446 | ||
This is on Xubuntu 12.04, using a Perl 5.16 that I built in my ~/opt. | 13:39 | ||
Please let me know if that's enough of the terminal window output, or if more is needed. | 13:40 | ||
13:40
tokuhiro_ joined
|
|||
uvtc | Or if I should file a bug. I emailed rakudobug with the last one, but it may have been a duplicate. | 13:40 | |
masak | cognominal++ tweeted it, but it's worth posting here, for those who want to read it: blog.peterdonis.com/opinions/still-...rlude.html -- briefly, inventor of Unix pipes Doug McIlroy is asked to do literary criticism of a literate program Knuth wrote. interesting stuff. | 13:45 | |
critique*, I guess. | 13:46 | ||
I believe I referred vaguely to this exchange a few weeks back. | |||
"He has fashioned a sort of industrial-strength Fabergé egg—intricate, wonderfully worked, refined beyond all ordinary desires, a museum piece from the start." | 13:47 | ||
13:49
SamuraiJack joined
13:53
leprevost joined
|
|||
masak | "I need to put that on a Post-it note as an example of how to explain a script. The best part? It would fit on a Post-it note." :) | 14:00 | |
yes, those two posts are worth reading. | 14:02 | ||
uvtc | :) | ||
14:02
Celelibi left
14:04
Celelibi joined
14:13
birdwindupbird left
|
|||
dalek | p: 1f54496 | masak++ | / (2 files): added QAST::Unquote |
14:16 | |
masak | ideally, I would write tests for the new node type, as well. | ||
they would do something like "here's an AST with Unquote notes in it; here's an AST fragment. I apply the latter to the former, and get an AST with the fragment stitched in." | 14:17 | ||
(i.e. test the operational aspect of QAST::Unquote and stitching.) | 14:18 | ||
it's interesting, by the way, that "stitching in" actually happens twice during the macro call. once when the static quasi is incarnated into a run-time object (conceptually) on block entry. | 14:19 | ||
once when the AST from the macro call is stitched into the mainline code. | |||
14:19
cognominal joined
|
|||
masak | both of these cases are "closure-like", in the sense that the stitching-in inside the macro has things carrying the mainline's context, and vice versa. | 14:20 | |
it's really beautiful if you think about it. :) | |||
masak .oO( hey, look. I'm philosophizing about macros again! ) | 14:21 | ||
anyway, given what's in t/qast/qast.t, I'm fairly confident I'll be able to write such a test. | 14:22 | ||
14:23
cognominal left
|
|||
masak | at least if the stitched-in bit doesn't do lexical lookups of free variables. | 14:23 | |
14:24
cognominal joined
|
|||
timotimo | is it possible to stitch in a function in the local scope of the macro into the ast that's returned? | 14:25 | |
i'm imagining something like macro yoink() { sub frob($a) { $a + 1 }; return quasi { say {{{&frob}}}(99) } }; yoink; | |||
r: macro yoink() { sub frob($a) { $a + 1 }; return quasi { say {{{&frob}}}(99) } }; yoink; | |||
p6eval | rakudo b87659: OUTPUT«sub frob($a) { ... }» | 14:26 | |
timotimo | that's ... interesting | 14:27 | |
moritz | masak: the double-closure thingy is what had us so confused during our early discussions, no? | ||
masak: we tried to reduce it to one closure-like step, and it never worked out | 14:28 | ||
uvtc: that bug is already in RT | |||
14:28
skids joined
|
|||
uvtc | moritz: thanks. | 14:28 | |
Anyone else having the same problem trying to build R*? | 14:29 | ||
moritz: is it the same "gc-gone-wild" problem I was previously having? It looks slightly different, because this time it's "invoke() not implemented in class '6778597130223229316'" rather than "invoke() not implemented in class ' | 14:31 | ||
'". | |||
14:31
tokuhiro_ left
|
|||
jnthn | It'll be the same underlying issue. | 14:32 | |
uvtc | Anything I can do about it on my system? | ||
jnthn | I haven't managed to track down what on earth is going on there yet :( | ||
masak | moritz: that might well be it. it's a bit tricky to analyze confusion, though ;) | ||
jnthn | uvtc: Adding -G to the Parrot flags on that invocation is known to avoid the issue. | 14:33 | |
uvtc: I think it's documented in the ticket | |||
Or some ticket. | |||
UncleFester6 | rt.perl.org/rt3/Ticket/Display.html?id=113660 - towards the end | 14:34 | |
uvtc | UncleFester6++ thanks. | 14:35 | |
Forgot to mention (in case it's important), I'm on 64-bit. | 14:36 | ||
jnthn | uvtc: How much RAM? | ||
uvtc | jnthn: that's a good question... | 14:37 | |
masak | moritz: `macro foo($y) { my $x = 1; quasi { say $x; say {{{$y}}} } }; my $x = 2; foo $x; # 1\n2\n` -- this captures it, I guess. nothing new to either of us at this point. | ||
moritz: though I'm guessing things can be done with it that neither of us thought about yet ;) | |||
uvtc | jnthn: 1927MiB | 14:39 | |
jnthn | Thanks | 14:40 | |
uvtc | Is 2 GB good for building the whole enchilada? | ||
jnthn | (It's enough, it's just that memory size determines how often GC runs, and it seems that soemthing is getting eaten too early.) | ||
(Thus having more memory reduces the probability of hitting the bug.) | |||
moritz | uvtc: it's enough, yes | 14:41 | |
uvtc | Hm. Possible debugging technique: open hardware, remove a simm/dimm, try again. :) | ||
jnthn | Oh, I don't think it's a memory/hardware issue. | 14:42 | |
It's very likely something wrong in NQP. | |||
uvtc | jnthn: No, I meant, if it might have something to do with how much memory is installed, removing some could help make the bug happen for you to make it easier to track down. | 14:43 | |
More likely to bump it's head. | |||
jnthn | ah, I see | 14:45 | |
UncleFester6 | on linux/bash ulimit maybe | ||
jnthn | I may also try a VM. | ||
moritz | UncleFester6: I think parrot ignores ulimits :( | 14:46 | |
geekosaur | VM is how I'd do it, fwiw | ||
ummm | |||
ulimits are enforced by the kernel | |||
uvtc | jnthn: You're going to test it on a Vending Machine? | 14:47 | |
;) | |||
geekosaur | but they don't work the way one might naively think, so you need to be careful using them for this | ||
jnthn | ;-) | ||
arnsholt | Huh. For some reason my patch doesn't work | ||
tadzik | oh oh, macros! | ||
14:49
UncleFester6 left
|
|||
masak | tadzik: they're really not that complicated. | 14:51 | |
IF YOU'RE ALREADY INSANE MWHAHAHAHA | |||
moritz | geekosaur: it's not about enforcing | ||
tadzik | SORRY I CAN'T HEAR YOU OVER THE SOUND OF HOW INSANE I AM | 14:52 | |
moritz | geekosaur: parrot uses the available memory for determining how big a pool can grow before running the GC | ||
geekosaur: and parrot ignores ulimits for that purpose | |||
geekosaur | right. because ulimits are solely enforcement. | ||
moritz | so if you set a strict ulimit and try to reproduce the bug, it'll simply OOM | 14:53 | |
geekosaur | again, "don't work the way one might naively expect" | ||
(we're saying the same thing differently) | |||
15:00
fgomez joined
15:09
fgomez left
15:16
mucker joined
15:27
fgomez joined
15:28
fgomez left
|
|||
arnsholt | jnthn: Could you have a look at gist.github.com/3193047 again? | 15:30 | |
It runs fine now, but for some reason &func.signature.returns is still Mu for sub func(Int --> Int) { ... } | |||
15:31
adu joined
|
|||
jnthn | + if %signature_info<returns> { | 15:32 | |
A type object is always false. | |||
I guess you wanted if nqp::existskey(%signature_info, 'returns') { ... } | 15:33 | ||
arnsholt | Durrr. Of course it is =) | ||
dalek | kudo/macros-d2: a908aa4 | masak++ | tools/build/NQP_REVISION: [tools/build/NQP_REVISION] bumped For QAST::Unquote. |
||
15:35
fgomez joined
|
|||
arnsholt | jnthn++ # $ ./perl6 -e 'sub test(Int --> Int) { say "hi" }; say &test.signature.returns'\nInt() | 15:38 | |
masak | \o/ | 15:39 | |
jnthn | \o/ | ||
arnsholt++ | |||
15:39
simcop2387 left
15:40
simcop2387 joined
15:41
SamuraiJack left,
SamuraiJack_ joined
|
|||
arnsholt | And even $ ./perl6 -e 'sub test(&cb(Int --> Int)) { say "hi" }; say &test.signature.params[0].sub_signature.returns'\nInt() | 15:42 | |
Time for a full spectest | |||
flussence | has that always been broken? I remember nativecall flipping out when I used the "-->" syntax instead of "returns". | 15:44 | |
15:45
cognominal left
|
|||
arnsholt | Yeah. Never been implemented 'till now, apparently =) | 15:46 | |
Or rather, implemented in the grammar but not passed on to the AST | 15:48 | ||
15:48
adu left
15:51
zhutingting joined
15:52
Guest74836 left
|
|||
masak | \o/ | 15:53 | |
zhutingting | hi~ I installed rakudo-star-2012.07.msi~ An error here: PARROT VM: Could not load bytecode | 15:55 | |
Could not load oplib `nqp_ops' | |||
16:00
kaxing left,
kaxing joined
|
|||
masak | hm, that error message is very familiar. | 16:00 | |
could it have something to do with previously installed versions of Parrot/ | |||
? | |||
zhutingting | I installed rakudo2011.4 parrot 3.3 before | 16:03 | |
jnthn | Hmm | 16:04 | |
zhutingting | uninstall the old version first? | ||
jnthn | zhutingting: Where did it install it to, ooc? | ||
zhutingting | rakudo2011.4 install in c:\ | 16:05 | |
16:05
Guest74836 joined
|
|||
zhutingting | 2012.7.msi auto install in e:\ | 16:05 | |
jnthn | hmmm. | 16:07 | |
And on mine it install it in d:\ | |||
I'm almsot certain it's *meant* to install it on c:\ | 16:08 | ||
[Coke] | (parrot not relocatable) is there at least a ticket about parrot not being relocatable? | ||
moritz | I think so | 16:09 | |
github.com/parrot/parrot/issues/se...elocatable seems like "no" | 16:10 | ||
16:22
MayDaniel joined
16:25
birdwindupbird joined
16:32
birdwindupbird left
16:44
johnshoe joined
16:45
johnshoe left
16:52
uvtc left
|
|||
pmichaud | good morning, #perl6 | 16:53 | |
16:53
zhutingting left
|
|||
pmichaud | problems with the .msi? | 16:53 | |
16:56
seldon joined
|
|||
jnthn | pmichaud: My best guess is that it isn't forcing the installation to happen on drive C | 16:57 | |
pmichaud | I'm not sure how to do that. | ||
jnthn | pmichaud: When I tested it on my laptop yesterday, there sin't anyway option. So it seemed fine. | ||
dalek | p/pirt: c6b0eee | jnthn++ | src/QAST/ (2 files): Consistently use :name for labels, not a mix of :result and :name. |
17:00 | |
p/pirt: 544a992 | jnthn++ | / (3 files): Add initial sketch of PIRT, which is to be a hopefully more memory efficient replacement for POST. |
|||
p/pirt: e74e38c | jnthn++ | / (2 files): Give PIRT::Sub support for loadlibs, name, subid and pirflags; also emit calls. |
|||
p/pirt: 2534c85 | jnthn++ | t/qast/qast.t: Get QAST tests to expect QAST::Compiler to produce PIRT. |
|||
p/pirt: 6bc5c6c | jnthn++ | src/QAST/Compiler.nqp: Start updating QAST::Compiler for PIRT. Gets some QAST tests passing again. |
|||
p/pirt: d4ed168 | jnthn++ | src/QAST/Operations.nqp: Update QAST::Operations for using PIRT, which gets many more of the QAST tests passing again. |
|||
17:00
unixms joined
|
|||
pmichaud | aha. apprently wix/msi installs to the drive with the most free space by default. | 17:00 | |
masak | huh. | 17:01 | |
jnthn | pmichaud: Hm. A user-friendly default apart from when it's not :) | ||
pmichaud | so far googling the issue gives me a lot of messages from wix folks saying that we really don't want to force installation to c:\ :-( | 17:02 | |
jnthn | pmichaud: In the long run, no. In the shorter term, it's better than giving people an installation that looks like it's gonna work, then doesn't. | 17:03 | |
17:03
unixms left
17:04
UncleFester6 joined
|
|||
UncleFester6 | pmichaud: .msi wfm | 17:05 | |
pmichaud | UncleFester6: excellent | ||
16:08 <[Coke]> (parrot not relocatable) is there at least a ticket about parrot not being relocatable? | 17:12 | ||
I know that parrot isn't very relocatable on unix systems... but do we really know that it's not relocatable on windows? | 17:13 | ||
maybe I should test that theory first | |||
jnthn | Think it isn't, but I certainly haven't tried that in a long while. | 17:14 | |
moritz | pmichaud: jnthn tried for the first star release | ||
jnthn | Oh, actually... | ||
moritz is currently writing the ticket | |||
jnthn | A while back I spent some time doing a disgusting attempt at binary patching the executable.. | ||
So yeah, I guess it doesn't work. | |||
(I didn't manage to binary patch the executable either :P) | |||
pmichaud | jnthn: do you remember if the binary actually had C:\ (or equivalent) in it, or did it just depend on a specific directory? | 17:15 | |
jnthn | pmichaud: I *think* it had the drive letter in. | 17:17 | |
pmichaud: Certainly all the paths I get from parrot_config --dump have the C:\ in | |||
pmichaud: Maybe if you configure with a --prefix=\rakudo though... :) | 17:18 | ||
moritz | github.com/parrot/parrot/issues/800 | 17:20 | |
pmichaud | jnthn: good idea -- I'll try that. | 17:21 | |
TimToady | pmichaud: is irclog.perlgeek.de/perl6/2012-07-28#i_5853362 something new or the same old? | 17:25 | |
pmichaud | TimToady: same old; you're correct that it's one of those things I'm working on. | 17:26 | |
TimToady | good, just didn't want it to fall through the cracks if it was different | ||
[Coke] | +# 07/28/2012 - rakudo++ (22930); niecza (89.91%); pugs (40.82%) | 17:27 | |
pmichaud | if you have any thoughts on github.com/perl6/specs/issues/18 it might help a bit :-) | ||
(that's not directly related to the X/Z issues... but indirectly related things often have a habit of affecting other parts of list handling :) | 17:28 | ||
[Coke] | moritz: I have a ticket open to tell parrot "this is your max memory, go no further" (just like java does) and it has never really gotten traction. perhaps upvoting it will help. | ||
TimToady | maybe push on a list doesn't flatten, unlike push on an array | ||
er .plan | |||
pmichaud | I could live with that; would non-flattening be true also for push/unshift, then? | 17:29 | |
(on List vs Array) | |||
TimToady | I still think there are two sets of shifters, depending on whether you're binding slurpy vs non-slurpy | 17:30 | |
give me the next positional arg vs give me the next slurpy arg | 17:31 | ||
17:31
jaldhar left
|
|||
pmichaud | I follow what you mean by the different shifters; I don't see how they quite apply in this case. | 17:31 | |
right now slurpiness is a feature of the parameter list | 17:32 | ||
17:32
leprevost left
|
|||
pmichaud | (and thus the method signature for plan/push/unshift) | 17:33 | |
TimToady | non-slurpiness can either be positional (single "arg") or lol (list of "arg") where arg is a subparcel | 17:34 | |
pmichaud | okay, I'll start with a more basic question: what's the signature for List.plan ? | 17:36 | |
TimToady | but each arg can be its own lazy parcel, so that X can somehow have two sublists that know not to look inside [] or $ | ||
I'd suspect it's **@parcels | 17:37 | ||
pmichaud | oh, was your "two sets of shifters" comment aimed at X/Z, and not .plan/.push ? | ||
17:38
fgomez left
|
|||
TimToady | I'm just thinking of the "shifters" as the primitive difference between the two binding styles that do or do not unpack the next parcel in the arglist | 17:39 | |
and it seems that such a difference should be accessible at a low level apart from only binding | |||
pmichaud | okay. I don't see that as a big issue (yet); to me, it's essentially the difference between **@slurpy and *@slurpy | ||
TimToady | don't care whether they're actually called "shift" | 17:40 | |
17:40
SamuraiJack__ joined
17:41
SamuraiJack_ left
|
|||
TimToady | but it's still basically the .getarg vs .getitem from the old S07 I'm thinking of | 17:41 | |
.getitem being the slurpy one | |||
pmichaud | s/slurpy/flattening ? | ||
TimToady | yes | ||
pmichaud | let's suppose I have my $l = ( (1,2,3), (4,5,6) ).list; | 17:43 | |
and I do my $x = $l.getitem | |||
what's left in $l ? | 17:44 | ||
TimToady | (2,3),(4,5,6) | ||
pmichaud | okay, so it "flattens" the first element but only long enough to get an element | ||
i.e., it's not 2,3,(4,5,6) | 17:45 | ||
TimToady | that seems ickier for some reason | ||
though for sure people don't usually switch from slurpy back to item | |||
pmichaud | and if I have $l = ( (3,), (4,5,6) ).list | ||
TimToady | er, arg | ||
pmichaud | and then do $x = $l.getitem | ||
$l ends up with... ? | 17:46 | ||
TimToady | (4,5,6) | ||
pmichaud | okay. I haven't come up with a case where a list needs to be able to support both item-based and arg-based shifting | 17:47 | |
(at the same time) | |||
and I suspect not having that case is where the item-based and arg-based shifting distinction escapes me. | 17:48 | ||
17:48
unixms joined
|
|||
TimToady | I could imagine a signature that says (*$item, @arg, *@items), where $item would get 1, @arg would get (2,3), and @items would get (4,5,6) | 17:49 | |
currently we'd generally do that with a subsig | 17:50 | ||
pmichaud | also, the spec currently says that slurpy parameters follow any required/optional parameters | 17:51 | |
so "*$item, @arg" seems illegal. | |||
(if you're speculating that the spec might change to enable something like "*$item, @arg", I'm okay with that :) | 17:52 | ||
TimToady | well, I guess I don't care about that so much as understand how "list X list" loses its don't look inside [] policy | 17:53 | |
17:53
SamuraiJack__ left,
SamuraiJack joined
|
|||
pmichaud | so, just to confirm, you're expecting the correct answer of ['a', 'b'] X~ 1 .. 3 to be ... ? | 17:54 | |
TimToady | what niecza produces "a b1 a b2 a b3" | ||
pmichaud | 'a b1', 'a b2', 'a b3' is my expectation | ||
TimToady | X basically takes two parcels that need to each be treated as a slurpy | 17:55 | |
pmichaud | as a flattening slurpy? | ||
17:55
unixms left
|
|||
TimToady | yes, list infixes flatten | 17:56 | |
unlike hypers | |||
pmichaud | "as a slurpy" is ambiguous to me; both **@lol and *slurpy are "slurpies" | ||
*@slurpy | |||
"slurpy" to me simply means variadic in nature (perhaps I need an adjustment) | 17:57 | ||
TimToady | sure, in my mind those are slurp args vs slurp items, but when I say "slurpy" in isolation it's usually to distinguish from lol | ||
so maybe we need a term for * | |||
pmichaud | slurp items vs slurp flat is what I tend to think of | ||
TimToady | well, it's the flattening slurpy | 17:58 | |
pmichaud | right | ||
I should say slurp lists vs. slurp flat | |||
17:58
daftdude joined
|
|||
pmichaud | **@lol is the list slurpy, while *@slurpy is the item/flattening slurpy | 17:58 | |
TimToady | I think of ** as arg slurp because it's the same as binding to a positional | 17:59 | |
...to multiple positionals | |||
pmichaud | I'm fine if we use "slurpy" to mean the "list slurpy" case.... although almost everything that has been written about p6 until now tends to use "slurpy" in conjunction with the flattening / *@slurpy case. | ||
17:59
daftdude left
18:00
snearch joined
|
|||
pmichaud | I can live with "arg slurp" if that works better for you. | 18:00 | |
lol slurp might make more sense | |||
TimToady | from the S09 viewpoint it's more like a dimensional slurp: "Don't lose dimensional info" | 18:01 | |
18:01
snearch left
|
|||
pmichaud | anyway, the problem with Rakudo's X has to do with its mishandling of **@lol arguments. | 18:02 | |
I basically know what the problem is there, and how to fix it. | |||
TimToady | well, I guess X is a vararg anyway, so ** kinda makes sense | ||
pmichaud | correct | ||
the issue with Rakudo's X is that **@lol itemizes everything in it | 18:03 | ||
so Rakudo's X defaults to processing everything in the item, which means it looks inside of [ ] | |||
dalek | p/pirt: 6ff18e2 | jnthn++ | src/QAST/PIRT.nqp: Implement method calling. Down to six tests for t/qast/qast.t that fail. |
||
p/pirt: 01a918f | jnthn++ | src/QAST/Operations.nqp: Be consistent in how we call infer_type. Leaves just two tests in qast.t failing. |
|||
p/pirt: 6568e10 | jnthn++ | src/QAST/ (2 files): Fix inline, which tests the remaining qast.t tests passing when using PIRT instead of POST. |
|||
TimToady | I guess it's confusing because the lol operator *does* itemize everything, but ** doesn't | ||
18:03
mucker left
|
|||
[Coke] | pirt? | 18:03 | |
pmichaud | correct, that's why Rakudo's **@lol itemizes stuff. | 18:04 | |
jnthn | [Coke]: Replacing POST. | ||
pmichaud | I was folloiwng the .lol pattern. | ||
TimToady | so we should definitely not call ** a "lol" | ||
jnthn | [Coke]: A much, much smaller job than replacing PAST. :) | ||
[Coke]: With hopeful memory benefits. | |||
pmichaud | I'm fine with that. how about "slurpy args", then? | ||
and we write **@args | |||
TimToady | seems an improvement | 18:05 | |
[Coke] | no relation to PIR? | ||
TimToady | does this address the other non-lazy-parcel problem we were talking about earlier? | ||
don't remember the example offhand... | |||
pmichaud | not directly, unless you feel that .plan is indeed the way to concatenate lists | ||
TimToady | well, add args to a list | 18:06 | |
pmichaud | or are you referring to some other problem we were talking about before today? | ||
TimToady | something triggered this list rethink a couple three weeks ago | ||
pmichaud | oh, sure | ||
it was the issue with how gather/take works with parcels | |||
TimToady | my brane has been topsy turvy since then | ||
pmichaud | yes, this starts to address that as well | ||
TimToady | right, that were it | 18:07 | |
pmichaud | fixing gather/take is what led me to #18 | ||
but the gather/take problem isn't so much an issue of how we deconstruct args, but more a problem of how we construct return results | |||
TimToady | it seems natural to me that list treat .plan as args rather than items | ||
jnthn | [Coke]: POST is the thing that gets turned into PIR | ||
[Coke]: PIRT (PIR Tree) fills the same role. | |||
pmichaud | but .push would still be items? | ||
18:08
fgomez joined
|
|||
pmichaud | (having .plan == args and .push == items works for me, fwiw) | 18:08 | |
TimToady | I don't see that; parcels still have to live through the reification | ||
flussence | .oO( coming soon: nqp/partridge ) |
||
TimToady | but maybe that's orthogonal to .plan vs .push | 18:09 | |
pmichaud | none of these really affect Array; Array forces flattening anyway. | ||
TimToady | right; just seems odd to me to supply a flattening method to pushing list when lists are supposed to be agnostic to flattening | 18:10 | |
can always .plan: flat @stuff | |||
pmichaud | I'm fine if .push does args instead of items; I just want to know where the parallels are(n't) | ||
18:10
spider-mario left
|
|||
TimToady | I think I'd be more comfy with list.push pushing args | 18:10 | |
pmichaud | and .unshift also? | 18:11 | |
TimToady | presumably | ||
pmichaud | wfm | ||
so, the major difference between .push and .plan is the eagerness involved | |||
(as it's been up to now, iiuc) | 18:12 | ||
TimToady | well, eagerness at the arg level, not at the stuff inside the arg | ||
pmichaud | correct. | ||
(and agreed) | |||
TimToady | it seems to be fitting together better now | 18:13 | |
pmichaud | anyway, I still need a week or so for resolving X/Z stuff | ||
there's still some fragility in the list implementation where small changes result in surprising breakages. But I think that can be all resolved this go-round | |||
TimToady | sure, just trying to see the big picture again after involunary brane shrinkage | 18:14 | |
*tary | |||
pmichaud | switching **@lol to **@args interpretation eliminates one of the problematic constraints | ||
at least, I think that's what it does :) | |||
I'll update #18 with our discussions here. | 18:15 | ||
TimToady | on lazy warnings, I'm still of two minds, after several weeks of background think | 18:17 | |
moritz | jnthn: can I remove the QAST milestone from ROADMAP? or do the remainng nqp migration and inliner work make it worth keeping it? | ||
jnthn | moritz: I was thinking we'd remove it after migrating NQP to QAST. | 18:18 | |
TimToady | the unification with failure seems like a good thing in the case of +«@foo and such | ||
18:18
jaldhar joined
|
|||
TimToady | but I wonder if the laziness will eventually bite us; I suppose I should worry more about lazy fatals biting us than lazy warnings, and I don't worry about that (much) :) | 18:19 | |
also, it's a bit odd to have an undefined failure that yet has a Cool value, but I suppose that could be worked out somehow | 18:20 | ||
probably means we would need a Failure analog that is spelled differently to easily distinguish the has-a-value-anyway behavior | 18:21 | ||
there's also the fact that warnings are currently considered control exceptions, iirc | 18:22 | ||
pmichaud | yes, warn is listed as a control exception | 18:23 | |
TimToady | call 'em Bogons or some such :) | ||
and instead of fail() we have bogus(), except that's not a verb | 18:24 | ||
bogey() :) | |||
18:24
snearch joined
|
|||
TimToady | which is both noun and verb | 18:24 | |
pmichaud | well, I wasn't hoping for a new Failure class. :-/ | ||
(I wasn't hoping for anything specific... but a new class wasn't it :) | |||
TimToady | maybe it's a Failure that contains a Warning | ||
instead of an Exceptoin | 18:25 | ||
moritz | maybe Warning isa Exception | ||
or manybe Exception has a fatality attribute | |||
TimToady | it's just resumable (and control) | ||
but something would need to introspect that to return 0 or '' or False | |||
unless we do something mixiny | 18:26 | ||
or maybe it's just fail($mywarning, :return(Nil)) | 18:27 | ||
or maybe it's just fail($mywarning, :value(Nil)) | |||
hmm, except that would produce another warning when Nil is evaluated... | 18:28 | ||
:value('') maybe | |||
pmichaud | r: say +Nil | ||
p6eval | rakudo b87659: OUTPUT«use of uninitialized value of type Nil in numeric context in block at /tmp/Zb4T2bNjHV:10» | ||
pmichaud | yup. | ||
TimToady | r: say +'' | ||
p6eval | rakudo b87659: OUTPUT«0» | ||
TimToady | n: say +'' | 18:29 | |
p6eval | niecza v19-15-g051783d: OUTPUT«0» | ||
TimToady | looks like '' works | ||
seldon | n: say +'abc' | 18:31 | |
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: Cannot parse number: abc at /home/p6eval/niecza/lib/CORE.setting line 1414 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3492 (ANON @ 11)  at /home/p6eval/niecza/lib/CORE.setting line 3494 (NumSyntax.str2num @ 5)  at … | ||
seldon | Okay, so it's not just fed to atoi. | ||
18:31
Guest74836 left
|
|||
moritz | I'm currently brainstorming which spec changes rakudo still needs to chase | 18:31 | |
currently I've come up with: sigilless variables and parameters | |||
18:31
GlitchMr left
|
|||
moritz | the changes that ? makes to match objects | 18:31 | |
TimToady | oh, you mean x? -> x or Nil | 18:32 | |
moritz | right | ||
pmichaud | the List stuff I'm working on (although there Rakudo is leading the spec change as much as chasing it :) | ||
moritz | any other major-ish things that need updating? | ||
pmichaud | leading whitespace under :sigspace | ||
skids | Type1(Type2) in parameter lists? | ||
moritz | skids++ | ||
TimToady | there's irclog.perlgeek.de/perl6/2012-07-27#i_5850929 | 18:33 | |
pmichaud | aye. | ||
so, use of $_ in a block prevents it from hashing | |||
TimToady | yes, you have to use a temp var to do that | ||
moritz | last we discussed this, there was a spec issue with that | 18:34 | |
but I can't remember what exactly it was | |||
skids | moritz: handles trait? | ||
moritz | skids: that's implemented | 18:35 | |
(at least nearlly all of it) | |||
pmichaud | if we remember the spec issue, then file a github ticket for it :) | ||
TimToady | I think getting map to DWIM on { .key => transform .value } is pretty important | ||
pmichaud | TimToady: +1 | ||
it shouldn't be that hard; we just flag a block as using $_ when we encounter it. | |||
TimToady | just have to notice that .foo uses $_ | ||
pmichaud | we do that already; it desugars to a lookup of $_ in the ast, iirc | 18:36 | |
moritz | that looks like something I might be able to do | ||
pmichaud | then if a block is using $_, we don't let it de-hashify. | ||
alternatively, we may want to see if the block is treating $_ as a parameter and key on that. | |||
skids | {}.assuming() ? | 18:37 | |
moritz | r: say { $^a => $^b}.WHAT | ||
p6eval | rakudo b87659: OUTPUT«Block()» | ||
TimToady | r: say { $_ => $_ }.WHAT | 18:38 | |
p6eval | rakudo b87659: OUTPUT«use of uninitialized variable $!key of type Any in string context in block at /tmp/u_Cst6Q1fC:1Hash()» | ||
TimToady | it's just not paying attention to $_, seems | ||
dalek | kudo/nom: bfb50b2 | moritz++ | docs/ROADMAP: [ROADMAP] add missing features and spec chases |
||
pmichaud | well, that's partially it. | ||
in the case of { $^a => $^b }, the block has non-zero arity, so we know it's not a hash constructor | |||
moritz | pmichaud, jnthn: feel free up correct my commit if you don't share my point of view about priorities and effort | 18:39 | |
pmichaud | in the case of { $_ => $_ }, the arity is zero | ||
TimToady | whereas $_ blocks have <-> $_ = CALLER::<$_> or some such | ||
pmichaud | (and I don't know if it's been decided at that point as to whether $_ is a parameter to the block or not, in the ast) | ||
dalek | kudo/nom: 8435346 | moritz++ | src/core/ (2 files): implement Str.codes and Cool.codes currently an alias for .chars |
||
pmichaud | moritz++ # .codes | 18:40 | |
TimToady | well, if it's decided by defaulting at call time, then you just have to guess at compile time, and in this case it should guess "parameter", I think | ||
masak | moritz: you mean '.chrs' ? | ||
pmichaud | masak: no, .chars | 18:41 | |
masak: .codes returns the number of codepoints in a string | |||
masak | oh! | ||
right. | |||
moritz | pmichaud: my current plan for detecting $_ usage is to have a dynamic variable $*USES_DOLLAR_UNDERSCORE or so per block, and set it to 1 in blocks that use $_ | ||
TimToady | darn overloaded plurals in English... | ||
masak | we have both .chrs and .chars. yet another reason to scrap .chrs | ||
moritz | pmichaud: and if that's the case, we don't execute the block to produce a hash | 18:42 | |
TimToady | and then you get the opposite failure mode | ||
moritz | pmichaud: does that sound sane? | ||
TimToady | "why didn't .chars return the chars?" | ||
pmichaud | moritz: I'm not sure a dynamic works there. At the point where the hash constructor decision has to be made, you're already out of the block parse (I think) | ||
masak | nr: say <79 72 32 72 65 73>>>.chr.join | ||
p6eval | rakudo b87659, niecza v19-15-g051783d: OUTPUT«OH HAI» | ||
pmichaud | we decide whether to change a block to a hash constructor in circumfix:sym<{ }> | 18:43 | |
TimToady | unless we make .chars lazy enough to optimize +.chars on the fly | ||
jnthn | pmichaud, moritz: We may want to start recording variable accesses that a block makes in .symbol somehow. | ||
skids | r: class C { method a handles Int { 3 } }; my C $c; # This form of the handles trait | ||
p6eval | rakudo b87659: OUTPUT«===SORRY!===Cannot call 'trait_mod:<handles>'; none of these signatures match::(Attribute:D $target, $thunk)» | ||
masak | TimToady: one can't map words optimally to their effect. at some point people will have to learn what the methods do. | ||
pmichaud | jnthn: yeah, that was more of what I was thinking. | ||
masak | TimToady: but having .chrs and .chars isn't helping matters. | ||
jnthn | That would let us implement this but also: | ||
18:44
quietfanatic joined
|
|||
jnthn | std: my $a; { say $a; my $a } | 18:44 | |
p6eval | std e52e3ca: OUTPUT«===SORRY!===Lexical symbol '$a' is already bound to an outer symbol (see line 1); the implicit outer binding at line 1 must be rewritten as OUTER::<$a> before you can unambiguously declare a new '$a' in this scope at /tmp/j1B9tTyUEs line 1:---… | ||
jnthn | That one. | ||
TimToady | .unords :) | ||
masak | TimToady: also -- see p6eval above -- .chrs is redundant in a way which "it's diagonal" doesn't excuse, IMO. | ||
pmichaud | jnthn: I'm thinking it'd be fine for .symbol to record "seen but not declared in this blook" | ||
PAST left a lot of the details of .symbol up to the user, so I'm hoping QAST does the same :) | |||
jnthn | pmichaud: It's only used as a fallback for finding :scope | 18:45 | |
pmichaud: Otherwise it's just a hash of hash. | |||
pmichaud | actually, just "seen in this block" would be worthwhile. | ||
quietfanatic | .chrs currently returns a list of characters, right? | ||
jnthn | pmichaud: Anyway, I'm +1 to this. | 18:46 | |
TimToady | well, yes, and .ords is just .comb».ord, so if we remove one, we should remove the other | ||
moritz | quietfanatic: no, chrs applies chr() to a list of integers, and joins them and returns a string | ||
quietfanatic | ah | ||
so, .comb gives you a list of characters | |||
moritz | correct | ||
quietfanatic | but what if I want a list of, say, codepoints? | 18:47 | |
TimToady | but it seems like that the optimizer will end up optimizing both of those to some internal .ords/.chrs method, so why not expose it | ||
quietfanatic | because that takes up one more name. | ||
I mean two morw names | |||
moritz | quietfanatic: in theory, .comb/rx:codes/./) | ||
pmichaud | expose can be good; it's the names that are confusing, I think | ||
moritz | quietfanatic: but I don't really believe that it's a good idea to expose strings at different Unicode levels through a single type | 18:48 | |
that's old p5 think, where binary strings and text strings are also intermingled | |||
TimToady | well, we may well end up with CodeStr or some such as an intermediate between Buf and Str | 18:49 | |
pmichaud | jnthn: changing --prefix to '\rakudo' seems to have eliminated a lot of the C:'s from the config hash. Now I'll see if it works at all when on a drive other than c: :-) | ||
TimToady | or maybe they're called NFC, NFD, etc to keep those ideas straight too. | ||
quietfanatic | How about just a list of X where X is whatever? | 18:50 | |
pmichaud | although all that does for us is mean that the install still works when it ends up on drive 'd' or whatever. People will then ask "why did the installer put it on 'd'? I want it on 'c'!" | ||
quietfanatic | If I want to think of it as a continuous string, I'll use a Str. If I want to think of it as a list of X, why not a real list of X? | ||
pmichaud | ....on the plus side, if it works on any drive, that would mean it could work on a flash drive :-) testing that now. | 18:51 | |
moritz | quietfanatic: and what is X? words? | ||
TimToady | well, Buf is already positional | ||
quietfanatic | characters, codepoints, bytes, whatever strings could be composed of | ||
TimToady | but compact, whereas "real list" means high overhead to me | ||
moritz | quietfanatic: that's how I think of text most of the time (list of words and punctuation chars) | ||
masak | TimToady: I'd much rather see .comb».ord in my code than .ords, simply because I can mix and match .comb, », .ord and many other constructs to create a nice flexible result. .ords is a one-trick pony, like PHP's array_slice. | ||
TimToady | so Buf[Codes] is already more or less specced to be listy | 18:52 | |
quietfanatic | Ah, I guess I'm still used to langugaes where lists are not very high-overhead. | ||
pmichaud | idiomatically, I've been wondering lately if we should encourage a lot more use of », if only because it implies parallelization/optimization potential. | ||
quietfanatic | like C, where most are arrays or intrusive linked lists | ||
TimToady | masak: but we huffmanize for common one-trick ponies all the time | 18:53 | |
see "say" | |||
moritz | pmichaud: if we want that, we shoudl first benchmark if » is at least somewhat fast right now | ||
quietfanatic | say now does something different though :) | ||
masak | this is not an important huffminaztion. it's the relative lack of merit which bothers me. | ||
we should focus on overpopulating CORE with useful stuff :) | 18:54 | ||
quietfanatic | I don't think .ords is very common, personally | ||
masak | right. | ||
pmichaud | moritz: I suspect it's about as fast as .map; if not, it can certainly be made so. In fact, I bet it can be made a lot faster than .map because we don't have to worry about exceptions or laziness. | ||
masak | I could argue for .abss as well, because sometimes I just want to do .abs on all those list elements. | ||
moritz | pmichaud: iirc » uses .pick for non-determinstic order | 18:55 | |
pmichaud | moritz: we've been doing that simply to prevent people from misapplying » as map where order matters. | ||
I can still come up with a faster » that does things in a non-deterministic order, I think. | 18:56 | ||
TimToady | well, I guess I might argue that you really want .encode(NFG) instead of .ords, assuming a Buf[NFGChar] can listify appropriately | ||
moritz | pmichaud: that's fine, but I just suspect it won't be fast right now | ||
pmichaud | moritz: anyway, I was thinking primarily idiomatically. We should probably first agree that encouraging » use is a good thing; and if so I'll happily update the hyper code in rakudo to be a lot faster than it is :) | 18:57 | |
quietfanatic | Bufs can act like lists, can't they? They do Positional. | ||
pmichaud | yeah, I think that .ords is just some form of Buf :-) | ||
moritz | r: say 'OH HAI'.encode.list | 18:58 | |
p6eval | rakudo b87659: OUTPUT«79 72 32 72 65 73» | ||
TimToady | nr: my $x = Buf.new("foobar"); .say for @$x; | ||
p6eval | niecza v19-15-g051783d: OUTPUT«===SORRY!===Undeclared name: 'Buf' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37)  at /home/p6… | ||
..rakudo b87659: OUTPUT«This type cannot unbox to a native integer in method set_codes at src/gen/CORE.setting:6758 in method new at src/gen/CORE.setting:6750 in block at /tmp/QN9yo49rod:1» | |||
pmichaud | nr: my $x = "foobar".decode; .say for @($x); | ||
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: Unable to resolve method decode in type Str at /tmp/PwbqtDhOn5 line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3930 (module-CORE @ 564)  at /home… | ||
..rakudo b87659: OUTPUT«No such method 'decode' for invocant of type 'Str' in block at /tmp/wxi0PLd_SK:1» | |||
TimToady | nr: my $x = Buf.new(65..70); .say for @$x; | ||
p6eval | rakudo b87659: OUTPUT«656667686970» | ||
..niecza v19-15-g051783d: OUTPUT«===SORRY!===Undeclared name: 'Buf' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37)  at /home/p6… | |||
moritz | TimToady: there's no Buf.new(Str) constructor | ||
pmichaud: it's Buf.encode :-) | 18:59 | ||
pmichaud | moritz: what's the method for going the other way? | ||
TimToady | there should be one that handles ASCII, I suspect | ||
moritz | pmichaud: erm sorry, Str.encode, Buf.decode | ||
TimToady | and "foo" as a literal should allomorphically be both Buf and Str somehow, if the world were perfect | ||
pmichaud | r: .say for "foobar".encode | 19:00 | |
p6eval | rakudo b87659: OUTPUT«Buf:0x<66 6f 6f 62 61 72>» | ||
pmichaud | r: .say for "foobar".encode.list | ||
p6eval | rakudo b87659: OUTPUT«1021111119897114» | ||
pmichaud | r: .say for "foobar".encode[] | ||
p6eval | rakudo b87659: OUTPUT«1021111119897114» | ||
quietfanatic | sounds like you want Haskell-style overloaded literals :) | ||
TimToady | I'm sure I wanted them from before Haskell was on my radar | ||
TimToady and allomorphism go way back | 19:01 | ||
diakopter | i'd love for the regex engine to be able to operate on buf8 in utf8 mode | ||
while Im dreaming | 19:02 | ||
quietfanatic | I'd personally prefer an object that coerces two ways than a type-classed polymorphic thing that is two objects simultaneously. | ||
s/than/over | |||
pmichaud | jnthn: perhaps I should have the MSI always compile/install to "Program Files\Rakudo\..." ? | 19:04 | |
(and yes, it appears that I have Rakudo running from E:\rakudo just fine :) | 19:05 | ||
diakopter | make shre to install to the 64-bit one as appropiate | ||
moritz | pmichaud: and if you put it in %PATH%, can you call it from a different drive? | ||
pmichaud | moritz: checking | ||
moritz: ah, sadly no. | 19:06 | ||
so, it's not really relocatable to a different drive. | 19:07 | ||
jnthn | pmichaud: iirc, we have problems with paths with spaces in somewhere. | ||
Sure there's a ticket on that | |||
pmichaud | jnthn: okay. | 19:08 | |
moritz | iirc that's our fault, parrot can handle it | ||
pmichaud | So, I need to figure out how to get the installer to always go to C:\rakudo, no matter what. | ||
I'll work on that. | |||
19:09
spider-mario joined
|
|||
jnthn | moritz: I'm fairly sure t's an RT ticket I was thinking of. :) | 19:09 | |
*it's | |||
dalek | p/pirt: 16694d7 | jnthn++ | src/QAST/ (2 files): Get hll and namespace bits added. |
||
p/pirt: de2b269 | jnthn++ | src/QAST/PIRT.nqp: Oops, forgot this important memory-freeing line! |
|||
p/pirt: dd40b44 | jnthn++ | src/QAST/PIRT.nqp: Stub in node support for annotations, though not emitting them yet. |
|||
p/pirt: 7fcb20b | jnthn++ | src/HLL/Compiler.pm: Update HLL::Compiler.pir so it knows about PIRT as well as POST. |
|||
TimToady | quietfanatic: sure, that's the direction we went overall with P6's Cool, rather than the P5 approach, but the problem is how you cache to avoid reconversion of heavy things like strings | ||
mhasch | re allomorphism: for literals, it is not unusual for a language to make them compatible to different types at once. We did that in the 80's with Wirth languages all the time. | 19:10 | |
TimToady | also, Bufs, unlike Strs, are mutable | ||
moritz | don't we have immutable bufs too? | ||
we could use those instead of Buf | |||
quietfanatic | mutability vs. immutability is something I'd like to see abstracted out | 19:12 | |
rather than having two types for everything, one mutable and one immutable | |||
with names that don't convey that difference. | |||
moritz | that would be nice, yes | 19:13 | |
pmichaud | I don't know that we have many of the "two types for everything" situation now | ||
(so I agree we shouldn't introduce/extend it) | |||
quietfanatic | yeah, it's not actually that bad | 19:14 | |
but do we still have Seq, for instance? | 19:15 | ||
pmichaud | not currently | ||
moritz | it seems Blob is the immutable version of Buf | ||
pmichaud | and I've been hoping to not reintroduce Seq | ||
(and thus far, quite successful) | |||
moritz | ok, we have Buf/Blob, Pair/Enum, Hash/EnumMap | ||
pmichaud | I still don't think that Enum should be immutable; it's just a binding instead of a container relationship, like List/Array | 19:16 | |
same for Hash/EnumMap. And we already remarked a couple of days ago that EnumMap is the wrong basis for Hash. | |||
masak | aye. | ||
quietfanatic | Is Enum just a single pair-like thing? | 19:18 | |
moritz | yes | ||
quietfanatic | I'd have thought of an Enum as the whole listing | ||
moritz | an immutable pair | ||
and it's a terrible name | |||
quietfanatic | An enum should be the whole thing, not a piece | ||
pmichaud | I could be wrong, but I think Enum was trying to introduce a parallelism to List/Seq (that we've since eliminated) | 19:19 | |
quietfanatic | enumeration | ||
masak | quietfanatic: you'll have to take that up with S12. | ||
quietfanatic: it's quite clear on the enum/enumeration distinction, to the point where it actually defines it. | |||
quietfanatic | well | 19:20 | |
it's all names anyway | |||
but it seems to me that singular of enumeration is like | |||
number | |||
:) | 19:21 | ||
mhasch | I agree with moritz that the name "enum" is not very intuitive. | ||
masak | quietfanatic: sometimes it's a number. | ||
quietfanatic | numeral | ||
masak | quietfanatic: of course, it's a name, too. | ||
masak gets out of the bikeshed before things get "interesting" | |||
quietfanatic | right, I think 'enum' has too far evolved from its etymological origins to be compared to it. | 19:22 | |
timotimo | how about "symbol" instead? :| | ||
moritz | timotimo: too generic | 19:23 | |
timotimo | true. and "icon" makes one think about graphical things too much | ||
quietfanatic | well, it's a mapping of one symbol to a thing | ||
pmichaud | catalog. dictionary. mapping. | ||
index. | |||
timotimo | in't it the point that it isn't a catalog? just one thing inside a catalog? | ||
quietfanatic | how about just a constant Pair, hm? | ||
moritz | lets rename EnuMap to Mapping, and Enum to Mappy | ||
because it's a mini Map | |||
masak | :) | 19:24 | |
+1 | |||
quietfanatic | Maplet? | ||
Mappy sounds like a role | |||
masak | or Maplet. | ||
moritz | +1 to Maplet | ||
pmichaud | careful with "Map" named things; they pun with ".map" | ||
jnthn | Who has ever used the fact that you can assign to a Pair's value, ooc? | ||
masak | Mapka :) | ||
jnthn | Mapka! \o/ | ||
masak | \o/ | ||
pmichaud | jnthn: TimToady was remarking that he wanted => to produce mutable things. | ||
(at yapc::na) | |||
quietfanatic | like a cons pair, yes | 19:25 | |
pmichaud | and certainly when iterating over a hash's pairs, you expect to be able to assign to them. | ||
jnthn | r: my $a = foo => 42; say $a.value; $a.value = 100; say $a | ||
p6eval | rakudo 843534: OUTPUT«42"foo" => 100» | ||
jnthn | Hm, seems we already implement it | ||
pmichaud | correct. | ||
jnthn | Oh...the iteration thing is a decent use case I guess. | ||
pmichaud | r: my %h = a=>1, b=>2, c=>3; for %h { .value *= 2; }; say %h.perl | 19:26 | |
p6eval | rakudo 843534: OUTPUT«("a" => 1, "b" => 2, "c" => 3).hash» | ||
pmichaud | hmmm | ||
r: my %h = a=>1, b=>2, c=>3; for %h.pairs { .value *= 2; }; say %h.perl | |||
p6eval | rakudo 843534: OUTPUT«("a" => 1, "b" => 2, "c" => 3).hash» | ||
pmichaud | hmmmm | 19:27 | |
that looks like a bug to me. | |||
moritz | it is | ||
quietfanatic | r: my %h = a=>1, b=>2, c=>3; for %h.pairs <-> $p { $p.value *= 2; }; say %h.perl | ||
p6eval | rakudo 843534: OUTPUT«===SORRY!===Missing blockat /tmp/ZH3gTo9iFY:1» | ||
moritz | it seems we recontainerize at some point | ||
pmichaud | I think that .pairs must not be returning the correct binding. | ||
moritz | might be the .pairs | ||
TimToady | n: my %h = a=>1, b=>2, c=>3; for %h.pairs { .value *= 2; }; say %h.perl | 19:28 | |
p6eval | niecza v19-15-g051783d: OUTPUT«{"a" => 2, "b" => 4, "c" => 6}.hash» | ||
moritz | niecza++ | ||
pmichaud | i.e., .pairs is constructing a new Pair instead of creating a Pair that is properly bound. | ||
TimToady | p: my %h = a=>1, b=>2, c=>3; for %h.pairs { .value *= 2; }; say %h.perl | ||
p6eval | pugs: OUTPUT«\(\("a", 2), \("b", 4), \("c", 6))» | ||
moritz | r: my %h = a => 1; %h.pairs[0].value = 5; say %h.perl | ||
p6eval | rakudo 843534: OUTPUT«("a" => 1).hash» | ||
pmichaud | ...which is why I continue to say that the Enum/Pair relationship is wrong. | ||
(in Rakudo, at least.) | |||
pmichaud reads S12 to find out why Enum is "Enum" | 19:30 | ||
19:30
hoelzro|away is now known as hoelzro
|
|||
hoelzro | good evening P6 folk | 19:30 | |
timotimo | maybe it shouldn't be Enum, but ANum instead | 19:31 | |
quietfanatic | heheh | 19:32 | |
pmichaud | speculating a bit, I'd prefer to eliminate "Enum" as a separate type. Just go with "Pair", which binds a name+value pair. The => operator then produces a Pair with the rhs coreced into a scalar container. | ||
hoelzro | if I were to submit a test for Perl6, I take it I should submit it to perl6/roast? | 19:33 | |
pmichaud | if we need a separate Enum type, I'd want it to be for more than a "immutable/mutable" distinction. | ||
hoelzro: yes. | |||
hoelzro: or even better, just commit it directly to roast :) | |||
hoelzro | awesome =) | 19:34 | |
masak | pmichaud: +1 | ||
pmichaud | in other words, Pair is more analogous to what List does than what Array does. | ||
(List doesn't force mutability of its elements, it just binds to them) | 19:35 | ||
jnthn | pmichaud: To be clear: you're suggesting it's => that delivers the mutability, not Pair itself? | 19:36 | |
TimToady | .oO(cons cell) |
||
pmichaud | jnthn: yes. | ||
jnthn | pmichaud: Seems workable. | ||
pmichaud | and if you want a Pair that is bound, use :=> | ||
or something like that. | |||
jnthn | More smileys in Perl 6 syntax! | ||
moritz | +1 to a separate syntax | 19:37 | |
pairs are very often used for named arguments | |||
and those are bound RO by default | |||
pmichaud | alternatively, let => indicate the binding operation, and introduce a new one that handles mutability. =$> | 19:38 | |
moritz | =$> is somwhat neat | ||
quietfanatic | Now we're pushing the mutability system onto our operators | 19:39 | |
moritz | note that hashes could still automatically do mutability | ||
pmichaud | quietfanatic: actually, it's more "coerce" or "containerize" than "make mutable" | ||
quietfanatic | which, arguably, is what we've been doing all along with ::= and such | ||
pmichaud | quietfanatic: correct. | ||
moritz | so my %h = a => 1, b => 2; %h<a> = 5; # still works even if => constructs immutable pairs by default | 19:40 | |
quietfanatic | pmichaud: right | ||
pmichaud | moritz: yes, I still believe that Hash is analogous to Array | ||
quietfanatic | Well, a Hash isn't stored as a list of Pairs, is it? | ||
moritz | it's not | ||
it's only notionally one | |||
quietfanatic | I mean, it probably doesn't have actual Pair objects inside of it. | ||
though I suppose it could | 19:41 | ||
pmichaud | and I think it's useful to have a non-container-forcing version of Hash ("Mapping"), but it shouldn't be EnumMap which seems to want Positional characteristics. | ||
(and ordering) | |||
mhasch | (and distinct values) | 19:42 | |
moritz | that seems to be what EnumMap is meant to be, according to S12 | ||
quietfanatic | Just pun the Associative role? | ||
moritz | but then we shouldn't have Hash ~~ EnumMap | ||
quietfanatic | or, that role doesn't provide a default implementation so never mind | ||
moritz | which is what pmichaud++ said all along, iiuc | 19:43 | |
pmichaud | moritz: yes. :) | ||
I think EnumMap should be a Mapping that is also ordered. | |||
masak | sounds about right. | ||
pmichaud | and its pairs are bound directly to the enumerated values | ||
hoelzro | if I add a new (Rakudo failing) test to roast, should I mark it as "fudged" for Rakudo | ||
pmichaud | (currently called "Enumerations") | ||
moritz | hoelzro: yes | 19:44 | |
hoelzro is still getting his head around all of the projects and how they fit together | |||
pmichaud | hoelzro: yes, that would be helpful. But getting the test into roast is more important to us than having it properly fudged. | ||
hoelzro | ok | ||
pmichaud | i.e., we can fudge the test if we discover it doesn't work. we're mostly interested in having the test. | ||
quietfanatic still wants mutability as a graspable aspect of the type system | 19:45 | ||
more specifically, I'd like an easy mechanism to point to a mutable object and say "I want this except immutable" | |||
and vice-versa | |||
masak | there's something to be said for that. | 19:46 | |
pmichaud | quietfanatic: there's been a lot of discussion about "readonly" objects. | ||
masak | but I believe it's not as easy as it sounds. | ||
based on exactly those discussions. | |||
TimToady | graspable, but not shoved in the face of newbies | ||
quietfanatic | yes | ||
actually, the distinction between 'value' and 'container' types might be what I'm looking for | 19:47 | ||
at least, for making immutable things mutable | |||
like we have with putting Scalar objects in a List | 19:48 | ||
pmichaud | I need lunch; I'll bbiaw | ||
quietfanatic | but the other way around is a little more tricky | ||
maybe we don't need the other way around as much | |||
19:49
kaare_ left
|
|||
moritz | well, I'd like a simple way to mark user-defined classes so that their objects are immutable once they are created | 19:49 | |
for example Date objects are immutable, but the compiler doesn't really know that | |||
there just aren't any methods that mutate the values | |||
TimToady | so the compiler knows it, it just doesn't know it knows it | 19:50 | |
19:50
bonsaikitten joined
|
|||
TimToady | if this was Haskell we'd s/class/data/ for immutables, and confuse everyone | 19:51 | |
it always bothers me that "data" doesn't mean "data" in Haskell | 19:52 | ||
quietfanatic | it's more like 'struct' | ||
19:52
am0c left
|
|||
TimToady | data means metadata, and type means metatype :) | 19:53 | |
quietfanatic | I...don't think either of those is correct :) | ||
type is equivalent to typedef, by the way, so it really is type. | 19:54 | ||
TimToady | well, but my impression is that they're really type classes, somewhat generic | ||
quietfanatic | 'class' makes a type class. | ||
TimToady | well maybe it's class is metaclass I was thinking of | 19:55 | |
quietfanatic | Actually, it's more like if you could templatize a typedef in C++ | ||
that's more like it, yeah | |||
(re: metaclass) | 19:56 | ||
('type' is more like a templatized typedef) | |||
19:56
birdwindupbird joined
|
|||
TimToady | FP languages tend to unify the "meta" with the "generic" | 19:56 | |
quietfanatic | People show off object-oriented features and inheritance and such in Haskell's type classes, but they're hard to use since they're two levels of abstraction above normal object. | 19:57 | |
normal classes are only one level of abstraction up. | |||
TimToady | we put generics and metas 2 up, and classes 1 up in P6 | 19:58 | |
quietfanatic | generics? | ||
TimToady | roles | ||
quietfanatic | metas? | ||
masak | generic roles. | ||
quietfanatic | ah | ||
TimToady | .HOW | ||
masak | well, the MOP in general. :) | ||
TimToady | actually, .HOW is 3 up, since roles also have meta | 19:59 | |
quietfanatic | I think of a role as one level up though, just in kind of a different direction :) | ||
hoelzro | yay! first pull request to perl6/roast! | ||
jnthn | Roles have more than one manifestation in meta-space anyway :) | ||
quietfanatic | Also, there's a unique .HOW for every class, right? That suggests to me that it's on the same level | ||
maybe instead of levels of abstraction I mean levels of generalization. | |||
jnthn | The default MOP makes it that way, yes. | ||
TimToady | a unique metaobject, not necessarily a unique metaclass | 20:00 | |
quietfanatic | eh? huh? >.< | ||
quietfanatic is now getting confused | |||
what is a metaclass? | |||
TimToady | where metaclass means the class of the metaobject | ||
jnthn | All of the meta-objects for classes are instances of the class Meatmodel::ClassHOW. | ||
masak | there's a unique *instance* of ClassHOW per class. | ||
jnthn | Right. | ||
quietfanatic | Aah | 20:01 | |
TimToady | Meatmodel, yum | ||
masak | there's only one ClassHOW type, by default. | ||
quietfanatic: sorry, the terminology is confusing. | |||
I tend to avoid the word "metaclass" because it's overloaded :) | |||
quietfanatic | so ClassHOW is on the third leve. | ||
masak | I'd say it's second level still. | ||
quietfanatic | *level | ||
jnthn | uh, Metamodel :P | ||
TimToady | metacircularity at that level | ||
masak .oO( I never metacircularity I didn't yo dawg ) | 20:02 | ||
quietfanatic | yeah, at the point where classes generalize over classes, you don't really have levels any more. | ||
jnthn | Though if you chase 6model down far enough you get to "classes not invented yet". :) | ||
masak | \o/ | ||
that's *awesome*. | |||
you could build anything! | |||
jnthn | Being a class is really just a function of having a meta-object that makes you behave like one. | ||
quietfanatic | in fact, I'd say that a metaobject is already breaking the levels, being a first-level thing (an object) describing a second-level thing (a class) | ||
TimToady | hence the need to cheat on .HOW's args | 20:03 | |
masak .oO( in Perl 6, classes aren't built in, they're just a question of attitude ) | |||
quietfanatic | stay classy, #perl6 | ||
jnthn | I don't really thing of it in "levels", tbh. A meta-object is just an object that describes how another object works. | ||
moritz | so it's all(1, 3 ... *) | ||
:-) | |||
masak | moritz: at the very least! :P | 20:04 | |
TimToady | but it takes 2 to tango! | ||
masak | guys, you're making poor Bertrand Russel faint. | ||
Russell* | |||
quietfanatic | In Haskell you have to be acutely aware of what level you're working on. | ||
of course. | |||
moritz | you have to in any language | ||
TimToady | s/ <?after aware>.* // | ||
moritz | it's just that in Haskell the type checker will smite you if you forgot | 20:05 | |
quietfanatic | What I mean is, in Haskell the three levels are very distinct and completely incompatible. | ||
whereas Perl 6 contains all these back doors that make them the same level in the end. | 20:06 | ||
masak | in Smalltalk, too. | ||
but looking at the Smalltalk MOP nowadays makes it clear that it was married to inheritence in a way that no longer feels healthy. | |||
(Smalltalk 80, that is) | 20:07 | ||
TimToady | that's so we can teach people using "Oh, by the way, an X is just a special kind of Y." | ||
quietfanatic | Classical prototype-based object systems don't feel right to me | ||
for the same reason as making every method virtual by default. | |||
oh wait :) | |||
TimToady | well Smalltalk -> traits -> P6 roles | ||
which is why we have non-virtual methods too; they're just not the default like in C++ | 20:08 | ||
and they're really just disguised subs | 20:09 | ||
quietfanatic | inheritance in general is kind of a broken concept IMO | ||
what do you mean? | |||
submethods? | |||
TimToady | no, private methods | ||
quietfanatic | but private methods are private. | ||
TimToady | yup :) | ||
but you can trust others with the care and feeding of them | |||
we just don't make it easy | 20:10 | ||
masak | we have subs *and* submethods *and* private methods -- and the latter two can be combined. | ||
TimToady | we want people to do the right thing by accident most of the time | ||
masak | and I find I'm using all of those hiding mechanisms. | ||
quietfanatic | I don't think inheritance is the right thing though | ||
TimToady | uh, no, submethods have different visibility from private methods | ||
masak | aye. | ||
moritz | aye | ||
TimToady | submethods live in normal method namespace | 20:11 | |
jnthn | masak: Comining submethods and private methods is odd given private methods are non-virtual anyway. :) | ||
quietfanatic | The problem with inheritance and virtual methods is that they make each class actually mean two things: | ||
moritz | can submethods be multi? | ||
masak | jnthn: hm, I might not have done private submethods, come to think of it :) | ||
jnthn | (I presume you mean submethod !foo() { }) | ||
masak | moritz: yes. | ||
jnthn: yes. | |||
TimToady | 'course, even virtual methods are just functions if you scratch away the dispatcher | ||
jnthn | moritz: Mumble. | ||
quietfanatic | the interface the class exposes, and the default implementation of that interface, which have the same name and can't be separated. | ||
masak | moritz: private methods can be multi too, just not in Rakudo. | ||
TimToady: yes, but late binding makes them operationally very different even if they are "just functions". | 20:12 | ||
quietfanatic | default-virtual functions make keeping invariants pretty hard too. | 20:13 | |
s/functions/methods | |||
well, at this point I'm just ranting. I doubt I'll actually be able to change anything. | |||
moritz | quietfanatic: we do encourage role usage in Perl 6 for those reasons | ||
TimToady | masak: sure, but that's all in the dispatch that I just scratched away | ||
moritz | quietfanatic: and I guess there are places in core where we could more stuff out of classes and into roles | 20:14 | |
TimToady | quietfanatic: invariants are supposed to be calculatable at CHECK time, assuming there have been no declarations to keep a class open or non-final | ||
we just default finalization opposite to Java | 20:15 | ||
moritz | quietfanatic: so, concrete feedback on how to factor things in more reusable ways are very welcome | ||
quietfanatic | moritz: Roles are better, in that they encourage separation of interface from implementation, but they still allow you to do weird wrong things with them. | ||
TimToady | alternately, you can look at roles as final classes done right | ||
quietfanatic | (if you aren't disciplined) | ||
moritz | quietfanatic: you won't get Haskell-level type safety in p6, no matter what you'll try | ||
TimToady | well, I suppose one could define the Haskell subset(superset) of Perl 6 | 20:16 | |
moritz | it's still a dynamic language, late bound and thus less safe | ||
quietfanatic | TimToady: Explicit invariants made with 'where' clauses, sure, but other properties of classes you expect to hold may not hold if a subclass can override bits of it. | ||
yeah | 20:17 | ||
moritz: I get that, yeah | |||
TimToady | that's what "final" means, there are no subclasses | ||
quietfanatic | I'm more concerned with, as TimToady said, getting people to do the right thing by accident most of the time | 20:18 | |
and the majority of object-oriented tutorials explain things with inheritance and virtual methods. | |||
masak | r: role R[::T] { multi foo(T $x) { say "{T} $x!" } }; class C does R[Str] does R[Int] {}; given C.new { .foo("OH HAI"); .foo(42) } | 20:19 | |
p6eval | rakudo 843534: OUTPUT«No such method 'foo' for invocant of type 'C' in block at /tmp/s7ey2sVBWu:1» | ||
masak | huh. | ||
moritz | hoelzro: you now have commit access to roast, and a bunchof other repos in the perl6 organization | ||
ingy | moin | ||
masak | r: role R[::T] { multi method foo(T $x) { say "{T} $x!" } }; class C does R[Str] does R[Int] {}; given C.new { .foo("OH HAI"); .foo(42) } | ||
p6eval | rakudo 843534: OUTPUT«use of uninitialized value of type Str in string context in method foo at /tmp/7S5gG1LU8V:1 OH HAI!use of uninitialized value of type Int in string context in method foo at /tmp/7S5gG1LU8V:1 42!» | ||
masak | r: role R[::T] { multi method foo(T $x) { say "{T.^name} $x!" } }; class C does R[Str] does R[Int] {}; given C.new { .foo("OH HAI"); .foo(42) } | ||
p6eval | rakudo 843534: OUTPUT«Str OH HAI!Int 42!» | ||
masak | \o/ | ||
that's pretty nice. | |||
20:20
SamuraiJack left
|
|||
TimToady | S12:188 and S12:2130 talk about closing and finalizing, but we don't implement it yet | 20:20 | |
quietfanatic | (now I'm just complaining. Come one, TimToady, say something sharp and put me in my place :) | ||
TimToady | oh, is that what you're gunning for? :) | ||
quietfanatic | not exactly, but whatever | ||
ingy | Scissors! | 20:21 | |
hoelzro | moritz: thanks! | ||
masak pictures ingy running with scissors | |||
ingy: be careful! o.O | |||
hoelzro | should I just push my change to roast? | ||
TimToady | when I was eating lunch and watching quietfanatic++ enter battle on #perl6, I was desperately trying not to think about Denethor :) | ||
moritz | hoelzro: you should adjust your system clock :-) | 20:22 | |
ingy | masak: I've made it this far running with scissors :) | ||
moritz | hoelzro: temp $value = $value + 1; # doesn't do what you think, I guess | ||
hoelzro | moritz: what *should* it do? | ||
TimToady | we always raised our kids by treating them like kids when they behaved like kids, and treating them like adults when they behaved like adults | ||
moritz | hoelzro: temp acts immediately | 20:23 | |
hoelzro | eesh, my clock is f'ed up | ||
TimToady thinks quietfanatic++ has been behaving like an adult | |||
moritz | hoelzro: ie it's like temp $value; $value = $value + 1 | ||
quietfanatic | So behaving like an adult is going online and fussing about things you don't like? | ||
moritz | hoelzro: which means that $value is Any, and you get a warning from the + | ||
quietfanatic | :) | ||
hoelzro | moritz: those two are equivalent? | ||
moritz | quietfanatic: there's fussing and there's fussing | ||
hoelzro: yes | |||
hoelzro | ok, that's what I expected | ||
masak | r: say "fussing" ne "fussing" | 20:24 | |
p6eval | rakudo 843534: OUTPUT«False» | ||
hoelzro | in Perl 5 speak, it's local $value = $value; $value += 1, right? | ||
masak | moritz: Rakudo claims they're the same, though :P | ||
jnthn | r: my $a = 1; { temp $a = $a + 1; say $a; }; say $a | ||
p6eval | rakudo 843534: OUTPUT«21» | ||
moritz | hoelzro: no | ||
20:24
cognominal joined
|
|||
jnthn | temp doesn't throw away the old value | 20:24 | |
moritz | erm | ||
wait | |||
now I'm confused | |||
masak | why? | ||
jnthn | That's what "my" would do :) | ||
hoelzro | me too =/ | ||
masak | nope. | 20:25 | |
moritz | in p5, 'local $x = $x' the $x on the RHS is the old $x, right? | ||
masak | r: my $a = 1; { my $a = $a + 1; say $a; }; say $a | ||
hoelzro | temp is like local, isn't it? | ||
p6eval | rakudo 843534: OUTPUT«use of uninitialized variable $a of type Any in numeric context in block at /tmp/sOzU03jliG:111» | ||
moritz | and in p6 it's the new $x, right? | ||
masak | r: my $a = 1; { my $a = $OUTER::a + 1; say $a; }; say $a | ||
p6eval | rakudo 843534: OUTPUT«21» | ||
masak | right. | ||
moritz | hoelzro: temp is like local, but I think the time it takes place is different | ||
jnthn | temp takes effect where it's written. | ||
moritz | right | 20:26 | |
jnthn | It doesn't declare a new variable. | ||
ingy | masak: is there a p6 implementation that supports pcre style regexes yet? | ||
jnthn | It just makes sure that we restore the original value. | ||
hoelzro | ok, hang on | ||
jnthn | (at LEAVE time) | ||
hoelzro | temp $x; is like local $x = $x; | ||
right? | |||
TimToady | yes | 20:27 | |
yet another default we changed | |||
masak | ingy: no, I don't think so. | ||
pmichaud would know, though. | |||
didn't PGE have one? | 20:28 | ||
mhasch | can you temp a lexical variable? | ||
TimToady | didn't pugs have one? | ||
mhasch: yes | |||
hoelzro | so temp $x = $x +1; saves the value of $x and increments it in the "new" version, right? | ||
so before: 0 after: 1? | |||
TimToady | you can just say temp $x += 1 | ||
masak | TimToady: Pugs had some kind of bridge to Perl 5 there, methinks. | 20:29 | |
TimToady | that won't work with local | ||
hoelzro | ok, that's what I thought. | ||
so...doesn't my test make sense? | |||
moritz | hoelzro: I think it does, sorry for all the noise | 20:32 | |
hoelzro | ok, cool =) | ||
should I just push it up to roast? | 20:33 | ||
moritz | yes | ||
hoelzro | ok = | ||
dalek | ast: e0f4d0f | (Rob Hoelz)++ | S04-blocks-and-statements/temp.t: Add test for temp in recursive calls |
||
20:36
pmurias joined
|
|||
pmurias | hi | 20:36 | |
is it normal for nqp code to segfault when it's unable to match a multi? | |||
moritz | I hope not :-) | 20:38 | |
nqp: multi f(int $x) { say('Int') }; f('str') | |||
p6eval | nqp: OUTPUT«Sorry, no proto sub in scope, and auto-generation of protos is not yet implemented. at line 2, near "; f('str')"current instr.: 'nqp;HLL;Grammar;panic' pc 22407 (src/stage2/gen/NQPHLL.pir:8553) (src/stage2/gen/NQPHLL.pm:326)» | ||
moritz | nqp: proto f(|$) {*}; multi f(int $x) { say('Int') }; f('str') | ||
p6eval | nqp: OUTPUT«Routine declaration requires a signature at line 2, near "(|$) {*}; "current instr.: 'nqp;HLL;Grammar;panic' pc 22407 (src/stage2/gen/NQPHLL.pir:8553) (src/stage2/gen/NQPHLL.pm:326)» | ||
moritz | nqp: proto f(|$) {*}; multi f(int $x) { say('Int') }; f('str') | ||
p6eval | nqp: OUTPUT«Routine declaration requires a signature at line 2, near "(|$) {*}; "current instr.: 'nqp;HLL;Grammar;panic' pc 22407 (src/stage2/gen/NQPHLL.pir:8553) (src/stage2/gen/NQPHLL.pm:326)» | ||
moritz | nqp: proto f(*@) {*}; multi f(int $x) { say('Int') }; f('str') | ||
p6eval | nqp: OUTPUT«Routine declaration requires a signature at line 2, near "(*@) {*}; "current instr.: 'nqp;HLL;Grammar;panic' pc 22407 (src/stage2/gen/NQPHLL.pir:8553) (src/stage2/gen/NQPHLL.pm:326)» | ||
masak | pmurias! \o/ | ||
moritz | nqp: class A { }; proto f(*@) {*}; multi f(A $x) { say('A') }; f('str') | 20:39 | |
p6eval | nqp: OUTPUT«Routine declaration requires a signature at line 2, near "(*@) {*}; "current instr.: 'nqp;HLL;Grammar;panic' pc 22407 (src/stage2/gen/NQPHLL.pir:8553) (src/stage2/gen/NQPHLL.pm:326)» | ||
moritz | nqp: class A { }; proto f(*@args) {*}; multi f(A $x) { say('A') }; f('str') | ||
p6eval | nqp: OUTPUT«(signal SEGV)» | ||
masak | o.O | ||
masak submits nqpbug | |||
moritz | pmurias: I'm sure that's not intended behavior :-) | ||
masak | github.com/perl6/nqp/issues/49 | 20:40 | |
moritz | pmurias++ | 20:41 | |
masak++ | |||
jnthn | Maybe that you're passing it something that ain't a 6model object. | ||
moritz | nqp: class A { }; class B { }; proto f(*@args) {*}; multi f(A $x) { say('A') }; f(B); | ||
p6eval | nqp: OUTPUT«(signal SEGV)» | ||
moritz | jnthn: I think B is a 6model object too | 20:42 | |
jnthn | ah | ||
Then I've no idea what's going on. | |||
Investigation welcome. | |||
pmurias | jnthn: QAST::Block | 20:43 | |
jnthn | That's one. | ||
Well, all of QAST::Compiler hangs off multi-dispatch on QAST nodes, so clearly it can work, if you align the stars correctly. ;-) | 20:44 | ||
pmurias | jnthn: I copied the catch all unknown error reporting thing | 20:45 | |
jnthn | pmurias: I'm...not entirely sure which thing you're meaning? | 20:46 | |
moritz | r: macro funny_nil { quasi { {;}() } }; say funny_nil() === Nil | 20:48 | |
p6eval | rakudo 843534: OUTPUT«True» | ||
moritz | masak: that test passes in t/spec/S06-macros/macros-d1.t since the toqast merge | ||
20:48
zby_home_ left
|
|||
moritz | (erm, is still skipped, can be unfudged) | 20:48 | |
masak | ooh | 20:49 | |
moritz++ | |||
moritz | autounfudge it an endless source of karma, it seems :-) | ||
I should really get a patent on it! | 20:50 | ||
pmurias | jnthn: multi method as_post($unknown) {...} | ||
jnthn | pmurias: Ah, OK... Did that help? | ||
moritz | I mean, on a machine doing an autounfudge :-) | ||
masak | that might even work. | 20:51 | |
pmurias | jnthn: it replaces a segfault with an error message | ||
if I add a new file to rakudo do I have to register it in the build system? | 20:53 | ||
moritz | pmurias: yes | ||
pmurias: you need to add it to tools/build/Makefile.in | 20:54 | ||
dalek | ecs: 5dfd996 | larry++ | S04-control.pod: resumable failures for coercions fixes #17 |
||
ast: 8a9dbc0 | moritz++ | S (4 files): various rakudo unfudges |
20:57 | ||
pmurias | is there vim syntax highlighting for nqp? | 20:59 | |
or should I just use the regular p6 one | 21:00 | ||
jnthn | Even Perl 5 highlighters make a decent job of NQP, apart from regexes, where things mess up... | ||
Well, grammars especially. | |||
moritz | the p6 one is quite OK for nqp | ||
jnthn | Ah, I missed the "I ahve a p6 one to hand" bit of that. | 21:01 | |
pmurias | jnthn: I only thought about the p6 one after asking the question ;) | 21:02 | |
21:03
Coleoid left
|
|||
pmurias | is QAST documented somewhere? | 21:04 | |
dalek | ast: 45454e3 | moritz++ | S04-blocks-and-statements/temp.t: clean up temp + recursion tests * remove redundant tests * add test labels * fudge only the failing test for rakudo |
21:06 | |
masak | lol, I blogged! \o/ strangelyconsistent.org/blog/july-2...t-synonyms | 21:08 | |
pmurias: no, but the source code is in nqp, and very approachable. | 21:09 | ||
as in, both "in the nqp repo" and "written in nqp". | |||
21:10
bruges_ left
|
|||
jnthn | It really wants some decent docs, but I didn't get a round tuit yet. | 21:10 | |
Now that we know that it actually works well enough to build Rakudo though... :) | |||
dalek | ecs: c939721 | larry++ | S (3 files): clean up some ucfirst fossils fixes #15 |
21:11 | |
21:11
snearch left,
bruges joined
|
|||
hoelzro | hey guys, I wrote up a test illustrating a strange issue I saw when working on my chat bot: gist.github.com/3194797 | 21:12 | |
it currently doesn't pass; is this a bug, or am I being stupid? | |||
masak | hoelzro: rt.perl.org/rt3/Ticket/Display.html?id=113958 | 21:13 | |
hoelzro | ah, thanks | ||
masak bows | |||
doesn't solve your problem, of course :/ | |||
but now you know it's not just you. | |||
hoelzro | oh, haha | ||
I forgot about that =/ | |||
masak | hah, it was you last time too :P | 21:14 | |
hoelzro | I know! | ||
masak | this is why we need new people: they find new bugs for us | ||
again and again :P | |||
hoelzro | I spent too much time getting a working Rakudo =P | ||
well, that's part of why I decided to write my bot in Perl6 | |||
can anyone suggest a workaround? | 21:15 | ||
masak | hoelzro: do you know about github.com/TiMBuS/Net--IRC/ , by the way? | ||
hoelzro | masak: I did not! | 21:16 | |
my chat bot is for XMPP, though =) | |||
masak | ah. | ||
still, might be good inspiration. | |||
hoelzro | so I just need to write an XML parser | ||
oh, good point! | |||
masak | oh noes not another XML parser... :P | ||
hoelzro | is there one for Perl6? | 21:17 | |
masak | hoelzro: why in the world would you want to parse XML in Perl 6, aside for the pure exercise value of writing a moderately big grammar? | ||
"write an XML parser" seems to be a phase that about 15% of the neophytes go through... | |||
I haven't seen a complete one, no. | |||
hoelzro | masak: oh, I don't care if it's written in Perl6 or not; I would just need an XML parser for an XMPP client | ||
masak | oh, good. | ||
hoelzro | right now I'm using a very dodgy hack | ||
I'd rather not waste my time writing an XML parser =) | 21:18 | ||
I have cooler stuff to do! | |||
masak | indeed. | 21:19 | |
(and writing an XML parser may look trivial, but... it isn't.) | |||
timotimo | huh? i'll just throw a regex at it and voila! | 21:20 | |
arnsholt | hoelzro: If you feel up for the challenge, you could try wrapping libxml with Zavolaj | 21:21 | |
Iæm not quite sure if quite all the pieces required are there, but most of them should be there | |||
hoelzro | after I get my bot working, I might tackle it =) | ||
arnsholt | If you find out what's missing, I can probably implement them =) | ||
hoelzro | it's a pretty important library to have! | ||
masak | aye. | 21:22 | |
masak would love to have it | 21:23 | ||
arnsholt | Quite. But now, sleep | ||
zzzzz & | |||
21:23
birdwindupbird left
|
|||
masak | ...and to have nice repr thingies for access from Perl 6. | 21:23 | |
arnsholt: 'night. dream of people wrapping cool things with Zavolaj. | |||
sorear | good * #perl6 | 21:28 | |
pmurias | sorear: hi | ||
is there a way to dump the QAST for a given bit of code? | |||
--target=past gives me strange errors | 21:29 | ||
masak | sorear! \o/ | ||
pmichaud | jnthn: ping | 21:32 | |
jnthn | pmichaud: pong | ||
pmichaud | I have a new .msi created; could you test it and see if it installs to your c: drive this time? | 21:33 | |
jnthn | sure; url? | ||
pmichaud | just a sec, uploading | ||
jnthn | .oO( mmm...url...sounds like öl... ) |
||
pmichaud | pmichaud.com/sandbox/rakudo-star-2012.07-3.msi | 21:34 | |
jnthn | pmichaud: Trying. | 21:35 | |
pmichaud: yes, installed on C: and works \o/ | 21:39 | ||
pmichaud | okay, I'll replace the one on github with this one then. | ||
jnthn | pmichaud++ | 21:40 | |
pmichaud | thanks for the quick check | 21:41 | |
jnthn | np | 21:42 | |
Just waiting for builds anyway. | |||
jnthn is debugging building Rakudo using PIRT | |||
dalek | ar: d961bd7 | pmichaud++ | skel/tools/build/star-product.wxs: Update Wix file to force installation to C:\ . |
21:44 | |
pmichaud | okay, I'm going to go play with robots for a while. :-) bbl | 21:45 | |
jnthn | Have fun! | 21:49 | |
21:56
larks left
21:58
larks joined
21:59
seldon left
|
|||
hoelzro | is there a way to compile a regular expression from a string without using eval? | 21:59 | |
ex. Regex.new("^ $foo") | |||
japhb | What base class do Perl6::Metamodel::* classes have? What metaclass do they have? Is there a way to introspect them? | 22:01 | |
jnthn | /^ <$foo>/ | 22:02 | |
hoelzro | jnthn: thanks! | 22:03 | |
22:03
kaxing left
|
|||
jnthn | japhb: They're weird; initial NQPMu but then post-bootstrap they are twiddled to have Any. | 22:03 | |
22:04
kaxing joined
|
|||
japhb | jnthn, Ah, interesting. | 22:04 | |
22:05
larks left
|
|||
japhb | Are they all supposed to have metaclass Perl6::MetaModel::ClassHOW, just like "normal" classes? | 22:05 | |
22:07
larks joined
|
|||
jnthn | No | 22:07 | |
japhb | r: say Perl6::Metamodel::ClassHOW | ||
p6eval | rakudo 843534: OUTPUT«Could not find symbol '&ClassHOW' in method <anon> at src/gen/CORE.setting:9629 in <anon> at src/gen/Metamodel.pm:2304 in any find_method_fallback at src/gen/Metamodel.pm:2302 in any find_method at src/gen/Metamodel.pm:843 in <anon> at src/gen/BOOTSTRAP.p… | ||
jnthn | r: say Metamodel::ClassHOW | ||
p6eval | rakudo 843534: OUTPUT«Perl6::Metamodel::ClassHOW()» | ||
jnthn | Hmm. It lies :) | ||
japhb | Oh interesting | ||
jnthn | Anyway, no, it's own .HOW is actually an instance of NQPClassHOW. | 22:08 | |
*its | |||
japhb | Is that true of all Metamodel classes, or just ClassHOW? | ||
jnthn | All. | ||
japhb | Ah, OK. | 22:09 | |
jnthn | It's factored primarily with roles. | ||
The only bit of inheritnace in there is that GrammarHOW inherits from ClassHOW. | |||
japhb | Yeah, I'm getting back to work on my "visualizing the type graph" project, and discovered that the handling of the Metamodel classes/roles appears ... very fishy. | 22:10 | |
22:11
larks left
|
|||
japhb | jnthn, Hmmm, I have MethodDispatcher, MultiDispatcher, and WrapDispatcher all inheriting from BaseDispatcher. Is that wrong? | 22:11 | |
22:12
lue joined
|
|||
lue | hello world o/ | 22:12 | |
masak | lue! \o/ | ||
lue: you have your inventory now. | |||
jnthn | japhb: Ah...that sounds sane. | ||
masak | lue: and shortcuts for directions, though not yet for verbs. that comes tomorrow. | 22:13 | |
22:13
larks joined
|
|||
lue reads blog posts | 22:13 | ||
"So you panic for three moves and then you die." :) | 22:16 | ||
masak | yup. | ||
japhb | jnthn, why do the Metamodel classes have names that start with Perl6:: in their definition, but appear in the namespaces without that prefix? | ||
jnthn | japhb: They're defined with the prefix in NQP, but exported differently. | ||
japhb: But really I think .WHAT.gist ain't meant to include the fully qualified name. | 22:17 | ||
masak | r: module A { class B::C {}; say B::C.new.^name }; | ||
p6eval | rakudo 843534: OUTPUT«B::C» | ||
masak | r: module A { class B::C {} }; say A::B::C.new.^name | ||
p6eval | rakudo 843534: OUTPUT«B::C» | ||
masak | +1 | ||
hoelzro | is there a way to retrieve a role from a name? | 22:18 | |
ex. I have a role 'Hexe::Plugin::Echo' | |||
masak | r: role R {}; class C does R {}; say C.new ~~ R | ||
p6eval | rakudo 843534: OUTPUT«True» | ||
hoelzro | and I want to dynamically apply the role of that name to an object | ||
ex. $object does %roles($role); | |||
japhb | jnthn, sure, I get the mechanism ... I meant "why" as in "what's the reasoning for that difference?" Is it because Metamodel:: within NQP would refer to NQP's metamodel, so this is how you create something in NQP's world that needs to appear in Perl6's world? | ||
masak | r: role R {}; class C {}; my $c = C.new but R; say $c ~~ R | 22:19 | |
p6eval | rakudo 843534: OUTPUT«True» | ||
japhb | s/appear/appear under the same name/ | ||
22:19
lue left
|
|||
hoelzro | masak: right, but I only have the string 'R' | 22:20 | |
tadzik | ::('R') may work | ||
jnthn | japhb: I'm not sure there's a reason beyond me defining it one way in the first place, and then feeling it was a bit unweildy. | 22:21 | |
japhb | Ah, OK | ||
22:21
lue joined
|
|||
dalek | p/pirt: e27a5eb | jnthn++ | src/ (2 files): We still need to keep the Regex nodes emitting POST for the sake of NQP (which doesn't use the rest of QAST yet); this should make that possible. |
22:22 | |
p/pirt: 69bc286 | jnthn++ | src/QAST/PIRT.nqp: Labels need to automatically be uniquified. |
|||
p/pirt: 8c14cea | jnthn++ | src/Q (2 files): Various fixes to regex compilation; this also means we'll be able to eliminate the PAST::Node usages that remain in Rakudo's Actions. |
|||
p/pirt: 1f5406a | jnthn++ | src/QAST/Compiler.nqp: One more regex tweak to get regex compilation under PIRT OK. |
|||
p/pirt: dc95f4a | jnthn++ | src/QAST/PIRT.nqp: For hysterial raisons, PIRT nodes should stringify to their results (for now). |
|||
p/pirt: 17a5ef3 | jnthn++ | src/QAST/Compiler.nqp: Final fix needed to get PIRT able to build Rakudo. |
|||
masak | r: role R {}; class C {}; my $c = C.new but ::('R'); say $c ~~ R | ||
p6eval | rakudo 843534: OUTPUT«True» | ||
lue | .oO(stupid randomly panicking kernel...) |
||
tadzik | jnthn: what's pirt? | ||
masak | tadzik: PIR in tree representation. | ||
tadzik | nice | ||
dalek | kudo/pirt: 99d850b | jnthn++ | src/Perl6/Actions.pm: Initial update to get Rakudo to build with nqp/pirt. Eliminates the final PAST::Node usages also. Some test failures; seems CORE.setting memory is a bit lower with this, which was the aim. |
22:25 | |
jnthn | tadzik: It's a replacement for POST that I hope reduces build memory a bit further when doing CORE.setting compilation. | ||
hoelzro | tadzik: no dice =/ | ||
jnthn | tadzik: Today it's gone from not existing to being able to replace POST for the Rakudo build. | 22:26 | |
Well, modulo a relatively small number of new test failures. | |||
tadzik | awesome | ||
tadzik builds | 22:27 | ||
dalek | kudo/pirt: 2b57323 | jnthn++ | src/Perl6/Grammar.pm: Fix user defined ops, which probably deals with many of the test regressions. |
22:29 | |
jnthn | tadzik: Grab ^^ first. | ||
It probably deals with most of the new failures. | 22:30 | ||
lue considers attempting pirt | 22:32 | ||
jnthn | lue: It's got some rough edges and I won't get to them today. | ||
Now too many though, looking at this test run. | 22:34 | ||
Yeah, few enough test files that you can count 'em on your fingers. Not bad to say I replaced an entire compilation stage in a day's hacking. :) | 22:35 | ||
japhb | jnthn++ | 22:37 | |
dalek | c: fe96631 | (Geoffrey Broadwell)++ | type-graph.txt: Fix missing superclass: Perl6::Metamodel::GrammarHOW is Perl6::Metamodel::ClassHOW |
||
c: e0db752 | (Geoffrey Broadwell)++ | lib/Perl6/TypeGraph.pm: Defaulting superclass to Any should happen after roles get a chance to supply superclasses |
|||
jnthn | Seems my first cut of the code is no slower (despite being in NQP - a HLL - rather than PIR) and sees us use less memory. | 22:38 | |
japhb | That is rather awesome. | 22:39 | |
22:39
MayDaniel left
|
|||
diakopter | 2 | 22:43 | |
dalek | ecs: 76c977a | larry++ | S05-regex.pod: :p is incompatible with scanners :p may not be used with :ex, :ov, :g, :nth, or :x modifiers. fixes #16 |
22:45 | |
jnthn | OK, time for some rest. | 22:49 | |
'night o/ | |||
tadzik | 'night! | 22:53 | |
22:56
hoelzro is now known as hoelzro|away
23:08
sudokode left
23:10
spider-mario left,
sudokode joined
|
|||
dalek | ecs: 003891a | larry++ | S0 (3 files): Explication of lazy warnings Lazy warning are to be used for +, ~ and ? conversions, as well as for the ??? stub. |
23:23 | |
ecs: 838a4b9 | larry++ | S04-control.pod: relax prev to numeric/string conversion This is all Stringy/Numeric conversion, not just the ~/+ prefix operators. (And Bool conversion always succeeds, so ? need not apply). |
|||
23:32
larks left,
larks joined
23:42
takadonet left
23:47
pmurias left
|