perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/
Set by mncharity on 25 March 2009.
00:00 eternaleye left 00:04 goksie left 00:11 eternaleye joined 00:13 jferrero left, Whiteknight joined 00:18 Whiteknight is now known as wknight8111 00:24 justatheory joined 00:44 cls_bsd joined, payload1 left 00:47 justatheory left 00:52 lumi left
LylePerl rakudo: "hello".say 00:52
p6eval rakudo c4f676: OUTPUT«hello␤»
LylePerl rakudo: "hello".print
p6eval rakudo c4f676: OUTPUT«hello»
01:05 lumi joined 01:08 Grrrr joined 01:12 eternaleye left, eternaleye joined 01:14 wknight8111 left 01:23 samlh joined 01:36 Limbic_Region left 01:37 bacek__ joined 01:40 bacek_ left 01:42 dukeleto joined 01:43 eternaleye left 01:57 nihiliad left 02:04 redicaps joined 02:20 justatheory joined, bacek joined 02:40 amoc joined 02:44 nihiliad joined 02:52 FurnaceBoy left 03:15 cspencer joined 03:19 jamtech joined 03:22 nbrown left 03:25 jamtech left 03:28 skids_ left 03:29 jamtech joined 03:31 jamtech left, jamtech joined 03:41 jamtech left 03:44 orafu joined 04:00 redicaps left 04:03 eternaleye joined 04:04 SamB left 04:26 mikehh joined 04:27 FurnaceBoy joined, cspencer left 04:33 FurnaceBoy left 04:35 twigil joined
mikehh I built rakudo (c4f6736) on parrot r38376 about 4/5 hours ago and left make spectest running - it failed on t/spec/S06-signature/named-parameters.rakudo 04:35
Parse errors: Bad plan. You planned 75 tests but ran 45
i then ran ./perl6 t/spec/S06-signature/named-parameters.rakudo and it PASSed 04:36
04:37 twigil left 04:38 orafu left, orafu joined
s1n1 rakudo: run("env PATH=\$PATH:junktest echo \$PATH") 04:40
p6eval rakudo c4f676: OUTPUT«/usr/local/bin:/usr/bin:/bin:/usr/games␤»
s1n1 hmm, can i not set environment variables inline like that in rakudo or did i do something wrong there? 04:41
rakudo: $*ENV{TEST} = 'junk'; say $*ENV{TEST} 04:42
p6eval rakudo c4f676: OUTPUT«Could not find non-existent sub TEST␤current instr.: '_block14' pc 65 (EVAL_17:44)␤»
04:46 alester_ joined 04:49 masak joined
masak morning, gather-camels. 04:50
lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
masak @messages
lambdabot frettled said 6h 5m 37s ago: (expt masak 2) for that blog post
masak :P
05:03 tarbo2 left
s1n1 rakudo: %*ENV{TEST} = 4; say %*ENV{TEST 05:06
akk
p6eval rakudo c4f676: OUTPUT«Statement not terminated properly at line 1, near "{TEST"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:85)␤»
s1n1 rakudo: %*ENV{TEST} = 4; say %*ENV{TEST}
p6eval rakudo c4f676: OUTPUT«Could not find non-existent sub TEST␤current instr.: '_block14' pc 65 (EVAL_17:44)␤»
masak s1n1: no autoquoting in .{} in Perl 6
s1n1 oh heh, i'm a tard 05:07
%*ENV{'TEST'} = 4; say %*ENV{'TEST'}
rakudo: %*ENV{'TEST'} = 4; say %*ENV{'TEST'}
p6eval rakudo c4f676: OUTPUT«␤»
s1n1 hmm 05:08
just newline?
am i just too sleep deprived??
masak the newline is due to 'say'.
s1n1: no, it's %*ENV that's broken.
been thus since last summer.
there's an extensive RT ticket about it.
05:09 s1n1 is now known as s1n
masak [perl #57400] 05:09
s1n masak: thanks 05:10
masak rt.perl.org/rt3/Ticket/Display.html?id=57400
szabgab good morning ppl 05:11
rakudo: say 1 ^^ 1
p6eval rakudo c4f676: OUTPUT«␤»
szabgab rakudo: say 1 ^^ 1 ^^ 1 05:12
p6eval rakudo c4f676: OUTPUT«1␤»
szabgab rakudo: say [^^] 1, 1
masak szabgab: mornin'
p6eval rakudo c4f676: OUTPUT«say requires an argument at line 1, near " [^^] 1, 1"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:85)␤»
szabgab is masak filing a bug ?
masak szabgab: he could be, if you like.
05:13 tarbo2 joined
szabgab ^^ is bitwise xor right ? 05:13
masak szabgab: I thought it was Bool xor.
szabgab: ?^ ought to be bitwise.
szabgab let me look at my slides :-)
actually I meant bool xor, yes
I am just still asleep a bit 05:14
masak hm, or maybe +^ is bitwise...
anyway,
masak files
szabgab in any case the hyper should work
masak aye.
eternaleye s1n: Also, when you did run("env PATH=\$PATH:junktest echo \$PATH"), it didn't do what you intended: the shell interpreted the second $PATH, not echo - thus, what the shell ran was 'env PATH=whatever:path:was:junktest echo whatever:path:was'. 05:15
What you want is more like run("env PATH=\$PATH:junktest sh -c 'echo \$PATH'") 05:16
rakudo: run("env PATH=\$PATH:junktest sh -c 'echo \$PATH'")
p6eval rakudo c4f676: OUTPUT«/usr/local/bin:/usr/bin:/bin:/usr/games:junktest␤»
eternaleye masak: +^ is integer xor, ~^ will be Buf xor 05:19
masak eternaleye: right.
05:30 sri_kraih joined 05:45 meppl joined 05:46 ejs joined, DemoFreak joined
pugs_svn r26475 | szabgab++ | fix internal link 05:51
06:01 orafu left, orafu joined 06:04 justatheory left
pugs_svn r26476 | szabgab++ | fix some smartlinks 06:10
06:20 ejs left 06:27 tarbo2 left 06:30 tarbo2 joined
pugs_svn r26477 | moritz++ | [t/spec] a few more smartlink fixes 06:31
06:38 iblechbot joined 06:40 payload joined 06:46 ejs joined 06:51 mistermoo joined, orafu left, orafu joined 06:52 nihiliad left 06:55 mistermoo left
pugs_svn r26478 | szabgab++ | fix some more smartlinks 06:56
06:58 ejs left 07:03 alester_ left
masak takes a stroll through the RT tickets 07:03
07:05 ejs joined
szabgab docs/Perl6/Spec/S14-roles-and-parametric-types.pod has mixed newlines 07:05
shall I dos2unix it ?
masak feel free.
pugs_svn r26479 | szabgab++ | dos2unix 07:07
szabgab any idea where did the 'Filehandles, files, and directories' section moved from S16 ?
masak buubot: spack Filehandles 07:08
buubot masak: S16-io.pod:1
masak hm.
pugs_svn r26480 | szabgab++ | t/spec fix more smartlinks 07:14
07:14 ejs left
masak rakudo: enum Weekday<Monday Tuesday>; say Tuesday.WHAT 07:24
p6eval rakudo c4f676: OUTPUT«␤»
moritz_ rakudo: enum Weekday<Monday Tuesday>; say Tuesday.perl
p6eval rakudo c4f676: OUTPUT«.new()␤»
moritz_ ouch.
but I think we have a ticket for that one
masak aye. 07:25
moritz_ rakudo: enum Weekday<Monday Tuesday>; say Weekday::Tuesday.perl
p6eval rakudo c4f676: OUTPUT«.new()␤»
masak rakudo: enum Weekday<Monday Tuesday>; say Weekday.WHAT
p6eval rakudo c4f676: OUTPUT«␤»
07:38 payload left
masak std: sub foo($.bar) { ... } 07:39
p6eval std 26480: OUTPUT«ok 00:02 36m␤»
masak gasps
hm. maybe it's that "STD only knows how to parse, not how to interpret" detail playing out again. 07:40
moritz_ that's a bit useless.
$.bar is $(self.bar) 07:41
so having a method call as a parameter is brain dead
masak moritz_: I beg to differ. 07:42
ISTR S12 special-cases this as parameters binding to automatic attribute assignments.
masak looks
hm, no, I'm wrong here. it's $!foo that does that. 07:44
07:44 goksie joined 07:45 ejs joined
masak TimToady: is the $!foo sugar specific to BUILD submethods? 07:45
Tene pleasedieinafire.net:2080/357964 07:49
Playing with a POE clone... just got that running. 07:50
moritz_ are custom traits implemented in Rakudo?
Tene moritz_: not officially, afaik
moritz_ Tene: but they work, kind of? 07:51
Tene moritz_: yes
moritz_ cool
Tene moritz_: rakudo calls '!trait_handler_foo' when it encounters 'sub ... is foo'
pugs_svn r26481 | wollmers++ | typo
moritz_ Tene: ah, that's not the specced way 07:52
Tene right.
Is there a specced way?
masak moritz_: Tene is doing cool/scary things in the shadowland between Rakudo and Parrot. :)
Tene++ 07:53
Tene moritz_: if there's a specced way, I'd be interested in implementing it.
moritz_ looks 07:54
Tene moritz_: this is the implementation: pleasedieinafire.net:2080/769460
moritz_ Tene: see S14/Traits/ 07:55
Tene ah 07:56
07:56 ejs1 joined 07:57 goksie left
Tene std: sub foo:bar { ... } 07:57
p6eval std 26481: OUTPUT«ok 00:02 35m␤»
Tene so rakudo needs to allow ':' in sub names...
unless the :xxx is special syntax? 07:59
do we have tests for this? 08:01
moritz_ Tene: it's also needed for parsing of proto regexes
Tene ah, right.
masak conclusion from my RT tests excursion: out of the 14 or so tests that I reviewed as candidates for closing, 1 could be closed. I'm re-evaluating my previous claim that there are a host of unclosed rakudobug tickets in RT.
moritz_ Tene: which are of the form token statement_modifier:sym<while> 08:02
masak: I skimmed over the first 70 or so tickets in RT last week, so in that part of RT I don't expect a host of unclosed-but-now-working tickets 08:03
masak: who claimed that?
08:03 ejs left
masak I've been known to claim that. 08:03
moritz_ Tene: t/spec/S12-traits/*
Tene ah 08:04
moritz_ I'll move that to S14-traits/ 08:05
gna 08:06
08:15 ejs2 joined 08:19 payload joined 08:22 orafu left, orafu joined
pugs_svn r26482 | szabgab++ | t/spec more smartlink fixes 08:24
08:25 ejs2 left, ejs1 left 08:28 ejs joined 08:30 azawawi joined
azawawi hi 08:30
masak azawawi: o/ 08:31
08:31 cognominal left
szabgab I was about to upload Smart::Links to CPAN but I have second thougths about its name 08:36
maybe it should be called Pod::SmartLinks ?
masak preferably, yes.
08:36 orafu left, orafu joined
moritz_ that depends on your future plans 08:36
szabgab other names?
moritz_ if you plan to port it to other file formats, having Pod:: in the name would be bad 08:37
masak Pod::Links::Smart :)
moritz_ Doc::SmartLinks
masak Text::SmartLinks
moritz_ masak: I also thought about that
08:40 kimtaro joined
szabgab there is a Text::Smart module 08:40
I have no idea how other formats could be supported but I guess I'll go with Text::Smartlinks 08:41
now if I knew how to rename it in one svn commit command that would be nice 08:42
masak doesn't think that's possible 08:43
not if you want to use 'svn mv', that is.
pugs_svn r26483 | szabgab++ | Smart::Links add README and Changes files 08:45
szabgab I have 15 minutes till the next wave of cronjobs
moritz_ don't worry - when you're done I can start the update manually 08:47
08:59 goksie joined
jnthn oh morning 08:59
masak jnthn: o/
pugs_svn r26484 | szabgab++ | rename Smart::Links to Text::SmartLinks 09:00
09:01 payload left 09:07 kidd_` joined 09:10 hanekomu left 09:14 cognominal joined 09:21 eternaleye left, m-i-l-a-n joined 09:22 eternaleye joined 09:26 payload joined 09:27 eternaleye left 09:28 eternaleye joined
frettled yay? 09:35
09:36 bacek left
masak frettled: I'm getting increasingly interested in your using-an-existing-packaging-system idea. 09:39
masak researches apt a bit 09:43
09:45 goksie left
pugs_svn r26485 | szabgab++ | remove empty directory 09:45
09:47 orafu left 09:48 orafu joined
pugs_svn r26486 | szabgab++ | still renaming Smart::Links ... 09:48
r26487 | szabgab++ | hopefully finished renaming Smart::Links to Text::SmartLinks 09:52
frettled masak: I truly hope it's feasible. 10:00
masak wow, now I'm totally sold on APT.
frettled :) 10:01
jeremiah_ APT rocks.
masak frettled: I think we should ask ourselves: what is the simplest way to get a working prototype of this?
pugs_svn r26488 | szabgab++ | Text::SmartLinks some Makefile.PL improvements and some default error checking
masak frettled: do you know if there's a .deb-packaged Rakudo release?
jeremiah_ masak: I have thought about doing one, but there is not one yet. 10:02
masak: Do you think that would be useful?
Or are the sources still in a state of flux?
masak jeremiah_: the latter, very much. 10:03
jeremiah_: but I don't mean an official Debian package.
jeremiah_ You just mean packaged at all?
masak it'd be nice to have a repository somewhere with Parrot, Rakudo (latest releases), and all the Perl 6 projects.
jeremiah_: aye.
how do I go about making one?
jeremiah_ masak: my talk in Oslo ;)
Its not hard. 10:04
masak URL?
jeremiah_ Use dh-make-perl to download the sources, then use dpkg-buildpackage to create a deb
masak \o/
jeremiah_ You may have to install devscripts on your debian machine
That has some useful goodies too.
masak hold on a minute... :) 10:05
I'm on Darwin here. no Debian.
jeremiah_ uh oh.
masak I do have MacPorts, if that helps.
jeremiah_ Virtualbox, install debian
masak about time anyway, I guess.
jeremiah_ No, that won't help.
masak goes hunting for Virtualbox 10:06
jeremiah_ Virtualbox works on well on Darwin.
masak oh, and I have Parallels on here too. would that be a better solution? 10:07
jeremiah_ Dunno - I have never used parallels.
10:07 zostay joined
jeremiah_ But I know VB works like a charm and is really easy. 10:07
And is free 10:08
masak freeversing.com/?p=36 seems to indicate Parallels is a good choice...
jeremiah_ I would use debian 5.0 though. 10:09
pugs_svn r26489 | szabgab++ | SmartLinks dist_dir needs package name 10:10
masak jeremiah_: aye. 10:11
jeremiah_ w00t
masak hm, an "Intel 2 Core Duo" is of which architecture? i386? 10:12
pugs_svn r26490 | szabgab++ | SmartLinks add MANIFEST.SKIP 10:13
jeremiah_ masak: Actually, I thinkit is i686
I have one too. :)
And I installed debian on it. 10:14
masak jeremiah_: here are the options: www.debian.org/CD/netinst/
no i686 there, only i386 and ia64.
jeremiah_ masak: use i386 network install
masak hokay.
jeremiah_ that is the fastest
szabgab masak, he tried to pull that trick on me too but we could not install on a VirtualBox
jeremiah_ szabgab: well you couldn't :P
masak szabgab: :) 10:15
jeremiah_ :)
szabgab you were sitting next to me :-)
masak szabgab: I'll be trying Parallels first.
szabgab Text::SmartLinks was uploaded to CPAN
it will still need a lot of work to remove all the synopsis, Pugs and Perl 6 references from the output html but it can already be used 10:16
jeremiah_ masak: Just for your info, there is a move afoot to create a cross-distro packaging system. i.e. a package that would install on rpm systems and .deb systems
masak jeremiah_: nice. 10:17
lunch &
jeremiah_ But it has not come very far, still it might be nice for proto
masak forget proto :) what we need is a real packaging system.
& # really 10:18
pugs_svn r26491 | szabgab++ | svn:ignore
10:19 mberends joined
jnthn ...but...but...proto preventend the Austrian uprising! 10:19
mberends good $UTC-morning, #perl6 10:20
I want to register my interest in developing an apt clone to run outside of debian. 10:21
masak: give that Debian 5.0 MicroSD a try, it just needs an x86 PC. 10:26
10:26 orafu left, orafu joined 10:27 hcchien_ is now known as hcchien
jeremiah_ mberends: I think you'll face a certain amount of skepticism re-creating APT. Why not just port it? 10:29
10:32 icwiener joined, SamB joined
mberends jeremiah_: sure, whatever works best. I just like the yak shaving that comes from trying to implement existing tools on Rakudo. Also, there may some overkill that can be omitted, for example ipkg is a lightweight dpkg clone in my Freecom NAS boxes. 10:32
jeremiah_ ah, okay. :) 10:38
10:43 payload left 10:47 broquaint left 10:50 icwiener left, pmurias joined 10:57 pmurias left 10:59 azawawi left 11:02 kimtaro_ joined 11:03 kimtaro_ left 11:04 kimtaro left 11:10 payload joined
masak mberends: call it a clone or a port, I agree it'd be nice. 11:21
lately I've started to like the best form of flattery as a way to develop "new" Perl 6 applications. 11:22
frettled masak: sorry, was afk there for a bit. Using Parallels should work nicely with almost any Linux.
masak seems to work fine so far.
frettled \o/
masak I'm 15% through the installation. 11:23
11:25 kane_ left, kane_ joined 11:26 eternaleye left
masak jnthn: actually, it turns out it was the last line of the bridge in the Beatles song "She loves you" that prevented the Austrian uprising. :) 11:26
11:27 eternaleye joined
frettled so it wasn't ABBA? 11:27
masak frettled: well, ABBA has done a lot of other good things. but not Austria, no. 11:28
pugs_svn r26492 | wollmers++ | length is not language dependent 11:35
mberends masak: I'm just working up to my first blog, and flattery is part of it :) 11:37
frettled Regarding a port/fork of dpkg (and possibly apt) to something non-Debian-specific, I'd first check to see if someone else did it (well) before.
mberends good point, yes, the ipkg in optware is a functional subset. 11:38
frettled (deb file format also, I guess)
masak mberends: re flattery: is that a threat or a promise? :)
11:38 kimtaro joined
frettled mberends: ipkg could be that example, yes, but I don't know anything about it. :) 11:39
mberends Sun got Ian Murdoch to do it again in OpenSolaris
masak frettled, mberends: I think a first working prototype might simply piggyback on the existing apt framework.
frettled masak: I may already have been flattering in my blog.
masak: sensible
masak frettled: URL?
mberends yes, borrowing existing apt toolchain for a bootstrap effort (like Perl 6) 11:40
frettled masak: howcaniexplainthis.blogspot.com/
masak oh, right. 11:41
mberends would love to keep chatting, but has a ferry to England to catch.
frettled mberends: have a nice trip
mberends will resume tomorrow. thanks. o/
11:42 broquaint joined, mberends left
masak mberends: \o 11:42
11:44 amoc left
masak frettled: nice. :) 11:48
frettled: slight correction though: proto is a Perl 6 project installer, not (primarily) an autoinstaller script for parrot and rakudo.
11:49 payload left, chid joined
frettled masak: ok, thx 11:49
masak: better now? 11:51
masak frettled: perfect. 11:52
masak should fix those nice progress dots some day... 11:53
I've been talking about them for a month now.
11:53 kidd_` left
frettled ) 11:57
:)
moritz_ -:) 11:58
sjn frettled: s/you don't need 5.10.0/5.10.0 even better/ 11:59
(let's get people to upgrade to 5.10, mkay?)
masak I was of half a mind to mention that one, too. :)
everybody needs 5.10.0 in some sense. 12:00
moritz_ I'm sure my mother can live without out :-)
sjn yes, 5.10.0 is the new 5.8.*
moritz_: I'm sure your mom would be EXTATIC to use 5.10.0 :) 12:01
masak moritz_: are you actually trying to create a "your mom" situation here? :P
sjn just say "it's like a new 1600 RPM tumbler" 12:02
masak well, it is.
frettled sjn: 5.10.0 isn't stable enough that I'm willing to recommend it.
12:02 iblechbot left
masak Perl 5.10.0 is like a new 1600 RPM tumbler. 12:02
frettled I'll post something about it when 5.10.1 is available. :)
sjn frettled: 5.10.0 is stable enough :-P 12:03
(seriously, any more stable, and it should be considered dead...)
frettled I'll change it to "5.8.8 or 5.10.0", then. No loaded words.
moritz_ speaking of which, anybody know if davem is making some progress towards the 5.10.1 release?
sjn seen davem 12:04
frettled Considering this amount of feedback, I now of course expect front page coverage in major newspapers.
sjn bah, ENOUSEFULBOTS
frettled @seen davem
lambdabot I haven't seen davem.
frettled Idle for 13:30.08, though
sjn bah, EUSEFULBOTSUSECRYPTICACCESSCODESINFRONTOFKEYWORDS 12:05
12:05 broquaint left
frettled ENOPERCEPTION 12:05
masak lambdabot: don't mind them. you're great. 12:07
moritz_ I just peeked into the maint-5.10 branch - lots of activity there 12:08
12:09 chid left
frettled jeez, think if all that energy could be channeled into parrot and rakudo! 12:09
masak CAN HAZ DEBIAN
moritz_ frettled: then... what? Perl 5 would die, just as the critics say it would 12:10
frettled moritz_: and we'd still have no Perl 6? ;) 12:11
moritz_ frettled: exactly. 12:12
though we'd have a bit more Perl 6, which I for one would welcome
frettled :) 12:13
12:13 masak left
frettled in other words, Perl 5 hackers aren't what we need for Perl 6! \o/ 12:14
moritz_ well, not primarily
12:14 masak joined
masak lesson learned: if I try to change the screen resolution in Debian in Parallels, the whole computer goes down. 12:15
otherwise, I like it.
frettled yow
szabgab masak, what is Parallels ? 12:20
moritz_ sounds like virtualization to me
szabgab ah, found it
masak szabgab: aye, what moritz_ said. 12:21
pugs_svn r26493 | wollmers++ | avoid editor problems with characters > 0xFFFF; grapheme tests added 12:22
jnthn raises his eyebrows at the ^^ ticket 12:25
...what operator is that?
masak jnthn: xor? 12:27
analogous to && and ||. 12:28
jnthn ah
masak and the one() analogue to all() and any().
12:28 orafu left
masak uh, when written as '^', that is. 12:28
12:29 orafu joined 12:32 wayland76 joined
wayland76 moritz_++ # Blog summaries :) 12:33
12:33 abra joined
wayland76 moritz_: Do you want to know the typos and mistakes? 12:34
moritz_ wayland76: yes
12:38 wayland_ joined, msmatsko left
wayland_ "Having only two ways to do the same things is still now violation of the timtowtdi principle" 12:39
s/now/no/
"As each month Rakudo had another release in April, featuring..."
This is difficult to parse for me (and probably other English monolinguals)
I'd recommend instead "As happens each month, Rakudo had another release in April, featuring..."
pugs_svn r26494 | ron++ | add test for accessing match keys through scalary copy RT 62530
wayland_ (added the word "happens", and a comma after "month")
hth 12:40
12:40 eric256 joined, wayland76 left, wayland_ is now known as wayland76
drbean_ Yeh, it sounds like it is released in April each month. 12:40
moritz_ fixing now, thanks 12:41
eric256 hey, i have a ton of pull requests on perl6-examples (i'm a bad person) and all 50 failed to commit
wayland76 drbean_: Yes, I think that's what was confusing me
Well, that's not very committed of you :)
eric256 how can i go about fixing this?
wayland76: lol yea
moritz_ lol 12:42
eric256: I'd do that on the command line... add the remotes, pull the, cherry-pick, resolve conflicts if necessary
12:43 pmurias joined
wayland76 Btw, that Unicode stuff isn't very scary. While I wouldn't say I have a comprehensive grip on it, I have a basic grip 12:43
masak wayland76: understood. 12:44
moritz_ yes, me too - but I didn't undertand that particular part, due to lack of effort
wayland76 To get a basic group, go to www.fileformat.info/info/unicode/ca.../index.htm and scroll down 'til you find the items that begin with the word "Punctuation". Then read the bullet points associated with Ps, Pe, Pi, and Pf. 12:45
s/group/grip/
eric256 is there some document that might walk me through this? i have a local copy that i did a git pull on and its up to date
wayland76 (Or maybe table entries instead of bullet points. Whatever you call them...) 12:46
Anyway, I'll stop now, so that people can answer eric256's question :)
masak eric256: you mean actual pull requests, not patch RT tickets? 12:48
eric256 i mean the fork que on github... mistyped before
not RT patches
masak I think someone said once that no-one actually takes care of github pull requests to rakudo.
surely that can't be right, but that's how I remember it. 12:49
moritz_ masak: perl6-examples, not rakudo
eric256 i'm talking bout perl6-examples though... and yea i hope thats not right.
masak moritz_: oh.
eric256 which i run poorly and you both have stuff in the fork que
lol
moritz_ and actually eric256++ (is that eric257? :/) incorporated my patches already which I submitted by pull requests 12:50
masak eric256: in that case, it can be argued that it's the task of the requestors to update their patches.
literal just give them commit bits and let them sort it out themselves :)
eric256 i think you all have commit bits, so now i'm realy confused
lol
wayland76 @karma eric256
lambdabot eric256 has a karma of 5
12:51 orafu left
masak eric256++ # nice guy 12:51
12:51 orafu joined
eric256 should i just ignore everything in the fork queue then? that doesn't seem neighborly 12:51
wayland76 @karma eric256
lambdabot eric256 has a karma of 6
moritz_ eric256: I don't have commit access 12:52
masak eric256: you are basically free (from a social standpoint) to take whatever action on things in your fork queue.
wayland76 Anyway, gotta go o/
12:52 ejs left, wayland76 left, aindilis left 12:53 aindilis joined
eric256 masak: is on there already and i'm trying to add you now as well 12:53
12:53 eternaleye left
eric256 hmmm it just does its little swirly cirlcle constantly 12:54
12:54 eternaleye joined
eric256 notices that his facebook was updated around the same time as his last commit, last month flew by 12:58
12:59 PhatEddy joined
PhatEddy rakudo: class Match is also { method keys () {return %(self).keys }; };rule a {H}; "Hello" ~~ /<a>/; my $x = $/; say $x.keys.perl 13:00
p6eval rakudo c4f676: OUTPUT«["a"]␤» 13:01
PhatEddy eric256: that example is your Rt 62530 13:02
13:03 jhorwitz joined
moritz_ PhatEddy: if you write that RT #62530 the IRC logs automatically turn it into a link to RT :-) 13:04
eric256 the new rakudo.org++ very nice looking 13:05
PhatEddy++ cool, now i have to figure out how to catch up, last time i was here rakudo wasn't on git yet, or it had just gotten on it...not sure. 13:07
13:08 maja joined
eric256 i think i have like 5 versions of rakudo and parrot on this pc...time to clean up 13:08
pugs_svn r26495 | pmurias++ | [re-smop] the capture.MESSAGE is defined in the RI DSL
13:08 skids_ joined 13:09 eternaleye left 13:10 eternaleye joined, ispy_ joined
sjn is looking for blogposts from NPW and the hackathon 13:11
anyone have some links for me? :)
eric256 notices rakudo got socket support and gets very excited 13:13
masak that reminds me... I should check why the socket support has stopped working in Rakudo...
moritz_ masak: ... and then immediately write a test 13:14
masak: I wanted to write some tests, but I was too late
masak moritz_: oh.
eric256 what? it worked, then it stopped, and i missed it ? lol
masak moritz_: I might be able to do it with your guiding hand.
moritz_ masak: I'll do my very best 13:15
I thought of something as simple as opening a server port on localhost, connecting to it from the same script, transfer a few bytes of data and compare them 13:16
masak moritz_: problem is, as mberends++ pointed out, that recv is blocking.
so you need two threads or equiv.
moritz_ dammit 13:17
eric256 can i go ahead and mark that ticket as resolved? 13:19
moritz_ if we have tests for that, yes 13:20
13:20 maja_ left 13:21 PacoLinux joined
literal does rakudo not do signals yet? 13:26
moritz_ no 13:27
eric256 hmm all the commits in the fork que have j1n3l0 in the link....
pmichaud std: module Foo { sub _foo { say 'foo' } }; Foo::_foo();
lambdabot pmichaud: You have 1 new message. '/msg lambdabot @messages' to read it.
p6eval std 26495: OUTPUT«ok 00:02 35m␤» 13:28
13:30 abra left 13:31 abra joined
pmichaud masak: I've started putting the tarballs on github. I can put them on my personal site as well if we still need them. 13:32
13:32 mib_g8edcm joined 13:35 mib_g8edcm left 13:38 zamolxes joined 13:40 orafu left, orafu joined
PhatEddy I am looking at committing tests for five tickets in four test files. Should I be doing four commits or one? 13:40
13:40 iblechbot joined
moritz_ PhatEddy: whatever you prefer 13:41
eric256 still no line numbers on errors? i'm guessing that turned out more difficult that was originaly hoped? 13:42
13:43 jhorwitz left
eric256 rakudo: <a b c d>[-1].say 13:43
p6eval rakudo c4f676: OUTPUT«Use of uninitialized value␤␤» 13:44
eric256 rakudo: <a b c d>[*-1].say 13:45
p6eval rakudo c4f676: OUTPUT«d␤»
pmichaud eric256: the line numbers are embedded in the compiled code -- we're just looking for the right way to get them out to the programmer. 13:48
jnthn I guess more specifically, it's blocking on the "it changes the Parrot error messages" issue... 13:49
pugs_svn r26496 | ron++ | add tests for slice with two whatever stars RT #61844 13:51
pmichaud well, we can always decide to put the error handling into pct or rakudo instead of / in addition to parrot. 13:52
Last time I looked into it, I couldn't introspect the annotations sufficiently to get it to work. But Tene++ has made progress since then.
jnthn pmichaud: Probably you missed .backtrace() on exception, which gets you an array of hashes of into including the annotations. 13:53
*info
pmichaud That's what I was using, but it wasn't giving me back the right results.
I kept getting segfaults, null PMCs, or other non-useful items.
jnthn ...filed a Trac ticket? 13:54
pmichaud no, I left it for Tene++ to work on :-)
pugs_svn r26497 | ron++ | document existence of test for RT #61960
jnthn Ah. :-)
That works too. ;-)
baest jnthn++ # for updating parrot version in rakudo 13:56
eric256 isn't there a flatten or splat operator? 13:59
pmichaud depends on what you want to flatten or splat. :-)
if you're wanting to flatten arguments in a call, it's |@array
as in foo(|@array)
baest pmichaud: I have a question for you regarding /< funny stuff >/. I've the normal cases working, but in case of < ab >, I would create a literal node with 'ab', but that doesn't consume the whole pattern and fails badly 14:00
pmichaud just make sure that it's 'to' attribute points to the end of the >
it's okay if the Literal node itself marks a different location
(be sure it's .ast value remains 'ab', though) 14:01
14:01 zamolxes left
eric256 P7 from 99 problems: Flatten a nested list structure 14:01
pugs_svn r26498 | ron++ | improve testing for mmd builtin override RT #58948
baest pmichaud: ok, will check it out. Do you know if < > (1 or 2 spaces) is legal and if what it means? 14:02
pmichaud I don't know if it's legal.
std: / < > /
p6eval std 26497: OUTPUT«ok 00:03 36m␤»
baest it is :)
pmichaud std seems to like it.
I would think that it ends up being a no-op of some sort.
in that sense, it probably shouldn't be legal :-) 14:03
eric256 rakudo: sub splat (|@a) { return @a }; splat( [1,2,3, [4,5]] ).perl.say;
moritz_ std: / <> /
baest make sense
p6eval rakudo c4f676: OUTPUT«Malformed routine definition at line 1, near "splat (|@a"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:85)␤»
std 26497: OUTPUT«##### PARSE FAILED #####␤Unrecognized regex assertion at /tmp/iJjryIUuSt line 1:␤------> / <> /␤ expecting any of:␤ assertion␤ name␤FAILED 00:03 35m␤»
baest I can just warn in that case
pmichaud eric256: that's a different type of flattening
eric256: also, note that flattening lists != flattening arrays
14:03 PerlPilot left
masak pmichaud: re tarballs: no need. just wondering what's the official place. 14:03
baest otherwise it could be pretty magical. Already <something> and < something> is very different 14:04
masak pmichaud: I only noticed because proto used the old place.
pmichaud masak: for the forseeable future, github will be the official place.
masak goodenuf.
eric256 yea this lists arrays thing is going to bite me like 500 more times
lol
pmichaud I would've have started it there in the first place if I had realized that it existed. :-)
masak :)
pmichaud eric256: btw, I'm thinking of forking perl6-examples into the perl6 account on github -- would you have any objections/concerns with that? (Yes, I'd give you whatever commit/admin privileges I can for it.) 14:05
if you'd prefer that we not do that, I won't.
14:06 dukeleto|work left, dukeleto|work joined
baest pmichaud: doh, it work perfectly when I use to correctly. That has already bitten me a few times :) I will probably learn in the end 14:08
pugs_svn r26499 | ron++ | add tests for isa override and method creation with eval RT #60946 and RT #61354 14:09
pmichaud baest: It's bitten me a few times as well.
baest :0 14:10
14:10 dukeleto|work left
baest std: /< ab cd>/ 14:11
p6eval std 26499: OUTPUT«ok 00:02 35m␤»
baest std: /< ab cd>/
p6eval std 26499: OUTPUT«ok 00:02 35m␤»
14:15 frew|work joined 14:24 eternaleye left 14:25 orafu left, orafu joined, eternaleye joined
masak @tell mberends check out the new dotty progress bars when proto installs Rakudo :) 14:27
lambdabot Consider it noted.
baest world peace one dot at the time :) 14:28
moritz_ pmichaud: how much Perl 6 code do you actually write? (just idle interest... and no, NQP doesn't count :-)
masak baest: a nice title for a blog post :) 14:29
baest masak: quite inspired by your last one 14:30
masak baest: nice to hear that. 14:32
eric256 pmichaud: no thats perfect 14:35
i'd actualy wanted that in the first place, but started it seperate to see if it would work ;) plus rakudo wasn't in git yet 14:36
14:39 exodist joined 14:40 payload joined
masak hm, need to allow proto better granularity in perl6-examples... basically treating all the smaller projects as separate units... 14:41
pmichaud moritz_: I haven't written a lot of Perl 6 code yet :-) 14:52
outside of the compiler and tools, that is :-)
14:52 ispy_ left
arnsholt In a way, writing the stuff that lets us write Perl 6 is actually more important than the Perl 6 code itself =) 14:53
jnthn Both are important. :-) 14:55
Happily, there are people doing both.
moritz_ tries 14:59
15:02 M_o_C joined
PhatEddy I haven't asked yet where my efforts on rakudo might be most useful and thought this might be a good time. 15:05
I am currently keeping busy coming up with tests for active tickets ...
15:06 Psyche^ joined
moritz_ that's a good use, IMHO 15:07
15:07 nihiliad joined
masak PhatEddy: sounds very good. 15:08
jnthn I am always happy, when I come to fix an RT ticket and find it already is annotated with tests that I can unfudge after fixing it.
15:10 Jedai left
pmichaud (tests for active tickets)++ 15:11
same here.
15:12 broquaint joined
PhatEddy So I'll keep going with that then :) 15:12
sjn pmichaud: got your mail, we'll look into refunding your trip+hotel the next few days (need to get some funds out of PayPal too) 15:13
pmichaud: it should go pretty smoothly though
pmichaud sjn: that's fine -- I just wanted to get it off of my "todo list" :-) 15:14
sjn :)
pmichaud: btw, could you update your info with your IBAN account number? (if you have one) 15:15
15:15 Jedai joined
pmichaud U.S. banks don't have IBAN 15:15
sjn ah, ok
jnthn I is International and... ;-)
pmichaud that's why I gave the SWIFT code :-)
kane_ all your money are belong to sjn then
sjn strange people, those USAnians...
15:16 eternaleye left
pmichaud I did once have a UBS account, though :-) 15:16
but alas, no longer.
frettled It might be better if you created a paypal account.
15:16 fridim_ joined
pmichaud I have a paypal account... but there's a fee for transfers there :-| 15:16
sjn mm
4%
frettled hmm
sjn too much
frettled more than for a SWIFT transfer? 15:17
15:17 eternaleye joined
frettled "SWIFT" is fairly ironic, though. 15:17
pmichaud I don't know what the cost is on SWIFT at the sending end. On the receiving end I don't have a fee, I don't think. I'm sure it's less than 4%, though.
frettled yup
sjn leaves for the NPW wrap-up meeting soon 15:18
frettled: feel free to come, if you want to give feedback :)
frettled I know it isn't really my business, but my general thought was something along this line: if the fee for withdrawing from paypal is less than for a SWIFT transfer, then all NPW would have to do is to transfer the additional amount via paypal also.
sjn: where is that? :)
sjn same as most oslo.pm meetings :) 15:19
[particle] international wire transfers cost parrot foundation ~USD35
frettled sjn: ... which is? :D 15:20
[particle]: yep, they're leeches, that's for sure.
baest international transfer is free in my bank as long as it is doing using the internet bank
sjn frettled: oslo.pm.org/ :)
frettled sjn: Marhaba Caf􏿽xE9? 15:21
sjn jepp
15:21 Patterner left, Psyche^ is now known as Patterner
eric256 rakudo: my $x = [1,2,3, [4,5]]; for $x -> $t { $t.perl.say }; 15:22
p6eval rakudo 6f1649: OUTPUT«[1, 2, 3, [4, 5]]␤»
eric256 now i know i'm just being dumb, but how do i loop over an array ref? or better yet, how do i look up how to loop over an array ref?
masak eric256: $x.list
frettled sjn: so that would be at 18:00, then? Hmm. Well, it's within walking distance, I suppose. 15:23
masak rakudo: my $x = [1,2,3, [4,5]]; for $x.list -> $t { $t.perl.say };
p6eval rakudo 6f1649: OUTPUT«1␤2␤3␤[4, 5]␤»
sjn frettled: 18:30 15:24
frettled whoa, loooots of time.
masak eric256: over time, I've found that terms like 'array ref' fade into the background for me when coding Perl 6. they're just not needed to explain the underlying model. 'array' covers it fine.
sjn toddles off to get some food first
15:24 gottreu joined
masak eric256: as for looking it up, I expect that u4x's section on for loops would eventually cover a thing such as this. 15:25
that's one of the main differences between u4x and the spec.
frettled sjn: that answered my next question :P 15:26
eric256 yea, thats a very different behaviour
pmichaud I'm find with receiving the money via paypal as long as I don't take a big fee hit in the process :-)
*fine 15:27
15:27 fridim_ left 15:29 orafu left, orafu joined
eric256 rakudo: sub test (@t) { say @t.perl }; test((1,2,3)); test([1,2,3]); 15:30
p6eval rakudo 6f1649: OUTPUT«[1, 2, 3]␤[1, 2, 3]␤»
eric256 i fell like i'm relearning a foreign language....all the peices are there, i just can't seem to put them in the right order ;)
masak eric256: first one is a list, the second one is an array.
eric256 i think i need to re-re-read the documentation 15:31
pmichaud I suspect that .perl on lists will change soon.
masak eric256: parentheses do grouping, so you're sending the 1,2,3 in the first call as a single argument.
eric256: ...which is fine, since the sub accepts one parameter.
15:31 cognominal left
arnsholt Which synopsis defines the meta-object protocol? 15:32
15:32 km2 joined
pmichaud S12 15:32
some pieces aren't well-defined yet, though.
also look at the details from sm0p on the perl6 wiki (getting url)
www.perlfoundation.org/perl6/index....mop_oo_api 15:33
arnsholt Thanks
pmurias s/sm0p/smop 15:34
15:34 cognominal joined 15:36 abra left 15:38 abra joined
arnsholt Ah, dang. $/.perl doesn't work yet 15:38
15:39 maja left
jnthn arnsholt: The HOW API part of smop_oo_api or something very similar to it is likely to become spec. 15:39
pmichaud pmurias++ # "smop" it is.
arnsholt jnthn: Good to know. Thanks 15:41
pmichaud afk, errands
15:42 orafu left, orafu joined 15:43 descamps joined, justatheory joined 15:46 descamps left
TimToady japhb: re constants, you can put "is export" on any declaration 15:53
lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
TimToady @messages
lambdabot perlmonkey said 1d 22h 36m 17s ago: got a chemistry question for you larry 15:54
TimToady @clear
lambdabot Messages cleared.
masak perlmonkey seems to have since evaporated.
TimToady well, asking to ask is a no-op in any case 15:55
or telling to ask, in this case... :)
jnthn "Can I ask you a question?" "Apparently, yes." 15:56
masak TimToady: is the $!foo parameter sugar (for auto-assignment) specific to BUILD submethods?
TimToady I can argue it both ways; as a designer, I'd like it to work anywhere, but as an implementor, I can see wanting to restrict the code mangling required 15:57
since it implies adding code to the end of the function 15:58
to do the unless-already-set semantics
but if defined in terms of a wrapper, maybe it can generalize
wrapping seems a bit heavy for that though 15:59
building objects wants to be fastish
pugs_svn r26500 | ron++ | my Num List sub should allow return of empty list RT #65128
masak well, I have no opinion in the matter, I just noticed that the spec doesn't seem to say. 16:00
japhb TimToady: (re: export any decl) Really? That's great!
TimToady so I'm okay with restricting it for 6.0, with the proviso that we might generalize it later
masak TimToady: sounds good.
and sane.
TimToady japhb: except it occurs to me that enums don't have traits yet...
so I need to glare at the grammar for some of the more esoteric declarators
japhb heh 16:01
TimToady std: enum Foo of Int is export <a b c>
[particle] toke.std
p6eval std 26499: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/LKmzDN0H91 line 1:␤------> enum Foo of Int is export <a b c>␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ standard stopper␤ statement modifier loop␤ terminator␤FAILED
..00:02 35m␤»
japhb jnthn: you said that constant $foo = 'foo' works now ... does it work with 'is export' yet? Or is that tbd? 16:02
TimToady std: subset Foo of Int is export where {...}
p6eval std 26499: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/d4RWz3hMH9 line 1:␤------> subset Foo of Int is export where {...}␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ standard stopper␤ statement modifier loop␤ terminator␤FAILED
..00:02 35m␤»
jnthn japhb: to be done 16:03
japhb jnthn: OK, thanks. Is that possible as part of the Tuesday work, or is it too much work? 16:06
16:07 masak left
TimToady hmm, bit of ambiguity in enum, since <trait> recognizes :export as equiv to "is export", but the enums arglist also allows pairs... 16:07
*enum's 16:08
maybe we should go back to requiring = before enum's arglist 16:09
or at least allowing = there, for now
jnthn japhb: Well, we're not doing lexical importing at the moment, so they'd go into the NS, and inlining would be trickier too...but maybe do-able. 16:11
pmichaud TimToady: if you're looking for an easier problem to solve... I'm interested to know how/why STD parses "Foo::_bar" as a name, since it (apparently) only accepts <alpha> after the '::'
japhb Apparently I'm on a "deceptively tricky" streak .... 16:12
jnthn: Thank you.
japhb anxiously awaits Wednesday. :-)
TimToady pmichaud: _ is considered an alpha 16:14
16:14 jhorwitz joined
japhb TimToady: What is the builtin for just alphabetics then? 16:15
pmichaud TimToady: <alpha> matches _ in general, or just STD is doing it that way? 16:16
TimToady perl has always considered _ to be alpha; _ gets into \w by virtue of being "alpha", not digit 16:18
and $_ is considered an alphabetic var
pmichaud hmm. I always thought of \w as being alpha+digit+underscore
arnsholt pmichaud: Is there a particular reason PGE seems to want closures to start with {{?
TimToady std: class _foo_ {...}
[particle] _ is definitely <alpha>
p6eval std 26500: OUTPUT«ok 00:02 35m␤»
pmichaud arnsholt: to emphasize the fact that we only do PIR closures.
when we do closures in Perl 6 or other languages, we'll accept { 16:19
[particle] and specify the lang how?
16:19 payload left
pmichaud :lang modifier 16:19
arnsholt D'oh, I should've seen that.
[particle] on the end?
pmichaud in particular, PGE needs to be able to find the end of the closure block, so it has to search for "}}"
[particle] { ... } :lang<lua>
^ end weight problem 16:20
pmichaud particle: / :lang('Perl 6') { ... } / # I think -- see S05
TimToady Perl 6 doesn't use PGE, in that sense, so the :lang is implicit :)
[particle] ok, before works great.
TimToady in Perl 6 the language of the closure is carried down from the outer context
pmichaud yes, PGE will accept the language from the outer context as well, when it's implemented. 16:21
it involves getting PGE to be smart enough to call other parsers in the middle (and having all of those parsers honor a common API)
TimToady since P6 considers all declarations as language mutating, that's how the closures see the the outer declarations 16:22
japhb TimToady: So if _ is alpha, then what rule excludes it? Is the expectation that we explicitly exclude when we want to e.g. parse English, or will there be a builtin for it? 16:23
TimToady \pL to get the Unicode idea of it
japhb (Because, of course, in Perl 6 parsing English should now be trivial ....)
pmichaud I suppose one could do: <+upper+lower> or <isL>
TimToady in P5
so yes, <isL> or some such
pmichaud: <+upper+lower> ignores +title 16:24
pmichaud I haven't see a <title> 16:25
TimToady japhb: of course ;) since English has only some 300 grammatical rules, and those are all perfectly well behaved...
16:25 payload joined
pmichaud *seen 16:25
TimToady well, titlecase is outside upper/lower in any case (NPI)
pmichaud right.
so <isL> to match all alphabetics.
<alpha> matches alphabetics + underscore 16:26
(i.e., Perl 6's idea of "alpha")
[particle] <alpha-->
:)
<alpha-'-'>
TimToady seems like that will be least surprise for P5ers
[particle] er, gah.
<alpha-'_'>
TimToady probably a syntax error 16:27
pmichaud <+alpha-[\ ]>
arggh
[particle] heh, glad it's not just me
pmichaud <+alpha-[_]> # there.
TimToady std: /<+alpha-[_]>/
p6eval std 26500: OUTPUT«ok 00:03 36m␤» 16:28
pmichaud decides to stick with <isL>
rakudo: say ?('a' ~~ /<isLetter>/)
p6eval rakudo 6f1649: OUTPUT«1␤»
pmichaud rakudo: say ?('_' ~~ /<isLetter>/)
[particle] do we need icu for isL?
p6eval rakudo 6f1649: OUTPUT«0␤»
pmichaud [particle]1: currently, yes.
TimToady [particle]: you could reimplement icu for us today... 16:29
pmichaud afk again
[particle] timtoady: i'll add it to my list.
TimToady thanks! :)
you could implement it in Perl 6 16:30
I'll give you that much slack...
[particle] maybe on my flights to/from palo alto on wednesday 16:31
that's almost close enough to slap you :P
Tene pmichaud: I have line number reporting working, yes. I can add it wherever you say is appropriate. Parrot, PCT, Rakudo, etc. 16:35
pmichaud Tene: PCT
or Parrot
Tene OK, I'll do that today or tonight.
16:36 azawawi joined
azawawi hi 16:36
Tene pmichaud: does perlcabal.org/syn/S14.html#Traits just involve allowing : in sub declarations, or does :xxx mean something special there, like in proto regexes? 16:37
pmichaud it's slightly more than just allowing ':' in sub declarations. 16:38
because we also need to allow infix:<+> and the like.
Tene so it's : followed by text or a quote? 16:39
pmichaud postcircumfix, I think. See STD.pm .
TimToady any identifier may be extended with any adverb 16:40
pmichaud token deflongname, I think.
or even longname
TimToady std: What::ever:foo<bar>
p6eval std 26500: OUTPUT«Undeclared name:␤ What::ever:foo<bar> used at 1 ␤ok 00:02 35m␤»
TimToady std: 1..$x:by(3) # but note this 16:42
p6eval std 26500: OUTPUT«Potential difficulties:␤ Variable $x:by(3) is not predeclared at /tmp/J1wLRkHJgS line 1:␤------> 1..$x:by(3) # but note this␤ok 00:02 36m␤»
TimToady std: $_-_-_-_-_-_ = 42 16:45
p6eval std 26500: OUTPUT«Potential difficulties:␤ Variable $_-_-_-_-_-_ is not predeclared at /tmp/DbWIABYpUo line 1:␤------> $_-_-_-_-_-_ = 42␤ok 00:02 36m␤»
TimToady std: my $_-_-_-_-_-_ = 42
p6eval std 26500: OUTPUT«ok 00:02 36m␤»
TimToady std: constant _-_-_-_-_-_ = 42
p6eval std 26500: OUTPUT«ok 00:02 35m␤»
PhatEddy std: class A { my $.b; method x { $.b = "b" } }; 16:51
p6eval std 26500: OUTPUT«ok 00:04 36m␤»
PhatEddy What is the difference between my/our and has for declaring attributes?
PerlJam my and our don't declare attributes of a class :) 16:52
PhatEddy should a declaration like the one I just made be an error? 16:53
PerlJam er, no. (I misspoke, my and our declare class attributes rather than object attributes) 16:55
16:56 azawawi left
PerlJam so, all of your class A objects will have access to the $.b variable. 16:56
16:57 azawawi joined
PerlJam And it'll be the same $.b 16:57
PhatEddy thx
TimToady in any case, std doesn't check semantics much
PerlJam "much"? what semantics does it check? 16:58
azawawi TimToady: speaking of attributes, feather.perl6.nl/~azawawi/Padre-Plu...ibutes.png :)
TimToady it has to know what has been declared as a type name
or a parameterless value 16:59
PerlJam ah.
17:01 ruoso joined
ruoso Hello! 17:04
17:09 barney joined, pmurias_ joined 17:11 M_o_C left
szabgab can some explain to me how this test works: t/spec/S04-statements/lazy.t ? 17:12
I don't see any rakudo skip in it but it does not run in rakudo as lazy is not implemented 17:13
PhatEddy rakudo: class A { my $.bar is rw = 5 }; A.bar = 3; say A.bar 17:14
p6eval rakudo 6f1649: OUTPUT«3␤»
PhatEddy is the "my" there doing anything? 17:15
moritz_ szabgab: rakudo runs only those tests that are in t/spectest.data iin rakudo
szabgab ah, I have forgotten about that 17:16
so then another question, where should "lazy" be in the spec?
moritz_ buubot: spack lazy 17:17
buubot moritz_: S02-bits.pod:6 S03-operators.pod:14 S04-control.pod:2 S05-regex.pod:2 S06-routines.pod:7 S07-iterators.pod:16 S09-data.pod:7 S12-objects.pod:2 S16-io.pod:1 S29-functions.pod:7
PerlJam PhatEddy: that looks like a bug.
szabgab yes the word lazy appears in many places but none is the declaration of the lazy keyword used in that test file
PerlJam PhatEddy: my $.count; # generates a public read-only .count accessor 17:18
PhatEddy: from the section that talks about using my/our for class attributes.
17:19 FurnaceBoy joined
eric256 pushed a 99 problems directory to perl6-examples and i'm starting to populate it if anyone is interested ;) 17:19
skids_ There was talk of "adding" lazy as a word in addition to "eager" WRT S07's attempts to define laziness.
moritz_ eric256: we already have such a thing in the test suite 17:20
PhatEddy PerlJam: ok thx - probable rakudobug if can't find a duplicate
skids_ There was also some discussion of laziness at Oslo, so maybe someone who was privvy to that could chime in.
17:21 rindolf joined
eric256 oh shoot 17:21
well the test suite is a silly place for it ;)
moritz_ szabgab: STD.pm has the token statement_prefix:lazy
eric256: why?
eric256 which S does that go under?
PhatEddy rakudo: say $.a
p6eval rakudo 6f1649: OUTPUT«Lexical 'self' not found␤current instr.: '_block14' pc 51 (EVAL_17:34)␤» 17:22
moritz_ eric256: it's in integration/
eric256: we need some tests that actualy code works, not only contrived examples that usual tests are
PhatEddy There's a ticket open for that last one (RT #57336) and I am wondering if current handling isn't good enough ... 17:23
17:23 pmurias left
eric256 well you just blew my plans for the next week ;) lol, i was going to use those 99 to get me going, though i might still do it, i formatted ine differently 17:23
moritz_ eric256: sure, feel free
eric256: also note that the ones in the test suite are fairly incomplete
eric256 :q
err. wrong window 17:24
oh? in what way?
tests are kinda a heard way for people to look and learn, so maybe having them in both spots with different solutions/formating is okay ;) 17:25
17:25 ispy_1 joined
moritz_ not all of the 99 problems have a solution there 17:25
eric256 besides i was hoping to have an answer file and run all the solutions agianst those answers...could score solutions based on time to answer or something. ;) same with some of the other folders that have multiple solutions 17:26
could probably then make a test file that tests all those different problems, euler, 99, wsg, etc
moritz_ some have non-trivial data structures as the answer
szabgab it would be nice if the t/spec/integration/ directory would have lots of smartlinks 17:30
to the appropriate pages in the synopsis 17:31
eric256 has done that duty some in the past ;) the syns can be a pretty fast moving target some days, maybe thats slowed down more recently 17:33
[particle] eric256: some have slowed down quite a bit, while others are accelerating. 17:35
szabgab you can look here to see what is broken/missing: perlcabal.org/syn/stats.html 17:36
for example I think "uniq" is not speced anywhere
pugs_svn r26501 | szabgab++ | some more smartlinks 17:37
[particle] neither is .sign 17:38
i need that to implement 'augment class Int { method perl {...} }' 17:39
ruoso pmurias_, hi 17:41
jnthn [particle]: Is that just not return ~self; 17:43
17:44 Schnueff joined
pugs_svn r26502 | azawawi++ | Removed useless assignment 17:45
[particle] jnthn: i suppose it's actually self <=> 0; 17:47
PhatEddy Sorry - looking at the '$.a' outside of a class - complaining there is no lexical self around looks to me like rakudo pretty much DTRT no?
[particle] yep
17:48 Schnueff_ joined 17:49 japhb left
jnthn [particle]: I meant for .perl, not for .sign 17:55
[particle] um, i'm writing .perl in perl 6. 17:56
jnthn aye
.perl of an Int is just its stringification, no?
[particle] i'm writing prefix:<~> in perl 6
maybe that's a better way to put it
the itoa equivalent 17:57
jnthn prefix:<~> probably calls .Str, and .Str on an Int can probably be defined in terms of Parrot's get_string vtable, I think.
Unless you're going for something non-Parrot-specific, but I'm not srue this is the place for it. 17:58
[particle] yes, i'm not writing this specifically for parrot. it's to have a fully-functional perl 6 in perl 6
jnthn Ah, OK.
But IMO the Parrot one should just call the vtable method.
[particle] of course!
jnthn OK, I understand what you're doing now. :-)
jnthn -> dinner, back later 17:59
Tene So, when I define submethod BUILD in a class, and instantiate a subclass, BUILD is called twice
once for the parent class and once for the subclass
pmurias_ ruoso: hi
17:59 pmurias_ is now known as pmurias
Tene is there any way for me to define something in the parent class that will be called once on instantiation of any subclasses? 17:59
pmurias ruoso: &return is the current thing &say is blocking on 18:01
pugs_svn r26503 | pmurias++ | [re-smop] added FETCH,STORE to idconst and bool 18:02
pmurias ruoso: do you think we could have ControlException in Perl 6? 18:03
Tene pmurias: what do you want to know about exceptions in rakudo? 18:04
pugs_svn r26504 | szabgab++ | some more smartlinks
Tene pmurias: I did most of the existing exception-handling in rakudo. I ended up blocked on feedback on how it should behave. 18:05
18:06 Schnueff left
pmurias Tene: you mean from the user viewpoint or internally on the vm 18:07
Tene pmurias: I didn't have specs for what it should look like from the user viewpoint. 18:08
18:10 PhatEddy left
pmurias Tene: what are the things you didn't know? 18:12
Tene pmurias: I got a basic implementation working and posted to the list with "Is this right? How should this behave? What else needs to be done?" and got no response. 18:13
I don't remember the details. 18:14
ruoso pmurias, I think so, but I think having it in m0ld is not harmful
Tene, I think we can sync some things up between rakudo and smop 18:17
I'm not sure there is any difference...
pmurias ruoso: what is the RI test in control exception used? 18:18
* for
ruoso pmurias, I'm not sure it is already used, but it should be used to check for native types in signatures... 18:19
18:27 rblasch joined
pmurias handle_return_mold in ControlExceptionReturn use RI test 18:27
ruoso pmurias, right... 18:30
pmurias, anyway... I think it's best if we keep the already implemented exceptions as they are now...
so we can close this refactoring
18:30 japhb joined
pmurias what is handle_return used for? 18:31
ruoso it is the actual traversal of the exception throwing 18:33
oh... wait... that's throw
ah
pmurias, it implements the: 18:34
if $e.routine === &?ROUTINE { handle... } else { rethrow... }
18:36 jbt joined 18:41 rindolf left 18:44 jrockway left
pugs_svn r26505 | ruoso++ | [re-smop] idconst_message.ri implements Str returning self, as idconst supposedly does Str... 18:44
ruoso rakudo: say ControlExceptionReturn.HOW; 18:45
p6eval rakudo 6f1649: OUTPUT«Could not find non-existent sub ControlExceptionReturn␤current instr.: '_block14' pc 53 (EVAL_16:37)␤»
ruoso Tene, you were talking about exceptions... this is an important mismatch...
18:46 eternaleye left
Tene ruoso: Rakudo doesn't have any exception classes but Exception. 18:46
rakudo: say Exception.HOW
p6eval rakudo 6f1649: OUTPUT«␤»
Tene ruoso: I couldn't find any list of what exception classes Perl 6 should have.
ruoso Tene, that isn't very clear yet... but Control exceptions have the name defined with the "ControlException" prefix 18:47
and ControlExceptionReturn is one that should be there for sure
so as ControlExceptionWarn 18:48
ControlExceptionNext
ControlExceptionLast
and so on
Tene Huh, okay.
I'll look at it.
18:50 jrockway joined
ruoso pmurias, are you porting over ControlExceptionReturn? 18:50
jnthn It'd probably be helpful if the exception hierarchy got filled out a little. 18:51
Tene ruoso: are there any tests for these?
ruoso hmm... you mean one using the actual name? 18:52
I'm not sure there are...
pmichaud even just seeing a real blessing of "ControlException" would be nice.
or I guess we can decide that it's correct by implementation consensus. 18:53
ruoso pmichaud, there's something in the irc log some time ago...
pmichaud there are lots of things in the irc log :-(
ruoso TimToady had blessed it
pmichaud looks like 08-12-24
ruoso pmichaud, link? 18:54
jnthn Somebody should probably JFHackItIntoTheSpec.
ruoso (for the sake of documenting)
pmichaud something to be said for ControlException in front instead
19:44
oops
irclog.perlgeek.de/perl6/2008-12-24#i_785232
Not exactly a blessing of "ControlException" into the spec, but a reasonable start. 18:55
ruoso but basically... there is no function to generically raise control exceptions (as fail does with failures) 18:58
all control exceptions need to be raised from its own object
18:59 barney left
ruoso and functions like "return", "goto", "next", "last" are the things that raise the specific control exceptions 18:59
pmichaud I was referring only to the name. The rest of it we pretty much have in Rakudo already. 19:00
ruoso is the return already fixed?
pmichaud if you mean that it returns from its lexical scope -- not yet. 19:01
but the basic control structures being functions that raise the appropriate exceptions -- aye, we have that.
we could probably get 'return' fixed now with the increased levels of introspection we have available. 19:02
Tene what is the 'return' issue?
pmichaud But I also want to get Parrot to handle .leave semantics more directly than we do now.
ruoso Tene, return inside closure sent as argument to another routine
ruoso can't remember the ticket id 19:03
pmichaud I'm getting the ticket #... just a sec
RT #61126
Ideally what I'd like return to do is to find its lexical outer Routine, and then invoke .leave on that. 19:04
19:04 nihiliad left
ruoso pmichaud, I'm not sure you can 19:04
pmichaud alternatively it needs to throw a return exception that is tagged to its lexical outer
Tene I could do that. 19:05
ruoso because you could interfere that by providing a manual CONTROL block to the routine
Tene I already have a sketch of it.
ruoso sub bar($code) { $code(); CONTROL { say "hello" }};sub foo { bar { return 1 }; return 2; }; say foo
it should say "hello" and return 1 19:06
pmichaud ruoso: I'm not sure that's what the spec indicates.
at least, that doesn't match my understanding of it.
ruoso hmm... that's pretty much what I understand of it ;) 19:07
19:07 orafu left, orafu joined
ruoso pmichaud, do you agree that return is implemented in terms of control exceptions? 19:08
pmichaud sure.
and Rakudo currently implements it that way.
19:08 [particle]2 joined
ruoso do you agree CONTROL should be able to handle any control exception? 19:08
pmichaud ruoso: S04 says: "If you pass a closure 19:09
object outside of its official "sub" scope, it is illegal to
return from it. You may only leave the displaced closure block itself
by falling off the end of it or by explicitly calling C<leave>.
19:09 nihiliad joined
ruoso hmm.... 19:09
is that new?
pmichaud I don't know how new that is.
I just know what the spec says. :-)
19:10 gottreu left
Tene svn blame ftw 19:10
ruoso pmichaud, that indeed enable some simplifications in return 19:11
pmichaud even presuming that we can pass a closure containing 'return' to bar() above, I'm not sure that bar's CONTROL block is allowed to intercept the return exception.
ruoso but it seems to be specific to return, not to CONTROL in general 19:12
if return is a control exception it goes through the dynamic scope
so bar can intercept it 19:13
pmichaud that also doesn't match my understanding of the spec.
19:13 nihiliad left
pmichaud we only search the outer dynamic scopes if there's not a lexical scope matching the type of control exception being thrown. 19:14
ruoso huh?
that's for finding a symbol...
you don't go running CONTROL and CATCH of outer scopes...
but of caller scopes
pmichaud S04 again: "Much like 19:15
C<return> may only return from an "official" subroutine or method,
a loop exit like C<next> should be caught by the construct the user
expects it to be caught by. In particular, if the user labels a loop
with a specific label, and calls a loop control from within the lexical
scope of that loop, and if that call mentions the outer loop's label,
19:15 AzureStone_ joined
pmichaud then that outer loop is the one that must be controlled." 19:15
ruoso that only specifies the expected behavior of next....
19:15 AzureStone left
ruoso which means that the default CONTROL block of a loop should look for the label when handling the control exception 19:16
but it is a plain control exceptions
therefore subject to CONTROL blocks
19:16 nihiliad joined
pmichaud in the dynamic scope as well, assuming the lexical scope is available? 19:16
ruoso the lexical scope is not queried at all 19:17
it goes straight to the dynamic scope
pmichaud S04 again: "If there is no such lexically scoped outer loop in the current subroutine, 19:18
then a fallback search is made outward through the dynamic scopes in
the same way Perl 5 does."
Note the if clause.
although it is qualified by "in the current subroutine".
ruoso that's specific to the implementation of the default CONTROL of the loop statements
19:19 justatheory left
pmichaud I have trouble seeing which control exceptions you're referring to then, if not return or next/last/redo. 19:19
ruoso it is all of them
in a more generic way
CONTROL blocks see *all* control exceptions
pmichaud but not all control exceptions go through the dynamic stack. 19:20
19:20 acajou joined
ruoso that's the point 19:20
all control exceptions go through the dynamic stack
"all exception handlers run in the dynamic context"
19:21 orafu left
pmichaud I think that the fact that next/last/redo and return don't honor the dynamic stack seems to contradict your statement. 19:21
19:21 orafu joined
ruoso it does honor the dynamic stack 19:21
pmichaud i.e., they first react lexically, _then_ they look through the dynamic stack.
19:21 xinming_ joined
ruoso what happens is that the implementation of the implied CONTROL block for routine declarators and loop statements, not which CONTROL block is executed 19:22
pmichaud, my point is that all CONTROL blocks are going to be executed in the way 19:23
what happens is that there are some implied CONTROL blocks
in routine boundaries
and in loop statements 19:24
and the implementation of that implied blocks are the ones that take care of only returning from the correct routine... or going next on the correct loop 19:25
pmichaud ruoso: I'm sorry, but I don't see it that way in the spec. 19:26
ruoso pmichaud, I honestly don't see how you can think of them as control exceptions and not going through the dynamic stack directly... 19:27
pmichaud I'm saying they go through the dynamic stack if they aren't handled lexically. 19:28
ruoso but how do you handle an exception lexically?
what does it mean?
pmichaud the same way that 'return' is tied to the lexical sub in which it's written. 19:29
next/last/redo can be tied to the looping construct in which they are written
in particular, saying "next LABEL" will always trigger a lexically-available LABEL in preference to a dynamically-available one. 19:30
ruoso that's simply the implementation of the implied CONTROL blocks
not the behavior of "goto" itself
nor "return", "next", "last" etc 19:31
I mean...
the "goto" function
pmichaud again, that doesn't appear to be written as you describe it in the spec.
ruoso the functions are simply meant to instantiate and throw the specific control exception
TimToady I think ruoso's view is the more accurate here; in the abstract, we always throw the control exception up the dynamic stack, but we may already have labelled it with the lexical scope it's aimed at 19:32
the optimizer can get rid of the dynamic throw if it can prove no CONTROL blocks interfere
pmichaud TimToady: and inner dynamic routines' CONTROL blocks can catch the exception?
TimToady and well-behaved CONTROL blocks won't usurp the lexical semantics
pmichaud fair enough. 19:33
ruoso but bad-behaved CONTROL blocks can indeed happen...
TimToady and one-person's bad-bahaved is someone else's killer feature--see AOP :)
ruoso TimToady, is the "If you pass a closure object outside of its official "sub" scope, it is illegal to return from it" new? 19:34
pmichaud is it possible for dynamic inner CONTROL blocks to see a return exception, or is that outside of what ruoso just cited?
TimToady no, it's pretty old
ruoso I think I over-read it
TimToady and falls out from the fact that the lexical label just won't be found in the dynamic stack
ruoso a return inside a map is made impossible by that line
ahhh... 19:35
you got it wrong...
pmichaud,
it's not about the example in the RT ticket
TimToady a return inside a map returns from the map only if the first arg was a sub {}
well, returns from the sub in the map
otherwise return returns from the sub surrounding the map 19:36
ruoso that quote is about
TimToady yes, inner CONTROl blocks can examine the return exception as it goes by
the optmizer should not be trying to eliminate that throw
ruoso sub closure_generator { return { return 1 }; }; my $code = closure_generator(); sub bar($code){ $code.() }; foo($code) 19:37
19:37 rindolf joined
ruoso the above example is illegal 19:37
TimToady yes, it is
ruoso that's what that quote is about
19:37 abra left
pmichaud and 19:38
19:05 <ruoso> sub bar($code) { $code(); CONTROL { say "hello" }};sub foo { bar { return 1 }; return 2; }; say foo
ruoso that is legal
TimToady has to be written &CALLER.leave(1) or some such
pmichaud is valid, and produces 'hello 1' as ruoso said.
19:38 xinming left
ruoso I think that quote could be re-written as "it is illegal to use the return function in a closure whose outer scope was already destroyed" 19:39
ok... not destroyed... but maybe "lost" instead 19:40
19:40 justatheory joined
pmichaud in ruoso's bar() example, does the CONTROL block make it considered to have handled the return exception? Or is it treated as not handled by default? 19:40
i.e., because we didn't specifically test the exception itself
ruoso I've been assuming that for a while now
TimToady I think everything a CONTROL block does must be explicit, perhaps
pmichaud ruoso: assuming that the exception isn't handled? 19:41
ruoso TimToady, I like that
TimToady so nothing gets handled merely by testing
pmichaud that's true for CATCH also?
or just CONTROL ?
ruoso just CONTROL, or else you get much more verbose code for CATCH
TimToady so there's some primitive access to $!.handle_it available to CONTROL blocks to stop propagation
just CONTROL, I think 19:42
ruoso TimToady, what about CONTROL having to re-trhow the exception when appropriate?
TimToady proper Huffman, since people aren't supposed to write CONTROL often
pmichaud okay, so all CONTROL block exceptions are not handled unless the block explicitly does something to handle it.
er, to mark it as "handled"
TimToady well, explicit rethrow is the other way to default it
can argue it either way 19:43
when * { rethrow } is pretty short
on the other hand, we want whatever is fastest
it's really another dispatcher problem with a list of candidates 19:44
so the argument is over whether we're defaulting to . or .* semantics :)
and whether we require poeple to say "next" vs "lastcall" 19:45
s/oe/eo/
only those are called rethrow vs handled 19:46
so it's possible there's another unification waiting here somehow
ruoso for SMOP, rethrow is pretty straight forward
because we are very continuation-oriented...
TimToady it might not be for some VMs though
ruoso but I guess that whatever is decided can be adapted from the code to the expected behavior 19:47
TimToady unfortunately, we can't implement CONTROL calls in terms of callnext/lastcall if those are implemented in terms of CONTROL...
pmichaud TimToady, ruoso: thanks for the clarification on CONTROL -- that will be very helpful. 19:49
TimToady I'm still inclined to think that CONTROL { } is a no-op, and rethrow is just "keep going"
and stopping that is explicit somehow
ruoso TimToady, in fact... CONTROL { } and CONTROL { $_.rethrow } are really the same thing...
in terms of what can be done, I mean... 19:50
TimToady in SMOP, you mean
pmichaud I tend to prefer the notion that CONTROL { } is a no-op. 19:51
TimToady they might be very different in other VMs, unless we define rethrow to be to just leave the CONTROL block
pmichaud The idea that CONTROL { } means "intercept all control exceptions and do nothing with them" kinda bugs me.
19:51 ispy_1 left
TimToady I don't want to make life all that easy for the writers of CONTROL blocks; they should suffer a little :) 19:51
ruoso TimToady, I mean that in terms of the compiler, it will be compiled to one thing or the other... it really is purely a syntax decision...
TimToady but they have to be FAST
ruoso (in SMOP, explicit rethrow is faster) 19:52
as implicit would require an additional test...
pmurias ruoso: porting over, not today 19:53
ruoso pmurias, ok... I'll see if I do it...
pmichaud, syntatically... we could imply that every CONTROL block has an implicit "when * { .rethrow }" 19:56
pmichaud ruoso: that works for me. 19:57
TimToady what if when FooException doesn't handle it and breaks out?
that won't hit the 'when *' default case 19:58
but the Really Default semantics
and that could be either assuming . or .* semantics
so I think implicit 'when *' doesn't cut it
ruoso but thinking about it... it kinda makes sense...
that means that if you use "when" inside a CONTROL, you better rethrow if that's what you mean 19:59
so, it's kinda making it handled by matching in the when...
TimToady so your arguing for CATCH semantics, basically 20:00
ruoso kinda... 20:01
CATCH still does an "if"
it only rethrows if it's not handled
I could argue that CATCH could behave like this as well 20:05
TimToady maybe CONTROL blocks should be required to be explicit about everything, and die horribly if the response is "I dunno". then the optimizer could decide what can be a no-op.
ruoso you mean CONTROL { } to be a no-op or not? 20:06
TimToady that would then die horribly
ruoso I'd be fine with that...
TimToady so you must have a when *, and each when Foo must be explicit in rethrow or handle 20:07
ruoso but it looks strongly continuation-oriented
pmichaud I think die horribly seems good.
TimToady as I say, I'm not trying to simplify the lives of CONTROL block writers, who should be discouraged whenever possible. :)
ruoso ok... so CONTROL {} is plain wrong... 20:08
TimToady so I think the right default is NO default
yes, that'd be wrong under this view
pmichaud CONTROL {} indicates a lack of control on the part of the author. :-)
[particle]2 if being specific means it'll be fast and unambiguous, let the module authors come up with syntax sugar
20:08 [particle]2 is now known as [particle]-
ruoso ok... so if it leaves a CONTROL block with an unhandled exception, it should break 20:08
TimToady CONTROL {} means "just shoot me"
pmichaud actually, I think that any leaving of a CONTROL block breaks. 20:09
i.e., one has to explicitly get out of the CONTROL block.
TimToady I think getting control flow fast is a good reason to inflict pain
ruoso that should be fine...
pmichaud there's a presumed < die "horribly" > at the end of the CONTROL block.
20:10 azawawi left
TimToady yes, and after it too, to handle ambiguous break exits 20:10
[particle]- so, you can't attach a control block to a control block. 20:11
pmichaud argh... something in parrot has broken rakudo.
ruoso [particle]-, well... that idea looks so weird I can't even think about it...
pmichaud decides to find a particle gun. 20:12
TimToady [particle]-: if that restriction falls out of what we're saying, I'm quite happy with it
ruoso but I guess when running the control block, it is plain code...
[particle]- likes to think of edge cases
ruoso so you can have a control block inside it
TimToady yes, it's plain code, but the question is whether it has to be considered a 'critical' section that locks out similar code somehow 20:15
ruoso well... for SMOP, at least, it makes no difference... 20:16
TimToady might need a conservative approach in 6.0 till we understand that
ruoso more one of those erroneous things?
s/more one/one more/ 20:17
TimToady no, one step beyond erroneous
erroneous still allows divergence
ruoso I'm fine either way...
TimToady being conservative means preventing divergence until we understand it 20:18
ruoso (the problem with that is making the change incredibly hard... as with conservative people in politics ;)
(but I'm still ok with being conservative in that point) ;) 20:19
TimToady ENOBRAINSUGAR
lunch &
ruoso decommute &
acajou rakudo: my @tt = (1, 2, 3, 4); sub zap(@input is readonly) { @input[0] = 666; }; zap(@tt); say @tt[0]; 20:26
p6eval rakudo 6f1649: OUTPUT«666␤»
acajou bug or feature?
And
rakudo: my @tt[4] = (1, 2, 3, 4); sub zap(@input is readonly) { @input[4] = 666; }; zap(@tt); say @tt[4];
p6eval rakudo 6f1649: OUTPUT«Statement not terminated properly at line 1, near "[4] = (1, "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:85)␤»
acajou Oops, wrong version...
rakudo: my @tt = (1, 2, 3, 4); sub zap(@input is readonly) { @input[4] = 666; }; zap(@tt); say @tt[4];
p6eval rakudo 6f1649: OUTPUT«666␤»
acajou Also: bug or feature? 20:27
PerlJam looks like a bug to me 20:28
moritz_ I don't think that 'is readonly' is implemented
jnthn readonly doesn't extend any deeper than the container.
So AFAIK not a bug.
acajou OK, so the former is a feature. But the second one, I shouldn't be able to grow the array it seems...
jnthn Don't see the difference.
Both call postcircumfix:<[ ]> 20:29
acajou rakudo: my @tt = (1, 2, 3, 4); sub zap(@input is readonly) { @input[4] = 666; }; zap(@tt); say @tt[4];
p6eval rakudo 6f1649: OUTPUT«666␤»
20:29 lisppaste3 joined
jnthn moritz_: is readonly is the default. 20:29
moritz_ rakudo: sub f($x is blah) { say "alive" }; f(2)
p6eval rakudo 6f1649: OUTPUT«alive␤»
acajou The array passed in doesn't have a [4]th element.
pmichaud I would guess that postcircumfix:<[ ]> needs to honor the readonly attribute on @input
jnthn pmichaud: I didn't think readonlyness extended down a level? 20:30
pmichaud jnthn: surely @input is readonly should mean that one cannot add new elements to @input, yes?
or what is it about @input that is "readonly"?
jnthn rakudo: sub foo(@foo) { @foo = 1,2,3,4; } my @x = <a b c d>; foo(@x); say @x; 20:31
p6eval rakudo 6f1649: OUTPUT«Statement not terminated properly at line 1, near "my @x = <a"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:85)␤»
jnthn rakudo: sub foo(@foo) { @foo = 1,2,3,4; }; my @x = <a b c d>; foo(@x); say @x;
p6eval rakudo 6f1649: OUTPUT«Cannot assign to readonly variable.␤current instr.: 'die' pc 17536 (src/builtins/control.pir:225)␤»
jnthn That'.
pmichaud but you're saying that @foo[99] = 5; would be valid there?
jnthn I think so...though I may be wrong. 20:32
pmichaud I can understand that @foo[0] = 5; might be valid, because we're modifying @foo[0] (as opposed to @foo)
acajou Seems odd to allow a read-only object to grow its length....
jnthn As far as I understood it though, readonly protection only affects the variable itself.
pmichaud but @foo[99] is definitely modifying @foo.
jnthn Yeah, interesting case.
But that means postcircumfix:<[ ]> would need to know about read-onlyness. :-S 20:33
acajou is readonly should default to a fixed length for an array
(though fixed length arrays don't appear to exist yet.)
imho...
eric256 wouldn't the = be what needs to know about readonly not the [ ]?
pmichaud jnthn: it's okay if postcircumfix:<[ ]> knows array readonly ness.
jnthn pmichaud: Yeah, perhaps. 20:34
pmichaud argggh, I'm getting runtime failures in rakudo spectests.
I wonder if it's a 64-bit issue.
jnthn I'd just understood it as, if you call a method on some data structure that was passed as a read-only parameter, it could do what it likes.
And postcircumfix:<[ ]> is just a method call...
We could treat this case specially though, for sure. 20:35
moritz_ jnthn: for scalars that's definitively true
pmichaud sounds like it needs clarification from p6l.
moritz_ jnthn: I don't know if that's intended like that for containers as well
acajou Well, allowing @foo[99]=1; doesn't seem very DWIMish to me...
jnthn Thing is, push would also need to know about this...
etc
pmichaud and unshift.
moritz_ all modifying methods would need to know it
acajou But once fixed length arrays exist, will that not be necessary anyway? 20:36
moritz_ only where they are used
acajou and is readonly should tranform an array into fixed length within its context...(no?) 20:37
(AFK)
pmichaud is readonly should generally not be doing any sort of transformation.
that's kinda the point of "readonly"
meppl good night 20:38
20:43 meppl left
pugs_svn r26506 | pmichaud++ | [t/spec]: underscore matches <alpha> -- RT #65138. 20:45
20:59 iblechbot left 21:01 eric256 left 21:04 dolmen joined
pugs_svn r26507 | ruoso++ | [re-smop] ported over ritest, capturize and ControlExceptionReturn... now mildew tests are failing because its not finding $_ in the lexical scope... that looks like its missing the default block signature... 21:04
Tene Can anyone help me with some class construction issues?
21:05 ruoso left
Tene if I define BUILD in a parent class, it's called multiple times for each level of the class hierarchy 21:05
gist.github.com/102721
I tried adding an attribute to the class (has $.built) and checking that, but that gets weird errors... 21:06
21:06 payload left 21:07 rindolf left 21:08 orafu left 21:09 orafu joined 21:10 nihiliad left
Tene rakudo: class A { has $.foo is rw; submethod BUILD($item) { $item.foo = 1 } }; my $a = A.new(); 21:11
p6eval rakudo f93154: OUTPUT«Null PMC access in getprop()␤current instr.: 'infix:=' pc 15704 (src/builtins/assign.pir:20)␤»
21:13 dukeleto left
Tene Oh, the issue with submethods is that they shouldn't be inherited by ancestors? 21:14
erm... descendants?
moritz_ that's one of the issues
Tene The other issue was me trying to work around that. :) 21:15
jnthn submethods work - what is wrong is (at least) that when you replace the default BUILD with your own one, you lose the code that puts the initial scalar or other container PMC into the attribute.
Since the default BUILD does that. 21:16
We probably need to thus move the code doing that elsewhere.
Tene jnthn: any ideas on how to run something just once on class instantiation?
jnthn So you can write a BUILD and have it work.
BUILD should do it. I wonder if we're not calling the submethod through the correct dispatcher though...
Tene jnthn: if I define a submethod BUILD in a parent class, it's called once for each descendent class 21:17
gist.github.com/102721
moritz_ Tene: there's also a ticket for that one 21:20
jnthn Aye. 21:22
I'll try and look at and clean this stuff up soon.
Tene :)
jnthn: do I have any patches left I've promised you I'd work on?
jnthn Already promised to work on constants tomorrow.
Tene: How's the annotations/backtrace one going? Still blocking on the "it changes Parrot error messages" issue? 21:23
Tene pm suggests I just put it in PCT instead of Parrot
The issues I had when trying to get it to change nothing if there were no annotations was that I was somehow getting a 0 instead of NULL 21:24
pmichaud Tene: if it fits well in Parrot, go there. If it doesn't fit well in Parrot, it's okay to put in PCT. 21:25
21:25 PhatEddy joined
pmichaud I vote to go with your best judgement on this one :-) 21:25
Tene OK
pugs_svn r26508 | moritz++ | [t/spec] test for RT #65138, Foo::_foo() parsefails (and change fudging a bit) 21:27
21:33 wknight8111 joined 21:34 skids_ left 21:44 Schnueff_ left 21:46 payload joined, justatheory left 22:04 dduncan joined
acajou Gotta run, but I still think allowing this is kinda odd: 22:05
rakudo: my @tt = (1, 2, 3, 4); sub zap(@input is readonly) { @input[99] = 666; }; zap(@tt); say @tt[99];
p6eval rakudo f93154: OUTPUT«666␤»
22:06 iblechbot joined
acajou Though maybe it's ok given that I didn't say my @tt[4] = (1, 2, 3, 4); 22:06
(which doesn't parse right now...)
acajou waves 22:07
22:07 acajou left
dduncan question ... what are some good examples, if any are better than STD.pm, of Perl 6 grammars, particularly demonstrating a difference between tokens and rules 22:08
moritz_ if STD.pm is too complex, rakudo's grammar might be easier for you 22:09
dduncan I'm wanting to enhance my grammar for my new programming language to specify places where it adds or changes information that ends up in the parse tree, such as node names
moritz_ (but the difference is really simple - whitespaces in rules are substituted internally by <.ws>) 22:10
dduncan eg, if it finds a run like 'foo' then I want it to turn it into something like [Text, 'foo'], and how to say that
moritz_ ah for that you need action methods
dduncan I thought a diff between a rule and a token is that a rule adds action specifiers while a token is strictly "match what looks like this" 22:11
moritz_ rakudo: grammar A { token TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { make ['Text', ~$0 } } }; A.parse("'foo'", :actions(B.new)); say $/.ast.perl; 22:12
p6eval rakudo f93154: OUTPUT«Statement not terminated properly at line 1, near "['Text', ~"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)␤»
moritz_ dduncan: no, actions are marked with {*}, and are indpendent of the token/rule distinction
rakudo: grammar A { token TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { make ['Text', ~$0] } }; A.parse("'foo'", :actions(B.new)); say $/.ast.perl;
p6eval rakudo f93154: OUTPUT«""␤»
22:12 orafu left
moritz_ rakudo: grammar A { token TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { make ['Text', ~$0] } }; A.parse("'foo'", :action(B.new)); say $/.ast.perl; 22:13
22:13 orafu joined
p6eval rakudo f93154: OUTPUT«""␤» 22:13
pmichaud dduncan: the only real difference between token and rule is the handling of whitespace in the pattern
dduncan oh?
pmichaud a rule is simply a token with :sigspace set.
arnsholt I just looked up the difference between token and rule, and according to S05, the difference is that tokens never backtrack by default, as opposed to rules, which do
dduncan I'll have to remind myself what sigspace is
...
pmichaud regexes do not backtrack by default. 22:14
dduncan I see
pmichaud regex: backtracking
moritz_ pmichaud: huh?
pmichaud backwards
moritz_ regexes backtrack
pmichaud regexes backtrack by default
rules do not backtrack by default
moritz_ tokens and rules don't
pmichaud a token is simply a regex with :ratchet set
a rule is simply a token with :sigspace set
moritz_ rakudo: grammar A { token TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { make ['Text', ~$0] } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl; 22:15
p6eval rakudo f93154: OUTPUT«no match␤current instr.: 'die' pc 17536 (src/builtins/control.pir:225)␤»
arnsholt Indeed. If I'd read the whole section I might even have figured that out by myself...
moritz_ rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { make ['Text', ~$0] } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl;
p6eval rakudo f93154: OUTPUT«["Text", "foo"]␤»
moritz_ that was a classical example of backtracking FAIL ;-) 22:16
dduncan another grammar question, I may return to my first question ... regarding the syntax for "<mylistitem> ** <mylistsep>", does that only match a list of at least one item, or will it match a zero-item list too?
moritz_ .*? can't work without backtracking
pmichaud currently PGE treats it as "at least one item"
moritz_ dduncan: the example above should give you an idea of how to do transformations from grammars
dduncan okay
pmichaud all of the descriptions in S05 seem to imply that <item> ** <sep> match at least one <item>, so that's what we've gone with. 22:17
To include the possibility of zero, it's: [ <item> ** <sep> ]?
dduncan that's what I've been doing so far
but I thought I'd see if my ** assumption was false 22:18
seems not atm
fyi, right at the moment I'm mainly looking to write an illustrative grammar for my language spec, which doesn't necessarily have to run, though I will want to make a version that runs soon after 22:19
pmichaud dduncan: excellent
dduncan but where the illustrative version can be correct without being too complicated, I prefer to be correct
moritz_ dduncan: IMHO grammars work pretty well in rakudo... the action methods don't, they tend to segfault when it gets too complicated
dduncan I thought I'd prefer to use the Perl 6 grammar syntax rather than BNF or whatever 22:20
pmichaud action methods segfault? hmmm.
moritz_ pmichaud: yes, I've written a ticket for that...
pmichaud if you can find the ticket, I'd like to look closer at it. 22:21
moritz_ pmichaud: and then later on tried to rewrite the actions for a XML grammar by masak, and it also segfaulted pretty soon
pmichaud (will have to do it later tonight, though -- fixing dinner here)
dduncan fyi, search.cpan.org/dist/Muldis-D/lib/M...D_Tiny.pod is the most recently published version of what I'm talking about ... right now I'm pushing to partially rewrite and otherwise complete the grammar, which currently just does literals, so it does everything else (routine, type defs, etc)
moritz_ I've never been able to reduce it; when the example is too simple it just works... rt.perl.org/rt3/Ticket/Display.html?id=64208 22:22
(hilight pmichaud so he'll see the link)
dduncan my tokens/rules question related to adding capturing groups in such a way that the result can be similar to another dialect of the language which is specified as Perl data structures
pmichaud moritz_: part of the difficulty with that example is that $_ isn't set.
so there's not really anything for when * { ... } to smartmatch. 22:23
dduncan if I can say what I want easily in the grammar I will, otherwise I'll just describe it in human text comments about "this is interpreted as ..."
that is all for the moment
thank you
moritz_ pmichaud: quoting the ticket "(adding a given $what { ... } around it makes no difference)."
dduncan: the best way to get familiar with the match tree is to write some really simple grammars (like, 3 or 4 rules) and then 'say $/.perl 22:24
pmichaud the other difficulty might be that (I think) the block for the when gets its own $/
moritz_ '
dduncan okay
pmichaud I wonder if the $/ isn't being bound properly.
at any rate, segfault is definitely the wrong answer. I'll give it a try a bit later.
moritz_ rakudo: grammar A { token TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl; 22:25
pmichaud (claiming ticket)
p6eval rakudo f93154: OUTPUT«no match␤current instr.: 'die' pc 17536 (src/builtins/control.pir:225)␤»
moritz_ rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl;
p6eval rakudo f93154: OUTPUT«["Text", "foo"]␤»
dduncan I'll get to such experimentation before too long, though right now I'm going for the low hanging fruit of what I can approximate without actually executing anything
moritz_ rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { if 1 { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl;
p6eval rakudo f93154: OUTPUT«["Text", "foo"]␤»
dduncan I will study the Rakudo source as suggested though
moritz_ feel free to come back with questions 22:26
pmichaud rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { when * { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl; 22:27
p6eval rakudo f93154: ( no output )
pmichaud rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl;
p6eval rakudo f93154: OUTPUT«["Text", "foo"]␤»
pmichaud rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { when True { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl;
p6eval rakudo f93154: OUTPUT«Method 'ACCEPTS' not found for invocant of class ''␤current instr.: 'infix:~~' pc 21988 (src/builtins/match.pir:18)␤»
pmichaud rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { when ?(1) { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl; 22:28
p6eval rakudo f93154: ( no output )
moritz_ heh, another bug ;-)
pmichaud it must have something to do with the way that 'when' is setting things up.
moritz_ pmichaud: "no output" seems to mean "segmentation fault"
pmichaud rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { if 1 { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl;
p6eval rakudo f93154: OUTPUT«["Text", "foo"]␤»
pmichaud rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { if 0 { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl; 22:29
p6eval rakudo f93154: OUTPUT«"'foo'"␤»
moritz_ pmichaud: I only see that on p6eval's console, I haven't found a way to print it back to IRC
22:29 iblechbot left
dduncan it does appear though that tokens are indeed what I want to use right now rather than rules ... less magical ... and a quick scan through STD.pm shows it uses mostly tokens also 22:30
pmichaud in general, 'token' is for things that don't have spaces 22:31
22:31 km2 left, km2 joined
dduncan well in that case, maybe rules are what I want often times ... looking ... 22:32
pmichaud token is also for things where you need very tight control of spaces
22:32 km2 left
dduncan in most places, I have been specifying whitespace as \s* 22:32
pmichaud rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { if $_ ~~ ?(1) { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl; 22:33
p6eval rakudo f93154: OUTPUT«["Text", "foo"]␤» 22:34
pmichaud definitely tied to when.
rakudo: grammar A { regex TOP { \' (.*?) \' {*} } }; class B { method TOP($/) { if $_ ~~ * { make ['Text', ~$0] } } }; A.parse("'foo'", :action(B.new)) or die 'no match'; say $/.ast.perl;
22:34 orafu left
p6eval rakudo f93154: OUTPUT«["Text", "foo"]␤» 22:34
22:34 orafu joined
dduncan another question ... is there an easy way to say that certain things in an inner context are only allowed to match when that is within an arbitrarily far away outer context? ... 22:37
for example, I have a number of syntaxes for selecting anonymous collection values, which if composed into an expression tree that is part of a routine or type def, may include a function invocation, ... 22:38
but if that syntax is used standalone, outside eg a func def, then a function call isn't allowed, and only literals etc are 22:39
unless there's an easy way to say this, I was going to make 2 versions of the syntax, one for value expressions inside routines, and the other for ones outside them, which are then just constant declarations 22:40
my question was whether I could save some redundancy or whether it doesn't matter to have such redundancy
if code examples are needed to understand my question, I can provide them 22:41
22:41 dolmen left
dduncan basically the distinction is like the difference between compile time and runtime evaluation, where routines may not be invoked at compile time 22:42
but stuff like anonymous Perl hash or array etc constructions are allowed both times
that's not strictly what is going on here, but it should be illustrative 22:43
22:44 rblasch left 22:51 Kisu left, Kisu joined 22:53 jbt left 22:56 simcop2387 left 22:58 justatheory joined 23:00 skids_ joined 23:27 justatheory left 23:38 orafu left, orafu joined 23:39 pmurias left, justatheory joined 23:51 Limbic_Region joined 23:52 bacek joined 23:57 alester left