»ö« 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.
00:00 gabiruh joined
pmichaud Is this just S10:182 that you are talking about? 00:00
sorear I'm not talking relative to any specific bit of spec 00:01
I'm just trying to make it work usefully :)
but I think I have an improved idea of how this stuff should work.
jnthn pmichaud: I...can't see how 182 relates.
pmichaud: But also what sorear said.
:)
pmichaud: Did you mean 128? 00:02
That seems much more related.
pmichaud yes, 128
I _really_ need a new keyboard.
sorear perl6_set_types_{mu,junction,list_array,enummap_hash,ins,packagehow} bug me.
jnthn Such empty packages may be subsequently be redeclared as any other 00:03
package-like object (module, class, etc.), and no redeclaration warning will be issued
pmichaud the tops of the keys on this one are so worn that I can't find the home keys by feel
jnthn for such a redeclaration.
...yes, fits in.
pmichaud that's "stealing packages".
jnthn pmichaud: Wow. That's quite some typing.
pmichaud: Seems to.
pmichaud I think this keyboard is close to 7 years old.
I've looked at others over the past couple of years but didn't find any I like better. 00:04
jnthn sorear: Then don't copy them into Niecza :)
sorear you're embarrassing me... my keyboard is like 8 years old and is still working perfectly
jnthn pmichaud: Yeah, mine is also overdue replacement...
But also very comfy. :)
And I can still find the home keys :)
pmichaud sorear: maybe you just program more efficiently than I do. :)
on my keyboard the little dots on the 'f' and 'j' are gone 00:05
sorear maybe I just have softer fingers. ;)
pmichaud I tried added stickers on the keys to be able to figure it out, but the stickers keep sliding off.
jnthn Ah, one mine they're more lumps underneath the f and j
*on
So a bit more to wear away. :)
sorear mine has lumps, but there's so little waer that you can still *read* the keys 00:06
00:07 icwiener joined 00:08 clkao left
sorear why is WHO a STable field, I wonder 00:08
00:08 acrussell left, tokuhirom joined
jnthn sorear: Why *woudln't* WHO be an STable field? :) 00:09
sorear: It not being would force every meta-object to provide that kind of thing.
Probably via a different interface if the HLL wanted to do so.
sorear ohright I forgot you didn't have common ancestry for all HOWs
00:10 clkao joined
jnthn sorear: Right. It's hard to have ancestry without inheritance. 00:10
00:10 lumi_ left
jnthn Plus even if inheritance was a 6model primitive, I still wouldn't want a common root meta-object. 00:11
00:11 lumi_ joined
jnthn Then, 6model is designed to support more than just Perl 6. :) 00:11
00:15 daniel-s_ left 00:16 dju__ joined
jnthn night, #perl6 00:17
00:19 dju_ left 00:28 Trashlord left 00:45 f00li5h is now known as f00li5h[HireMe] 00:56 icwiener left 00:57 tokuhiro_ joined 01:01 tokuhirom left, noganex joined 01:04 noganex_ left 01:12 icwiener joined 01:15 woosley joined 01:18 thou left 01:20 whiteknight left
lichtkind good night all 01:22
01:22 lichtkind left 01:25 icwiener_ joined 01:28 icwiener left 01:33 lumi_ left 01:34 lumi_ joined 01:43 colomon left, colomon joined 01:47 cotto joined 01:48 Tedd1 left 01:49 Tedd1 joined
sorear hmm 01:58
sorear pokes pmichaud
STD keeps filename/line number data for all names poked into stashes
so "class Foo::Bar {}\n...\nclass Foo::Bar {}" gives a more useful error message 01:59
does this make sense in a general Perl 6 context?
pmichaud sorear: makes sense to me, I think.
sorear should every package slot have source location info?
pmichaud pct is set up so that nearly every token can have source location info. of course, the trick is to know what location info to save :) 02:00
sorear not *what* location info to save
*where* to save it
our-scoped items that need redeclaration checking include constants, subs, and packageoids 02:01
it seems it should be stored polymorphically
maybe the WHO object should keep a second hash of location info alongside the normal hash of data 02:02
pmichaud that seems plausible 02:06
02:08 colomon left, colomon joined 02:10 agentzh joined 02:14 thou joined 02:19 lumi_ left 02:20 lumi_ joined 02:30 Trashlord joined 02:32 mberends left 02:37 thou left 03:11 tokuhiro_ left, tokuhirom joined 03:13 Zapelius joined 03:16 lumi_ left 03:17 lumi_ joined 03:26 Su-Shee left 03:28 Su-Shee joined, envi_laptop joined 03:34 donri joined, araujo left 03:40 donri left 04:02 skangas left, skangas joined 04:07 lumi_ left 04:08 lumi_ joined
dalek kudo/nom: 173e019 | pmichaud++ | / (2 files):
Improve register (re-)usage in statementlists and routine_defs.
04:18
kudo/nom: 28995b9 | pmichaud++ | src/Perl6/SymbolTable.pm:
Better register (re-)usage in SC events.
kudo/nom: 2f3a8d3 | pmichaud++ | src/Perl6/SymbolTable.pm:
Put PAST::Stmt register boundaries on ST.set_attribute[_typed].
kudo/nom: 2f7c19f | pmichaud++ | / (17 files):
Merge branch 'nom' of github.com:rakudo/rakudo into nom

Conflicts: src/Perl6/Actions.pm
04:20 tokuhiro_ joined 04:23 tokuhirom left 04:31 Zapelius left 04:38 wamba joined 04:46 satyavvd joined 04:47 Bzek joined
sorear aww, I saw a nom merge commit and was excited for a moment 04:52
szabgab wikimedia is giving away a few servers
blog.wikimedia.org/2011/06/13/serve...donations/
04:52 lumi_ left 04:53 lumi_ joined
szabgab if you guys think the perl 6 development could use such a server then pls contact TPF - which I am not affiliated with - to try to arrange one 04:53
sorear: do I know correctly that moritz is running the perl6 evalbot here? 04:54
sorear szabgab: moritz does 90% of the maintaince, but diakopter's name is on the VPS contract, and I occassionally do work on it too 04:57
szabgab oh, is the evalbot running on a VPS ? 04:59
what are teh parameters of that machine?
sorear What do you mean? 05:01
/proc/cpuinfo says "QEMU Virtual CPU"... 05:02
szabgab memory size I guess
sorear free -m thinks 2GB
szabgab and I wonder how is the CPU allocated on such things
I never had a VPS 05:03
sorear I know it's quite fast
szabgab I keep renting iron
sorear I just did time perl -E 'for (1 .. 100_000_000) { }', ran 3x faster on the p6eval VPS than on my local computer 05:04
5.4s 05:05
05:09 JimmyZ joined 05:13 koban joined
dalek ecza: e51f7a9 | sorear++ | / (3 files):
[remove-CURLEX] Reimplementation of STD is_name
05:13
ecza: 6083fb7 | sorear++ | src/niecza:
Use metamodel to verify $?FOO references. Add placeholders to metamodel immediately.
ecza: 6cb84d6 | sorear++ | src/niecza:
Remap is_known to is_name
gnet dalek-poller: 303ac6a | sorear++ | push.psgi:
Drop commit packets with >15 commits, with a warning to the offender
05:18
gnet dalek-poller: b72de5a | sorear++ | push.psgi:
Improve message after heuristic merge detection
gnet dalek-poller: 39e7ab0 | sorear++ | push.psgi:
Fix UTF8 handling in push mode.
05:19 roen joined
dalek lek-poller: 303ac6a | sorear++ | push.psgi:
Drop commit packets with >15 commits, with a warning to the offender
05:20
lek-poller: b72de5a | sorear++ | push.psgi:
Improve message after heuristic merge detection
lek-poller: 39e7ab0 | sorear++ | push.psgi:
Fix UTF8 handling in push mode.
lek-poller: 710078d | sorear++ | poll:
Disable tpfwiki tracking due to spam
05:22
lek-poller: 46fdf61 | sorear++ | push.psgi:
Make github pushes work again
05:37 Tedd1 left
masak morning, #perl6. 05:38
05:39 hudnix left 05:43 Tedd1 joined
tadzik morning masak 05:44
05:45 kaare_ joined 05:49 lumi_ left, lumi_ joined 05:51 masak left
tadzik 34 seconds to pir, 3 to pbc. Very nice 05:53
JimmyZ morning masak!
06:05 wamba left
sorear o/ masak 06:13
Su-Shee good morning. 06:19
tadzik good morning Su-Shee 06:24
sjn good morning, #perl6 06:27
06:29 lumi_ left 06:30 lumi_ joined 06:37 cosimo left 06:48 amkrankruleuen left 06:49 amkrankruleuen joined 06:56 mj41 joined, TiMBuS joined 07:03 amkrankruleuen left 07:04 amkrankruleuen joined 07:06 JimmyZ left 07:08 Tedd1 left 07:09 Tedd1 joined 07:11 thou joined 07:20 amkrankruleuen left 07:36 jfried joined 07:47 thou left 07:48 amkrankruleuen joined 07:49 woosley left 07:53 lumi_ left, amkrankruleuen left 07:54 lumi_ joined 07:56 wamba joined 07:59 fish|ipad joined, fish|ipad left, fish|ipad joined 08:00 mikemol left 08:02 fish|ipad is now known as coopad 08:04 coopad left 08:06 tzhs joined 08:09 amkrankruleuen joined 08:25 jfried left 08:26 dakkar joined
jnthn morning 08:28
moritz mrning 08:34
08:34 jfried joined, daxim joined
tadzik oh, moritz. Could you review my Week #3 in some spare time? 08:36
moritz tadzik: I'm taking a look now 08:37
08:37 jfried left
tadzik great, thanks 08:38
08:39 lumi_ left
moritz tadzik: looking t/01-delimited.t, line 67 08:40
08:40 lumi_ joined
moritz tadzik: whis is that not a code block? 08:40
moritz hasn't taken a look at those tests for far too long 08:41
08:43 roen left
moritz t/02-paragraph.t, '=for foo', could you please add a test that tests the 'foo'? 08:43
tadzik moritz: the 67 is note a code block for it's indented as its delimited parent 08:45
moritz isn't its parent indented 0 spaces_
s/_/?/
tadzik =begin bar is its parent 08:46
moritz =begin bar is the line I'm talking about
tadzik or you mean bar's parent?
moritz and it's parent is =being foo
which is indented 0 spaces
tadzik yes. I don't think delimited block can become code blocks themselves, I thought this works for paragraphs of text only 08:47
tadzik checks the spec
A code block may be implicitly specified as one or more lines of text
I don't think that applies to block declarations 08:48
moritz must reread pod spec
08:48 ruoso left
moritz the point of code blocks is that we don't care what's inside 08:49
tadzik also, as a matter of checking for foo, that's hard due to the fact that it should be Pod6::Block::Named::Foo, which is quite hard to achieve in Rakudo currently. Now as I think of it, it makes sense to add a $.type attribute to block, to be able to detect such things. Plus it's actually useful even if you have the Named::Foo thing
yes
moritz so if something is indented, then we shouldn't be looking at its contents to determine if it's a code block
tadzik but look for example at i.imgur.com/dhljt.png, taken from the spec 08:50
08:50 molaf joined
tadzik if it was like you say, =head2 will become a one-line code block, which imho makes quite little sense and is rather not what the author meant 08:50
I find indenting things such as sections quite natural
moritz the difference here is that there's no newline between =head2 and the previous paragraph 08:51
08:52 ruoso joined
tadzik the pod directive terminates the paragraph before it 08:52
moritz yes
but as I understood S26 last I looked, newline + indention = always a code block
tadzik I don't see anything that would mean such thing, maybe it's a matter of interpretation and then I'll go for 1) DWIM, and 2) Examine the examples in the spec 08:53
also, look at S26:615 example 08:54
moritz S26:615 agrees with you 08:55
but I see that as a conflict 08:56
anyway, I should first check your progress against your schedule
then discuss the indention issue
tadzik: uhm, do you have a link to your proposal? www.google-melange.com/gsoc/project...dzik/18001 shows me only the abstract :/ 08:57
tadzik the indentation issue has a lot of confusion around it, have you seen my discussion with masak++ on Sunday I think? 08:58
moritz: www.google-melange.com/gsoc/proposa...1/tadzik/1 looks ok
I should move that to gsocmess
moritz tadzik: thanks
week 3: \checkmark 08:59
08:59 daniel-s_ joined
moritz back to the codeblock/notacodeblock discussion... 08:59
tadzik: can you give a simple rule when something that is indented is parsed as a code block, and when it isn't? 09:00
tadzik ye4 09:01
yep
09:01 wamba left
tadzik I understand it as the following: a block of text is parsed and formatted as a paragraph when it consists of a positive number of lines of text which do not start with pod directives. When a multiple paragraphs of text occur in a pod block, they are to be separated by blank lines. Now, code blocks follow the same rules, but when they're indented more than their parent delimited block, they become code 09:03
blocks
09:04 jfried joined
moritz so... if something is indented more than its parent, proceeded by a newline, and does not start with a pod directive, it's code? 09:06
that's not a spec I'm particularly fond of, but I can see how you came to that conclusion, and I can live with it
tadzik moritz: I don't think it must neceserilly start with a newline, it's a code block too if it's the only child of its parent, no leading or trailing newlines. Not sure to have tests for that though 09:07
moritz so 09:09
=foo bar
baz
09:10
would that treat baz as code?
tadzik I think so, and I think it's broken for now 09:12
also, code should only be allowed inside pod blocks, list items and semantic blocks, and that's NYI for now 09:13
moritz ok
tadzik I'll finish the name stuff and look into it
moritz wonders if there's a simple way to write an evil helper that interpolates namespaces 09:14
less evil than eval, that is 09:15
tadzik name checking pushed 09:16
moritz tadzik++ 09:17
tadzik also, =foo bar is illegal pod, I assume you mean =for bar
moritz tadzik: let me just say that I'm very happy with your progress and way of interactions so far 09:18
yes *handwave&
tadzik I'm honored to hear that, thank you 09:19
huh, I somehow assumed one wouldn't use code blocks inside paragraph/abbreviated blocks, thanks for pointing that out 09:21
that's probably because of our conclusion that one would generally want to sorround code blocks with blank lines :)
aw, that complicates stuff 09:22
erm, I mean, yay, fun!
09:23 nymacro joined 09:26 lumi_ left 09:27 lumi_ joined 09:32 Shozan joined
tadzik okay, I'm down to one todo due to that NYI I mentioned, I'll try to fix that later today, after the exam 09:33
changes pushed
moritz good luck for your exam 09:34
tadzik thanks, I'm not really worried about this one. Hence I have time for some hacking 3 hours before it :0
:)
09:38 sylwek joined 09:42 sylwek left 09:48 Woodi joined, jfried_ joined 09:49 jfried left 09:50 jfried_ is now known as jfried 10:07 azawawi joined
azawawi hi 10:07
moritz: ping
moritz azawawi: pong
azawawi moritz: any chance you could add #opencsw to your wonderful web-based irc? I asked for their permission and they said yes. 10:08
moritz azawawi: sure
azawawi moritz: thanks! You're the man! :) 10:09
10:09 _ilbot left, _ilbot joined
moritz azawawi: same procedure as last year... please announce the logging URL in the channel 10:10
azawawi moritz: sure
moritz++ # big thanks 10:11
moritz you're welcome
10:12 lumi_ left, lumi_ joined
azawawi an update on what i have been doing lately on Padre 10:14
Padre uses Wx::STC which is basically an older version of Scintilla with a buggy Perl 5 lexer
i started working on a backport of Scintilla to existing Wx 10:15
beta.metacpan.org/module/Wx::Scintilla
i plan to fix Perl 5 bugs, add a more perl-ish API and add a Perl 6 lexer
Padre can now use Wx::Scintilla if it installs to your platform... since it is basically compiling scintilla to your platform and that can easily fail at the moment 10:16
so within a month hopefully i will write a C++ Scintilla Perl 6 lexer (that uses perl6.vim as a basis). 10:17
moritz looks forward to it 10:18
10:22 Woodi left 10:28 azawawi left 10:31 lumi_ left, Woodi joined 10:34 lumi_ joined 10:36 Tedd1 left
slavik1 that will be awesome 10:40
10:43 MayDaniel joined 10:44 Tedd1 joined 10:57 Moukeddar joined 10:58 envi_laptop left 11:01 agentzh left 11:03 azawawi joined 11:04 envi_laptop joined
azawawi moritz: ping 11:11
11:15 MayDaniel left 11:22 Woodi left
moritz azawawi: pong 11:27
Moukeddar Hello guys 11:28
11:29 azawawi left 11:30 nymacro left 11:32 azawawi joined
azawawi moritz: sorry i dc-ed since im using webchat.freenode.net 11:33
moritz: did you get my pm?
moritz azawawi: I got a "hi" as pm
11:35 _ilbot left, _ilbot joined 11:36 Woodi joined 11:39 tzhs left, azawawi left 11:42 leprevost joined 11:47 Shozan left 11:48 Woodi left 11:49 Woodi joined 11:52 lumi_ left 11:53 lumi_ joined 11:55 Woodi left, wamba joined 11:59 Shozan joined
takadonet morning all 12:01
12:03 Moukeddar left, Moukeddar joined 12:06 satyavvd left 12:08 Woodi joined 12:15 daniel-s_ is now known as daniel-s
daniel-s is it ok to use an empty class, where the class has inherited different roles 12:15
or is it bad form?
takadonet daniel-s: there is probably a better solution 12:16
moritz I think it's OK
(for roles we say "composed" and not "inherited") 12:17
jnthn A class that just composes roles is fine by me.
daniel-s sorry takadonet, 2:1 :)
takadonet daniel-s: np :) 12:18
jnthn The classes defining the Rakudo meta-objects in nom are mainly made up by composing roles. I've been very happy with this arrangement so far. :)
Though there are some methods in the class body 12:19
moritz it's the ultimate proof that code re-use works :-)
imagine you want to write a script that glues some code from the CPAN, and then you find that all you have to do is to use() the modules, and don't have to do any programming
that's like just creating a class (script) from roles (modules) without having to write more glue code 12:20
12:23 Woodi left 12:25 Woodi joined 12:26 TiMBuS left 12:28 PhatEddy joined
PhatEddy rakudo: $.a 12:29
p6eval rakudo ae5bea: OUTPUT«Null PMC access in find_method('a')␤ in main program body at line 2:/tmp/5jxwrOMsL_␤»
PhatEddy nom: $.a
p6eval nom: OUTPUT«Null PMC access in find_method('a')␤current instr.: '_block1002' pc 28 ((file unknown):0) (:1)␤»
12:30 mikemol joined
PhatEddy Probably a variation of rt.perl.org/rt3//Public/Bug/Display...l?id=74274 but thought golf might be of interest ... 12:31
rakudo: $!a
p6eval rakudo ae5bea: OUTPUT«Null PMC access in get_attr_str()␤ in main program body at line 2:/tmp/CS1RvJA8Qe␤»
PhatEddy nom: $!a
p6eval nom: OUTPUT«Lookup of $!a outside of package that can support attributes at line 1, near ""␤current instr.: 'nqp;HLL;Grammar;panic' pc 23569 (src/stage2/gen/NQPHLL.pir:6311)␤»
jnthn nom++ on that one :)
PhatEddy right
jnthn It was a compile time error there
I can fix $.a also.
std: $.a 12:32
p6eval std 37a0cdd: OUTPUT«ok 00:01 118m␤»
jnthn oh.
Not by stealing from std though :)
moritz :-)
12:33 Moukeddar left
PhatEddy Currently planning to file as note under RT 74274. If separate bug report wanted let me know. 12:36
12:37 lumi_ left 12:38 lumi_ joined 12:40 JimmyZ joined
JimmyZ good evening, #perl6 12:41
takadonet JimmyZ: hey
JimmyZ takadonet: hello, how are you today 12:42
12:42 Shz joined
takadonet JimmyZ: good and u? 12:42
JimmyZ I'm fine too ;) 12:43
12:44 Shozan left 12:49 Holy_Cow joined, Holy_Cow left 12:52 molaf left 12:54 dju__ left 12:57 bluescreen10 joined
daniel-s what's this doing?: 13:01
$scheme .= chop;
JimmyZ $cheme = $cheme.chop 13:03
daniel-s perl6: my $a = "hello"; $a .= chop; say $a; 13:04
p6eval pugs, rakudo ae5bea, niecza v6-153-g6cb84d6: OUTPUT«hell␤»
daniel-s perl6: my $a = "helloo"; $a .= chop; say $a; 13:05
p6eval pugs, rakudo ae5bea, niecza v6-153-g6cb84d6: OUTPUT«hello␤»
JimmyZ though $a ~= 'world' eq $a = $a ~ 'world', but $a .= chop not eq $a = $a . chop 13:06
jnthn Only because you can't have whitespace around . 13:07
Well
It's actually parsed as a postfix
gotta go, bbl
JimmyZ perl6: my $a = "helloo"; $a = $a\ .\ chop; say $a;
p6eval niecza v6-153-g6cb84d6: OUTPUT«hello␤»
..rakudo ae5bea: OUTPUT«===SORRY!===␤Confused at line 22, near "$a = $a\\ ."␤»
..pugs: OUTPUT«*** ␤ Unexpected "\\"␤ expecting "\187", ">>", "=", "^", operator name, qualified identifier, variable name, "...", "--", "++", "i", array subscript, hash subscript or code subscript␤ at /tmp/M89x3qR_2z line 1, column 29␤»
JimmyZ std: my $a = "helloo"; $a = $a\ .\ chop; say $a; 13:08
p6eval std 37a0cdd: OUTPUT«ok 00:01 122m␤»
daniel-s JimmyZ: is that a bug in pugs and rakudo?
13:08 mtk joined
JimmyZ I think it NYI in rakudo 13:08
not sure whether it's a bug or NYI 13:09
daniel-s my @a = <a bright sunny day>; say @a.join(" "); 13:10
JimmyZ rakudo: my $a = 1; say $a\ ++;
p6eval rakudo ae5bea: OUTPUT«1␤»
13:10 hudnix joined
daniel-s rakudo: my @a = <a bright sunny day>; say @a.join(" "); 13:10
p6eval rakudo ae5bea: OUTPUT«a bright sunny day␤»
JimmyZ yes, it's a bug 13:11
daniel-s does somebody want to submit a bug report?
JimmyZ I guess no ? 13:12
rakudo: my @a = <a bright sunny day>; say @a;
p6eval rakudo ae5bea: OUTPUT«abrightsunnyday␤»
JimmyZ rakudo: my @a = <a bright sunny day>; say ~@a;
p6eval rakudo ae5bea: OUTPUT«a bright sunny day␤» 13:13
daniel-s much nicer
how come it knows to add spaces?
13:13 lumi_ left
JimmyZ can't follow daniel-s 13:14
13:14 lumi_ joined, f00li5h[HireMe] is now known as f00li5h
flussence Array.Str just does that by default 13:14
JimmyZ rakudo: my @a = <a bright sunny day>; say @a.Str;
flussence I think
p6eval rakudo ae5bea: OUTPUT«a bright sunny day␤»
JimmyZ rakudo: my @a = <a bright sunny day>; say @a.Stringy;
p6eval rakudo ae5bea: OUTPUT«Method 'Stringy' not found for invocant of class 'Array'␤ in main program body at line 22:/tmp/BsUEBB6KXt␤»
13:15 tzhs joined
daniel-s I would have expected it to return a string of "abrightsunnyday" 13:15
JimmyZ rakudo: my @a = <a bright sunny day>; say @a; 13:16
p6eval rakudo ae5bea: OUTPUT«abrightsunnyday␤»
JimmyZ that's what you want
daniel-s rakudo: my $a = 1; say $a ++; 13:17
p6eval rakudo ae5bea: OUTPUT«===SORRY!===␤Confused at line 22, near "say $a ++;"␤»
daniel-s perl6: my $a = "helloo"; $a = $a.chop; say $a; 13:18
p6eval pugs, rakudo ae5bea, niecza v6-153-g6cb84d6: OUTPUT«hello␤»
daniel-s do I emails bugs to [email@hidden.address] 13:20
or on github at github.com/rakudo/rakudo
moritz email
but what's the bug? 13:21
JimmyZ $a\ .\ chop bug?
perl6: my $a = "helloo"; $a = $a\ .\ chop; say $a;
p6eval niecza v6-153-g6cb84d6: OUTPUT«hello␤»
..rakudo ae5bea: OUTPUT«===SORRY!===␤Confused at line 22, near "$a = $a\\ ."␤»
..pugs: OUTPUT«*** ␤ Unexpected "\\"␤ expecting "\187", ">>", "=", "^", operator name, qualified identifier, variable name, "...", "--", "++", "i", array subscript, hash subscript or code subscript␤ at /tmp/nZo6wf0ZsG line 1, column 29␤»
moritz std: my $a = "helloo"; $a = $a\ .\ chop; say $a;
p6eval std 37a0cdd: OUTPUT«ok 00:01 122m␤»
moritz agreed
pmichaud good morning, #perl6 13:23
JimmyZ perl6: my $a = "helloo"; $a = $a\ ~\ 'world'; say $a; # another one
p6eval niecza v6-153-g6cb84d6: OUTPUT«hellooworld␤»
..pugs: OUTPUT«*** ␤ Unexpected "~\\"␤ expecting "."␤ at /tmp/7_pprT39nG line 1, column 28␤»
..rakudo ae5bea: OUTPUT«===SORRY!===␤Confused at line 22, near "$a = $a\\ ~"␤»
moritz good am, pm
13:23 szbalint_ is now known as szbalint
JimmyZ but similar 13:23
moritz both are "unspace not working"
JimmyZ not all unspace not working 13:24
moritz right
pmichaud I've been wondering if List.Str should add spaces or not. (List.Stringy obviously should.) 13:25
moritz I've been wondering if this whole Str vs. Stringy business is just too confusing 13:26
pmichaud I think it makes sense.
especially when dealing with type objects and junctions
moritz if we have two separate ways to stringify, we need a *very* clear and simple rule about when which applies
pmichaud I don't think of it as two separate ways to stringify -- I think of it as stringification at different levels. 13:27
Just like .Numeric isn't a separate way to stringify 13:28
*numify
moritz for numbers, $thing.Numeric.Num == $thing.Num nearly always (modulo FP errors) 13:29
will the same be true for strings? ie $thing.Stringy.Str eq $thing.Str?
pmichaud I disagree with the premise 13:30
if $thing is complex, the == doesn't hold.
moritz example?
pmichaud can one do .Num on a Complex?
moritz if the imaginary part is 0, yes 13:31
if not, you get a fail()
pmichaud so, maybe the confusion is in the terms (more)
moritz so, we can narrow down to "$thing.Numeric.Num == $thing.Num, unless both sides of the == fail"
pmichaud with Str/Stringy, it's .Stringy that produces the fails
which is backwards from Numeric/Num
moritz ok, let's focus on cases where neither of the coercion ops fail 13:32
JimmyZ p6l 13:33
moritz are any of $thing.Str.Stringy eq $thing.Stringy and $thing.Stringy.Str eq $thing.Str violated for common data structures? 13:34
pmichaud (thinking) 13:35
Range, probably 13:36
moritz for example $thing = Any or $thing = <a b c>
pmichaud $thing = Any isn't a valid case, because we're talking about a fail there
moritz which of those fails?
pmichaud using Any as a string produces a failure
moritz Any.Str or Any.Stringy? 13:37
pmichaud Any.Stringy
that's how we find "use of undefined value"
moritz waitwaitwait, is that a warning or a fail()?
pmichaud my $x; say ~$x; # use of undefined value
traditionally it's been a fail() 13:38
i.e., prefix:<~> returns a Failure that becomes "" if handled properly
colomon had thought .Stringy and .Str were supposed to be exactly analogous to .Numify and .Num... 13:39
pmichaud I suppose it could be that prefix:<~> warns immediately
colomon: sometimes the analogies don't hold :)
anyway, the analogous case is my $x; say +$x; 13:40
which involves a warn/fail also.
moritz I'm just warning against cramming too much difference into .Str and .Stringy
sorear good * #perl6
moritz: +1 13:41
colomon wonders if now would be a good time to implement Cat...
pmichaud the point of having .Str and .Stringy is that there *is* a difference, though. :)
moritz just imagine you are explaining all that to a newbie programmer
PerlJam gutenMorgen #perl6 13:42
moritz and you need to answer the "why do I get different values out of these two code paths that both stringify?"
questions
pmichaud example?
moritz good *, PerlJam and sorear
pmichaud: for example if you .Stringy and .Str ranges differently 13:43
pmichaud note that ".Str" is not "stringify", just like ".Num" is not "numify"
colomon I thought it was "stringify into an actual Str".
moritz well, .Num and .Numeric usually yield the same result, in the sense that they compare equal using ==
pmichaud I'm not sure that's an exact sense 13:44
because sometimes .Numeric yields something that isn't .Num
colomon as I say, much like .Num is "numify into a Num"
moritz pmichaud: right, but @array.Num == @array.Int too, unless you go really high numbers
pmichaud using == here is the wrong sense
I guarantee that
colomon are you implying .Stringy always yields a Str?
moritz pmichaud: in what way? 13:45
pmichaud multi sub xyz(Int $x) { ... }; multi sub xyz(Num $x) { ... }; xyz(+$str)
will result in numification that produces different results
in some sense it's wrong to say that .Numeric always produces things that are ==
or to use == as the test for validity 13:46
moritz that's why I don't say "always" but "usually"
and I'm aware that it's not ===
my point is really that from a high level perspective, where you don't care about the actual numeric (or stringy/buffery) type, things should look roughly the same after .Num/.Numeric and .Str/.Stringy, for most "normal" values 13:47
colomon +1
moritz ... and if they don't, there should be a really simple way to say why they don't look the same
like "We can't print Junctions if Junction.Stringy and Junction.Str behave the same" 13:48
PerlJam moritz: what isn't "roughly the same" between .Str and .Stringy ? 13:49
pmichaud thinks
colomon PerlJam: as I understand it, List.Stringy might return a Cat instead of a Str. For instance.
moritz PerlJam: depends on what we spec and implement 13:50
13:50 spq1 joined
moritz ... which would be totally fine for me if the Cat.Str then equals what you'd get from List.Str, for finite lists 13:50
PerlJam as long as you don't have to do List.Stringy.Str or some such though, right? 13:51
moritz shortcuts will exist, I'm sure 13:52
around the time when Stringy was invented, I discussed the need for a role that both Buf and Str implement 13:53
colomon moritz:
moritz so that we could have IO functions for example for writing to a file, which convert to .StrBufMesh (or whatever you call it)
and that converion could either return a raw Buf, which would then write that binary data to that file 13:54
PerlJam In my world view, strings are buffery, so the role that both implement is called Buf
moritz or a Str, which would be then be encoded
it seems that Stringy tries to fill a totally different niche 13:55
pmichaud okay, here are examples
moritz and one which I don't really understand... hope that pmichaud++ enlightens me
pmichaud Nil.Stringy returns "Nil", Nil.Str returns "" with a warning
TimToady other way around, I'd think
pmichaud I'm reading directly from S02 13:56
S02-bits.pod:2235:C<Nil.Str> return C<"Nil">. C<Nil.Stringy> returns '' with a warning.
so I'm guessing something is wrong there :)
TimToady I suspect that's wrong
pmichaud oh, I typed it wrong
nm
Nil.Str returns "Nil", Nil.Stringy returns "" with a warning
(I read it right but typed it wrong. Perhaps proving moritz++'s point :)
anyway, the point being that Nil.Stringy.Str ne Nil.Str 13:57
(which is the case moritz++ is trying to avoid or have a good explanation for)
TimToady well, used to be that I postulated a different low-level stringifier for print and say 13:58
some sort of last-ditch .force-string 13:59
approximating .defined ?? .Str !! .perl
14:00 tzhs_ joined
TimToady at some point we made .Str do that, but that might be a mistake 14:00
and then it became more of a human-readable vs computer-readable issue 14:01
pmichaud ...and the approximation is now less exact
14:01 tzhs left
pmichaud since Nil and (I think) Range don't quite fit that distinction 14:01
TimToady hence the distinction between Tuesday and 2
sorear pmichaud: Nil is not .defined, so it makes sense that .Stringy would be "" 14:02
TimToady but the idea was that .Stringy would imply you wanted to do further data processing on the value, while .Str would mean you wanted a human to read it
14:02 Woodi left, wamba left
sorear (yes, I know my own compiler lags behind this spec change) 14:02
TimToady so ~ became associated with stringy, and + with numeric
sorear pmichaud: what is your take on Range Str[ingy]? 14:03
TimToady which makes Str and Num into "Bridge" types
and you need a string bridge type to do output sanely, if you want to support many output encodings
pmichaud sorear: I don't have a strong opinion on that one. this is one of those areas where I'm looking for spec clarity as opposed to saying "here's how I think it ought to be." 14:04
14:04 Woodi joined
moritz TimToady: does Buf fit into that mental model somehow? 14:05
sorear AFAICT Range is always converted into X..Y
PerlJam gets the feeling like english has somehow been turned into a foreign language again
sorear unless it's converted into a list first
TimToady but I do get the feeling that Str and Num as a bridge type are both forcing two things into one thing
pmichaud sorear: my @a := 1..3; say ~@a
probably should be "1 2 3" and not "1..3"
also 14:06
sub foo() { 1..3 }; say "Here are the results {foo()}"
moritz TimToady: I don't think the spec forces Num as numeric bridge type 14:07
TimToady: could be a FatRat too
TimToady well, yes, the spec only mentions Bridge twice 14:08
pmichaud say 1..3; # 123
say ~(1..3); # 1 2 3
TimToady the fundamental underlying problem is that our types are not conveying the intent of the programmer
pmichaud say $(1..3); # 1..3
TimToady in particular, which channels should be considered data, and which human info 14:10
humans don't care (and sometimes prefer) if meta-info sneaks into the data stream, like Any(), or 1..3 or Tuesday 14:11
JimmyZ perl6: say ~(1..*);
p6eval niecza v6-153-g6cb84d6: OUTPUT«1..Infinity␤»
..pugs: OUTPUT«(timeout)»
..rakudo ae5bea: OUTPUT«␤»
moritz which is why we should keep .pretty and .perl separate
pmichaud niecza: say ~(1..3) 14:12
p6eval niecza v6-153-g6cb84d6: OUTPUT«1..3␤»
pmichaud niecza: say ~(1,2,3)
14:12 thou joined
p6eval niecza v6-153-g6cb84d6: OUTPUT«1 2 3␤» 14:12
14:13 pnu left
pmichaud niecza: say ~(1..3, 4) 14:13
p6eval niecza v6-153-g6cb84d6: OUTPUT«1 2 3 4␤»
TimToady niecza: say ~(1...3)
p6eval niecza v6-153-g6cb84d6: OUTPUT«1 2 3␤»
TimToady the problem is those pesky humans, again, who want .. to do ... where it makes sense 14:14
but the also want .. to be Range, which conflicts here
14:14 jfried left 14:15 pnu joined
PerlJam easy! Eliminate the humans! </skynet> 14:15
JimmyZ perl6: say ~(1...*);
p6eval pugs: OUTPUT«*** ␤ Unexpected ";"␤ at /tmp/pAEduipe6K line 1, column 13␤»
..rakudo ae5bea, niecza v6-153-g6cb84d6: OUTPUT«(timeout)»
TimToady a human will also prefer auto-metafying of known infinite lists 14:16
wheras a computer will prefer a Cat
14:17 tzhs_ left
moritz daniel-s: I have a patch for your lwp-simple ticket, but I first need to compile a rakudo to test it :-) 14:17
TimToady I think a case could be made that say, warn, die, and note should auto-metafy, while print shouldn't 14:18
moritz daniel-s: the fix is to use split() with a limit, ie my @path = $url.split(/\/+/, 3)
daniel-s: where the 3 says "produce at most 3 chunks"
daniel-s moritz: oh, I've nearly finished doing a fix myself
TimToady but in that case, we should probably detach auto-metafy/pretty from .Str 14:19
and make it an IO boundary thing
moritz hey, we could have a debug() function that acts like say(), but prefers metafy/pretty 14:20
TimToady (well, presumably the user can get at the .pretty or whatever we call it)
daniel-s moritz: don't you want at most 2 chunks?
before the :// and after
what's the 3rd?
moritz daniel-s: scheme, hostname and local path
daniel-s oh yea 14:21
tadzik o/ #perl6
moritz \o tadzik, did you survive your exam?
tadzik Jesus, almost
actually I had below the required number of points, but I finally got my 3 14:22
aka The Most Beatiful of The Grades
14:23 leprevost left
tadzik that's what you get for not cheating but actually trying to understand stuff. Not worth it 14:23
14:24 Woodi left
PerlJam TimToady: wait ... say should auto-metafy but not print? that makes say suddenly seem a little less simple 14:25
TimToady or maybe output handles should have a policy that defaults human text, but can be set to computer text
14:25 Maddingu1 is now known as Maddingue 14:26 Woodi joined
pmichaud TimToady: do you see prefix:<~> as "human text" or "computer text" ? 14:26
TimToady though I suppose a channel could intermix those, if there's data + comments
computer 14:27
and .Str is human, as it currently stands
but it does feel rather artificial
~ and + are used implicitly inside the program all the time
which is why it biases toward computer
it's there in $a + $b 14:28
well, + is
moritz reading that, it would make sense to free .Str of the "human" role
14:29 pnu left
pmichaud all this feels a little backwards to me, in that I think of ~@list as "string such that a human can read it" 14:29
TimToady probably
pmichaud i.e., the difference between say @list and say ~@list is that the latter is more readable to me :)
daniel-s moritz: this was my solution pastebin.com/VSDZwEq8
given that it doesn't even work yet and yours is a much simpler solution... I go with your idea 14:30
pmichaud (I admit I'm conflating list context here... but still it's sometimes the case that ~ means "make it look nicer")
TimToady I think sorear was arguing for space by default on say lists
moritz daniel-s: what is that <[.] thing about?
14:30 mtk left
TimToady but I think Perl culture would go nuts if we did that 14:30
daniel-s oh, that's right, I can just do <-[/:]> right?
14:31 mtk joined
moritz right 14:31
daniel-s: I also have a test here :-)
daniel-s and I realised the weird spacing is because of mixing tabs and spaces 14:32
actually, I've noticed that
I always prefer tab characters, but everyone else's code is always 4 spaces
what's the norm?
moritz in perl culture, 4 spaces is pretty common
TimToady maybe we need a pretty op of some sort so that ~ doesn't have to officially carry those semantics (even though it would still behave the same)
moritz but it's cause for endless debate 14:33
daniel-s but, isn't it annoying, because you're using 4 characters for every tab space
that's 4 times as many keystrokes as what is really needed IMO
14:33 pnu joined
TimToady to me, tab is always 8 spaces 14:33
well, with a floor thrown in there
daniel-s whatever the number of spaces you're using tab to represent 14:34
pmichaud the standard is 8
moritz daniel-s: it's a matter of your editor if you need four key presses 14:35
TimToady and there's no in-band way to change that
moritz daniel-s: for example I have my vim configured to make a tab indent to the next integer multiple of four spaces
TimToady 'course, now Go culture is trying to force it the other way, where tab is whatever you want it to be
moritz set shiftwidth=4 tabstop=4 expandtab 14:36
daniel-s emacs does something similar
I press tab and it lines me up to where I want to be
TimToady fortunately, Perl doesn't care much, so as long as you're consistent with yourself, it works out, mostly
daniel-s but removing tabs is still 4 keystrokes 14:37
moritz so, no 4 times the key strokes :-)
ah well, you can just outdent
<< in vim
14:37 Woodi left
TimToady otoh, it looks like Pod6 is caring more 14:37
14:37 koban left
TimToady someone should have got smarter at the beginning and split the tab char into two different chars 14:38
moritz about as much as perl 6 heredocs care
TimToady well, you're always safe with pure spaces or pure tabs 14:39
so if you're anything other than an 8-column tabber, we should probably make it easy to spot leading spaces where they shouldn't be 14:40
I prefer pure-space because it makes it easy to line things up 14:42
TimToady wonders how hard it would be to detect insane whitespace... 14:44
14:45 Woodi joined
[particle] set list 14:45
set listchars=trail:\ ,tab:\ \ ,nbsp:¬,extends:»,precedes:«
that's what i use in vim to display some of the invisible chars
TimToady what, you want human output do you?!? 14:46
[particle] i am not a computer yet. 14:47
14:47 cognominal joined
TimToady say meta @foo 14:48
say me @foo
moritz say pretty @foo 14:49
PerlJam wonders how to get the ugly @foo
or, if ugly is the default .... why?
moritz isn't "ugly" spelled "~"? :-) 14:50
14:50 cognominal_ left
TimToady not for @foo :) 14:50
moritz the default is not "ugly" but "compact"
TimToady wonders whether say is not actually a list context 14:52
pmichaud the default is more "what it is", not "what it would be if I used it in a string"
flussence (I had some code in my early Str.indent attempts to detect insane whitespace - something similar to "any(self.lines !~~ /^\s+\t/)")
pmichaud say Any
TimToady flussence: that's just one form of insanity
pmichaud maybe say is slice context or whatever we call that these days
TimToady some lines starting with 8 spaces while others start with a tab is probably also insane, unless you like w*i*d*e tabstops 14:53
pmichaud i.e., it prints all of its arguments in item context
TimToady well, item is incidental, it still comes down to which stringifier we pick 14:54
but item as not-list, yeah
pmichaud maybe we have ItemStr and Str or somesuch 14:55
TimToady too opaque
pmichaud the name or the concept?
TimToady the concept of going meta automatically should be made explicit somehow 14:56
.pretty is okayish, if a bit long
moritz .cute ?
pmichaud "You think that's cute today..." 14:57
daniel-s thanks for getting to the // URL bug
TimToady .pretty is also mostly about auto-indent in people's minds
daniel-s moritz:
14:57 TinyURL_Bot joined
daniel-s now my tinyurl bot works 14:57
!tiny digg.com
TinyURL_Bot tinyurl.com/6ryne
flussence that's... longer than the input :)
moritz daniel-s: you're welcome. If I knew from the start that you were working on a fix, I would have let you do it
!timy de.arxiv.org/list/physics.optics/recent 14:58
!tiny de.arxiv.org/list/physics.optics/recent
TimToady .cute is not cute, but .ok would be cute
TinyURL_Bot tinyurl.com/3pucowx
daniel-s nah, I'm much happier you did it :P
tadzik :my $*ALLOW_CODE := ($<identifier> ~~ /^^ 'pod' $$ || ^^ 'item'/)
is that something that doesn't neceserilly want to appear in a token?
moritz ~$<identifier> please
tadzik oh, true 14:59
TimToady .xxx for "explicit" would be doube-plus uncute
*double
moritz or just $<identifier> eq any <pod item>;
tadzik is there any in nqp?
moritz uhm, no
tadzik plus this needs to match item7
or any of them 15:00
moritz ah, right
ignore me
dalek kudo/nom: e87a9ef | pmichaud++ | src/core/List.pm:
Arguments to .join should be treated as Stringy.
tadzik wklej.org/id/546437/ that's the code that fails for me 15:01
failure at the very bottom
moritz not sure 15:02
colomon has now successfully built Rakudo and his $work software on his new MBP. Everything else should just be a detail... 15:03
TimToady well, it doesn't have to be so short if say defaults to it for each slurpy item arg
moritz tadzik: you could also do something like my $*ALLOW_CODE := 0; { $*ALLOW_CODE := 1 if ... } if you don't trust the code-in-regex embedding thing
s/do/try/
afk 15:04
15:04 Maddeth joined
TimToady .sane, .smart, .visible, .explicit, .meta, .human, .me, ... * 15:05
moritz back, it's raining outside, so I'm postponing my trip outside :-)
tadzik yeah, that helped :)
flussence I'd suggest .Text for people-formatted and .Str for computer-formatted 15:06
str being the more technical term and an abbrev 15:07
pmichaud which one would be ~ ? 15:08
TimToady TExT: To Explicit TExT # recursive acronym
tadzik I like how !?$*FOO is valid and doing what I want :)
colomon tadzik: isn't the ? redundant there? 15:09
TimToady should be redundant
tadzik colomon: it probably is. Bu I can barely resist this !?$* :P 15:10
looks like Snoopy swearing
colomon tadzik: !?$* that!
TimToady perl6: say not so Cool
p6eval rakudo ae5bea, niecza v6-153-g6cb84d6: OUTPUT«Bool::True␤» 15:11
..pugs: OUTPUT«*** No such subroutine: "&so"␤ at /tmp/aM90iZ8r4T line 1, column 5 - line 2, column 1␤»
TimToady rakudo and niecza both agree that it's not so cool :P
15:11 TinyURL_Bot left
pmichaud it's nice that "not so" is a synonym of sorts for "not". :-) 15:12
moritz feels like SQL :-)
TimToady as synonyms go it's pretty so so.
pmichaud if $you { say .so } 15:13
TimToady funny how 'so-so pretty' is very different from 'so--so pretty' 15:15
pmichaud afk
15:17 jfried joined
TimToady can I start backlogging now? 15:18
tadzik backlogging is like Achilles chasing a turtle 15:19
moritz except that for the non-linear interactions between the two
tadzik true
TimToady more like the Hare, preferably March 15:20
though usually more like the Mad Hatter...
15:20 alester joined
tadzik being in token foo, how do I much something gainst token bar? $<asd>.Str ~~ self.bar doesn't seem to work 15:23
TimToady if you're in the same grammar, it's just <bar>
tadzik that failed even more tests. Hmm 15:24
TimToady if you're not in a grammar, you should be :)
moritz otherwise you have to use ThatGrammar.parse($str, :rule<identifier>)
tadzik I was trying { $*ALLOW_CODE := $<identifier>.Str ~~ self.pod_code_parent }
moritz maybe you shouldn't be reparsing stuff 15:25
but rather set $*ALLOW_COUNT in the calling rule
tadzik I want to keep all the valid identifiers in one place
moritz: why would I count stuff? 15:26
moritz something like [ <pod_code_parent> { $*ALLOW_CODE := 1 } || <identifier> ]
erm, $ALLOW_CODE
moritz distracted, sorry
tadzik no worries
I see your point
and I like it :) 15:27
PerlJam reparsing is a red flag in general though (except when it isn't ;)
TimToady lookaheads tend to be a more acceptable form of reparsing 15:28
tadzik $<identifier> = [ <a> {} || <identifier> ] shouldn't cause any problems?
TimToady maybe make it <.identifier> in that case, or pick different names 15:29
sorear just try not to do anything irreversible in action methods...
niecza: say "foo @bar baz"
p6eval niecza v6-153-g6cb84d6: OUTPUT«foo @bar baz␤»
sorear niecza: say "foo @!bar baz"
p6eval niecza v6-153-g6cb84d6: OUTPUT«===SORRY!===␤␤Cannot resolve class for private method at /tmp/fpR1lqtBzN line 1:␤------> say "foo @!bar⏏ baz"␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 469 (CORE die @ 2) ␤ at
../home/p6eval/niecza/sr…
15:29 araujo joined
sorear plans to fix that soonish 15:30
TimToady the main thing is to view the result of <a> as a kind of transaction, so that if you have any side effects, they only attach to <a>, and if you thrown away <a>, the transaction rolls back automatically
15:31 daniel-s left
sorear the parser has to parse @!bar to know it's not followed by a subscript, but by the time it notices that, the term:variable action method has already carped 15:31
I figure this is why STD has $*VAR; I'm going to piggyback off that
dalek kudo/nom: cd08b78 | pmichaud++ | src/ (2 files):
Move (unused) src/Perl6/Compiler.pir into src/old.

This means that Rakudo-nom now has _no_ .pir files in its sources -- it's all either .nqp or .pm.
15:32
PerlJam yay! pmichaud++ :)
TimToady \o/
colomon \o/ 15:33
TimToady thinks of nqp as "a level of indirection"
PerlJam now if only we could abstract all of the PIR code into a library or something ...
15:35 daniel-s joined
pmichaud nqp is our p6-syntax'ed abstraction layer between rakudo and the underlying vm 15:36
yes, it may go away someday
but it's also nice to have a lightweight p6-abstraction level that we might be able to entice other compiler writers to use :) 15:37
dalek kudo/nom: 2b2ac48 | pmichaud++ | src/core/List.pm:
Small fix so that "say Parcel" works again... bigger fix coming soon.
15:37 Trashlord left
pmichaud also, here are the results of putting the new register allocator into master: gist.github.com/1025161 15:38
(the "rakudo-work" entry there... 2011.05/master is Rakudo 2011.05 running on Parrot's master)
JimmyZ or heavy weight compiler, which is Perl 6
pmichaud note especially the rx.p6 test :) 15:39
PerlJam indeed.
tadzik moritz: wouldn't setting $*BAH in a block like you showed fail, for } will reset it?
pmichaud tadzik: no "my" 15:40
[ my $*BAH := ... } # 'reset' at end of block
tadzik yeah, no my
daniel-s Perl6: my @a = (1, 2, 3); say @a.push; say @a; say @a.pop; say @a;
pmichaud { $*BAH := ... } # change's caller's $*BAH
*changes
tadzik looks into tests once again
15:42 Reaganomicon joined
daniel-s perl6: my @a = (1, 2, 3); say @a.push; say @a; say @a.pop; say @a; 15:43
p6eval pugs: OUTPUT«3␤123␤3␤12␤»
..rakudo ae5bea, niecza v6-153-g6cb84d6: OUTPUT«123␤123␤3␤12␤»
15:44 Eevee joined
daniel-s That seems wrong 15:44
pmichaud .push returns its invocant
PerlJam huh ... there's not as much Q:PIR in rakudo as I thought there would be.
pmichaud it's a lot of pir:: now 15:45
but that makes it easier to find and figure out what "basic" opcodes we need from any VM
PerlJam yeah. I still thought there was quite a bit more Q:PIR though
jnthn++ pmichaud++ :)
sorear pmichaud: are you trying to imply niecza should be part of the NQP ecosystem? :) 15:46
15:47 daniel-s left
pmichaud sorear: I really meant "compiler writers of other HLLs", not "other Perl 6 compiler writers" :) 15:47
PerlJam looks like 264 unique forms of /pir::\w+/ in nom, only 147 if I only count /pir::\w+?__/ 15:49
sorear 'comb' would make a very useful CLI tool
pmichaud unique forms? or instances?
PerlJam ack 'pir::\w+' -oh | sort -u | wc -l 15:50
sorear comb -r 'pir::\w+' . | sort -u
pmichaud PerlJam: that included the nom + parrot dirs, perhaps?
and generated files?
PerlJam oh, yes. 15:51
sorear ack--
PerlJam no, PerlJam--
sorear someday I'd like to combine ack and git-grep and make the perfect search ool 15:52
PerlJam 199 if I do (in src): ack 'pir::\w+' -oh binder core ops Perl6 pmc utils | sort | uniq | wc -l 15:53
pmichaud try case insensitive
15:53 sftp left
pmichaud the upper versus lowercase argument distinctions aren't well maintained 15:53
s/argument/signature/
I get 111
oh, wait 15:54
bad command line
PerlJam in any case ... it's < 200 ops. someone *could* write a VM tailored to those ops ;) 15:55
pmichaud that's what we're kind of thinking of doing
15:55 dju joined
pmichaud at least being able to say "these are the ops you are likely to need" 15:55
15:55 donri joined
sorear WHY does ack not allow searching -? 15:55
PerlJam as much as we've mentioned ack just now, I'm surprised we haven't seen alester magically appear :) 15:56
pmichaud gist.github.com/1025199 # effect of register allocation on coretests
sorry, commontests 15:57
PerlJam What are the improvements to the allocator?
tadzik like
PerlJam (or should I backlog to find out?)
15:58 dju left
pmichaud the previous allocator was dumb/naive... it expected imcc to do smart register allocation 15:58
(because imcc has traditionally been advertised as offering that capability)
so, PAST's codegen just grabbed a new register identifier whenever it needed one, and trusted imcc to figure out how they could be combined
tadzik will <![\w]> work in current Rakudo? I remember something about character classes and something something 15:59
pmichaud the new codegen now explicitly keeps track of temporary registers and re-uses them
tadzik: that's just \W for that specific instance
15:59 Shz left
pmichaud but no, \w doesn't work inside of <[...]> (yet?) 15:59
tadzik I don't want to match it
I want it w/o the trailing space 16:00
pmichaud oh, you want zero-width
tadzik yep
sorear I get 156 for git grep -h 'pir::\w\+' | perl6 -ne '.say for .comb(/"pir::" \w+/)' | sed 's/__.*//' | sort -u | wc -l
pmichaud <!before \w> works
PerlJam pmichaud: how did the register allocator come to attention?
tadzik oh, true
Thank you pmichaud
sorear PerlJam: me obnoxiously pointing out PAST's sucky register use 16:01
PerlJam sorear++ then :)
sorear I think
pmichaud no
that's not it at all
I noticed it when parrot was taking 50+ seconds to compile a 45K .pir file
16:01 sftp joined
pmichaud (45K line .pir file) 16:01
in rakudo master, we have *tons* of very small Parrot subs that do initialization 16:02
16:02 sftp left
pmichaud this costs us startup time because of the need to invoke all of those separate subs at load time 16:02
to get around this, jnthn++ has created serialization contexts, and all of the initialization can take place in a single Parrot sub
unfortunately, that one sub is several thousands of lines long, and used thousands of registers 16:03
this caused imcc to go haywire trying to keep track of all of those registers (imcc's register handling is quadratic, it seems, although I don't know why)
benabik pmichaud: Probably poor handling the data structure to track the registers in use. 16:04
*of the
pmichaud so, our chose was to either break up this long sub into multiple smaller ones (which brings us back to what master is doing), or to go ahead and handle register allocation in PAST since it's unlikely imcc/Parrot will do it anytime soon 16:05
s/chose was/choices were/
I went with the second.
Now compiling that 45K pir file happens in under 2 seconds instead of over 50
alester Beetlejuice Beetlejuice Beetlejuice! 16:06
16:07 Trashlord joined 16:08 sftp joined 16:12 molaf joined 16:13 JimmyZ_ joined 16:14 sftp left
takadonet pmichaud: wow 16:14
PerlJam So, just because I was curious ... it looks like there have been 14 commits to master and 405 commits to nom since the last Rakudo release ... is there any reason those commits to master haven't been merged with nom ? 16:15
s/merged with/merged into/ if that makes my intent clearer
16:16 JimmyZ left, JimmyZ_ is now known as JimmyZ
gfldex most of those 14 commits change PARROT_REVISION 16:16
PerlJam no they don't 16:17
though looking at the commits, I guess several of them don't quite make sense in a nom world. 16:19
tadzik All tests successful, yay 16:21
I need a t-shirt like that
16:21 Mowah left
PerlJam I worry a little bit that the commits on master that *do* make sense on nom might get lost in the switch if we don't keep up with merging them because we'll forget as more and more time passes. 16:23
granted, we shouldn't have to wait too long. But that's why it only worries me a little bit.
moritz PerlJam: the best way to fix that is to write tests for the stuff done in master 16:24
tadzik moritz: implicit code blocks allowed only in certain parents now pushed
or not. Wake up, github
there we go 16:25
16:26 magoo_ joined, sftp joined
moritz tadzik: care to install a post-commit hook that make dalek report your commits here? 16:30
tadzik moritz: I don't mind. Is there any guide for that?
moritz tadzik: in the mu repo, misc/dalek-push.txt 16:31
16:31 jfried left
tadzik how can I do that for rakudo/gsoc-podparser? 16:33
moritz I thought for gsocmess 16:34
sorear you need rakudo admin rights 16:35
16:35 daxim left
tadzik I did that for gsocmess 16:35
moritz tadzik++
rakudo is currently configured pull-style - just add the branch to mu/misc/dalek-conf.json 16:36
16:36 ymasory joined
tadzik I'll review my tests and commit something :) 16:36
16:39 sftp left
moritz metautonomo.us/2011/06/14/wth-is-ha...-tell-you/ I find it amusing that ruby folks say things like "In most cases — for mere humans, anyway — there really is a right way to do things. Ruby is an Object Oriented programming language. There are literally decades of prior research in the field of OO software design, and they’ve resulted in a lot of really well-documented and well-tested design patterns for building software."and the 16:39
... and then rely heavily on monkey typing
dalek ocmess: 4a1e0ad | tadzik++ | t/0 (3 files):
Move comment-related tests to a separate file
16:41
tadzik oh, fun
JimmyZ doesn't like Ruby, mostly because its syntax is pythonic, because he doesn't like python's syntax 16:42
PerlJam moritz: because that's the way you do it. You can't have OOP without monkey-typing, can you? I mean even the rails gods do it and they have way more experience than most people. ;-)
Eevee I have no problem with Ruby; I'm just terrified of its community 16:44
tadzik The only Ruby programmer I know is a friendly guy. OTOH, all the Pythoners I know in person are mostly Perl haters 16:45
Eevee a Ruby guy tried helping me with a Python project once; I gave up on that once he implemented shared code by writing a superclass and patching it onto some other classes' base class list from the file defining the superclass 9_6
tadzik that's sad, for I'd like to learn Python one day, but the communitu drives me off
16:47 mikehh joined
Eevee tadzik: I think I've seen about as much perl-bashing in #python as I've seen python-bashing in #perl 16:49
TimToady here in #p6 we bash everyone equally including ourselves :) 16:53
moritz speaking of bashing... Go has this funny feature where you can leave out the semicolon at the end of the statement, and the *lexer* guesses where semicolons go 16:54
so after )\n it guesses "this would be a nice place" and places a staetment end
even if you were writing something like
if ((foo == bar)\n && (baz == qux)) 16:55
because the lex doesn't know the number of opening parens
Eevee wow 16:56
because when I think "good features to put in my systems programming language"
I consult JavaScript
moritz and learn about optional ;
and chose it *NOT*
TimToady we could go all COBOL and use '. ', if people don't like how much the ; sticks out :) 16:57
that's even more like English™ 16:58
tadzik Eevee: really?
(the python bashing on #perl)
TimToady a good system programming language should give you access to the system
Eevee tadzik: that is to say, not much of either and usually from one or two ornery bastards 8) 16:59
tadzik I don't think I ever saw it, but I don't sit on #perl much. Maybe that's the bullseye of the hate :)
moritz well, we do a fair amount of python bashing in here
Su-Shee \o/ smalltalk! 17:00
TimToady as long as it's not an unfair amount
smalltalk weirds language
Su-Shee yeah it is, mostly the environment etc. got me hooked. 17:01
17:01 dakkar left
Eevee honestly I think the biggest source of python bashing I've seen has been #python 17:01
TimToady apologizes to Calvin and Hobbes for the allusion
Su-Shee Eevee: I'm somewhat exhausted by programming languages recently. I always come back to Perl somehow unless it's something specialized. 17:02
17:03 molaf left
PerlJam watches DHH at railsconf 2011 17:03
Su-Shee that guy is the reason why I get angry at Ruby once a week. I like the language, but the "community" .. oh boy... 17:04
PerlJam Su-Shee: you have to learn "ignorance is bliss" :)
tadzik wonders how many people dislike Perl because of him
PerlJam I'm just seeing if there are any good ideas I can steal 17:05
(one of the things that Perl taught me :)
tadzik I think the most are "I must try this «Perl» you talk about all the time"
17:05 spq1 left
Su-Shee PerlJam: well that's why I read a couple of ruby books and had a ruby job and I absolutely ignore RoR :) 17:05
TimToady yes, well, every community has its share of rotters, though we hope we're better than most at derotting 17:06
17:06 molaf joined
Su-Shee TimToady: at least the perl community is not as clueless and without any regard for programming history rotting ;) 17:07
though not really a gentle, harmonious family ;) 17:08
PerlJam sometimes it's okay to re-invent the wheel, but you should do so consciously. 17:09
17:09 wamba joined
PerlJam though, the rails community seems to be reinventing lots of wheels for some reason. I guess because of DHH's ignorance of history? 17:10
17:11 JimmyZ left
Su-Shee PerlJam: judging from blog articles etc over the years, at least many of those who write are pretty ignorant about the history of concepts, languages, ideas etc. 17:12
PerlJam: or they're much better in selling than I ever imagined ;)
TimToady I've peddled enough snake oil to recognize when other people are peddling it. :) 17:14
Su-Shee well I'm mostly envious, I want Perl be the pacemaker of ideas again ;)
pmichaud back again 17:16
TBA2 how do i do a string substitution using a Match object, i'm sure i seen an example earlier along the lines of $match.subst() but can't find the example anywhere and i'm getting myself more and more confused lol :P
takadonet pmichaud: wb
TBA2 and im sure it should be obvious to me *facepalm* 17:17
PerlJam Weird how DHH is gushing over the coffeescript features than perl has had for ages.
(syntactic sugar anyone?) 17:18
moritz TBA2: I'm not aware of any straight forward method. Str.subst uses Match objects internally, but you can't easily access that
17:19 molaf left
TimToady are you trying to do a subst on the string value of the match? 17:19
TBA2 moritz: that might have been where i seen it earlier then
Su-Shee PerlJam: that is exactly the history and knowledge thing.. *sigh*
TBA2 TimToady: on the string it matched against, e.g. my $a = "test"; $a ~~ /es/; # now replace es in test with something 17:20
moritz if it were implemented, $a ~~ m:rw/es/; $/ = 'something' or so 17:21
TBA2 although it just occured to me that if done, surely it'd ruin the .from/.to values in any later matches ?
17:21 mj41 left, magoo_ left
moritz right now you can do $/.orig.substr(0, $/.from) ~ $something ~$/.orig.substr($/.to) 17:21
TimToady perl6: my $a = "test"; $a ~~ /es/; substr($a, $/.from, $/.to - $/.from) = 'something';
p6eval rakudo ae5bea: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/M4sf_A3TaH␤»
..niecza v6-153-g6cb84d6: ( no output )
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
moritz and store the result in a new variable
perl6: my $a = "test"; $a ~~ /es/; say substr( $a, $/.from, $/.to, "something"); 17:22
p6eval niecza v6-153-g6cb84d6: OUTPUT«Unhandled exception: Excess arguments to CORE substr, used 3 of 4 positionals␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE substr @ 0) ␤ at /tmp/gS4zSYBUQJ line 1 (MAIN mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1769 (CORE C837_ANON @ 2)
..␤ at /home/p6…
..rakudo ae5bea: OUTPUT«No applicable candidates found to dispatch to for 'substr'. Available candidates are:␤:(Mu : Any $start, Any $length?;; *%_)␤␤ in main program body at line 22:/tmp/lo_sUG0wvS␤»
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
TBA2 moritz: thanks, will give that a go, i do like that smartmatch syntax though!
17:23 mberends joined
TimToady wonders if .subst($match, "something") could be made to work, assuming $match keeps its .orig 17:24
17:25 molaf joined
moritz what would be the invocant? 17:25
or $match.subst("something")?
TBA2 moritz: worked, thank you :) 17:27
TimToady $match.replace("something") maybe
to avoid confusion with a string pattern 17:28
moritz TimToady: sounds sane-ish
TimToady perl6: say "food".subst("foo","bar")
p6eval rakudo ae5bea, niecza v6-153-g6cb84d6: OUTPUT«bard␤»
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
TBA2 looks like a nice solution, would it affect the .from/.chars/.to on any later matches though? 17:29
TimToady perl6: say "food".subst("foo")
p6eval pugs: OUTPUT«*** No such method in class Str: "&subst"␤ at /tmp/FJ_wgg0ekx line 1, column 5 - line 2, column 1␤»
..niecza v6-153-g6cb84d6: OUTPUT«Unhandled exception: No value for parameter $replacement in CORE Cool.subst␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE Cool.subst @ 0) ␤ at /tmp/nnQQ2Ngb_W line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1769 (CORE C837_ANON @
..2) ␤ at /home/…
..rakudo ae5bea: OUTPUT«No applicable candidates found to dispatch to for 'subst'. Available candidates are:␤:(Mu : Any $matcher, Any $replacement, Any :samecase(:ii($samecase)), Any :samespace(:ss($samespace)), *%options)␤␤ in main program body at line 22:/tmp/2VRZBWNw2U␤»
moritz TBA2: it would return a new string, and leave all things related to the old string and the match unaffected
TimToady well, even if it doesn't mean anything, it would be confusing to overload .subst for that
TBA2 ah good, i dont think my brain is working tonight lol 17:30
moritz we generally prefer to construct new things instead of modifying the old ones, if we have a choice 17:31
TBA2 moritz: what about like this example but with 1000+ matches, surely not efficient to rerun the regex 1000+ times? couldn't there be an option to work on the original string and adjust match positions depending on how many bytes are removed/added? 17:32
seems to me like something that would be done quite often
17:33 ymasory left
TBA2 actually perhaps not 17:34
TimToady At some point you have to give up on hammering the nails with your ViseGrips® and use a chainsaw instead... 17:36
in other words, you parse with a grammar and then walk the tree 17:37
pmichaud Is *that* what I've been doing wrong? I kept switching to using my skull on the nails.
TimToady Walking a tree is not as easy as walking a dog...
TBA2 now im confused lol :p
TBA2 rereads S05 17:38
TimToady hasn't had breakfast yet, and it shows...
colomon But I have a tree -- many trees, actually! -- and don't have a dog atm.
17:39 Chillance joined
TimToady walking 0 dogs is trivially easy 17:39
Su-Shee I'm afraid of dogs, I walk only trees. ;)
moritz climbs trees 17:40
pmichaud I walk my dog and walk into trees. 17:41
TimToady imagines a ruby with roots...
17:42 cdarroch joined, cdarroch left, cdarroch joined
TimToady starts backlogging again to find his roots... 17:42
mberends in Soviet Russia, the dog walks you! 17:43
TimToady that's usually true in Soviet Amerika too
Su-Shee and the tree walks into you?
mberends dog can be both a noun and a verb, so can walk, but what would 'to tree' mean? 17:44
tadzik zdrzewić: prononce that! 17:45
TimToady the dog treed the squirrel.
sorear I think TBA2 may be looking for m:rw //
17:46 kaare_ left
Su-Shee tadzik: that's like the famous 70ies politician I can't pronounce.. zbgienev brczsnky or something. (I can't even less write him) 17:46
TimToady suspects that m:rw is HHF
Su-Shee tadzik: "shedsevich"
sorear tadzik: zuhduhrzewick
TimToady m:rw is probably higher than the treed squirrel... 17:47
Su-Shee tadzik: or sredshevich
TBA2 sorear: lol, wish it existed :P
tadzik Su-Shee: brzczyński?
Su-Shee tadzik: yes!
I can't even google him because I don't know how to type his name ;)
tadzik stchshewitsch would probably be quite close
moritz niecza: $_ = "foobar"; m:rw/oo/; .say 17:48
p6eval niecza v6-153-g6cb84d6: OUTPUT«===SORRY!===␤␤Regex modifier rw not yet implemented at /tmp/mpV0pY_jus line 1:␤------> $_ = "foobar"; m:rw⏏/oo/; .say␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 469 (CORE die @ 2) ␤ at
../home/p6eval/n…
pmichaud #phasers in 72
huf i recognise those letters but... but they dont seem to work the way i'm expecting them to
TBA2 i'm thinking a closure in a matching regex (does it exist in rakudo yet?), but it'd need to affect the original string so could cause some problems
17:48 molaf left
Su-Shee tadzik: en.wikipedia.org/wiki/Zbigniew_Brzezinski 17:48
sorear moritz: I call IHF 17:49
tadzik oh, Brzeźiński
that's not quite Brzczyński, but I can understand why it sounds familiar. I guess all the "brzszczrzczsz" words sound familiar
moritz rakudo: say 'foobar'.subst(:g, /<[aeiou]>+/, { .uc })
p6eval rakudo ae5bea: OUTPUT«fOObAr␤»
moritz sorear: "Increadibly High Fruit"?
sorear Intermediate ;) 17:50
tadzik oh, it's report day
sorear the trick is making $0 = "foo"; $1 = "bar"; work
TBA2 sorear: which is exactly what i need lol :)
sorear I need to extend SubstrLValue to make a super substr thing that can collude with other instances to DTR
T
TBA2 i can track the changes i make to the original, adjusting future matches, but thats gonna get messy
TimToady the trick is probably to turn the string into a rope of match/nonmatches
sorear so when you assign to $0, $1's offsets are adjusted 17:51
tadzik Su-Shee: there is a famous film scene, where a prisoner responds to a Nazi officer about his name, "Grzegorz Brzęczyszczykiewicz", I may be able to find it on youtube for you
pmichaud sounds like .caps/.chunks
TimToady with a rope that happens automagically, unless there's overlap, in which case you're hosed anyway
TBA2 could we make the match a nonmatch if its an overlap and part of the match changes?
sorear well, the string is never really changed
tadzik Su-Shee: www.youtube.com/watch?v=ftrqO-jkMpE 17:52
Su-Shee tadzik: which movie?
tadzik "How did I started World War 2"
famous Polish comedy
Su-Shee hrmpf. there are no WW2/Nazi comedies here. 17:53
TimToady rather than actually assigning to $0 et al. I think we'd be better off making a way to map 0 => $new0, 1 => $new1 so we can stay functional
huf tadzik: it sounds much less intimidating than it looks
Su-Shee huf: indeed :))
TimToady so maybe it's really a .subst variant
pmichaud there's also the question of $0, $1 etc being a quantified capture
Su-Shee huf: unless you know how it's really written ;)
tadzik: *lol* that's _exactly_ how I would sit there, yes. ;) 17:54
huf isnt it fairly phonetic?
tadzik it is
17:54 sftp joined
huf it's just not at all what i'm used to in at least two ways 17:54
TimToady modifying a string in place is rather OO-y, so maybe we should force people to create an appropriate O to do it
tadzik unlike English, almost every letter (or actually every letter) sounds exactly how it looks... it sounds weird 17:55
TimToady otherwise we risk sawampersanditis again
moritz :-)
Su-Shee tadzik: the german is really german.
TimToady you sure it's not Deutsch? 17:56
sorear niecza: my $str = "aaa"; my $view := substr($str, 1, 1); $view = "bbb"; say $str
p6eval niecza v6-153-g6cb84d6: OUTPUT«abbba␤»
tadzik German is very Deutsch
huf surely not, it's dutch!
from pennsylvania no less
Su-Shee just got three grey hairs more ;)
TBA2 sorear: nice, doesn't work in rakudo though :( 17:57
rakudo: my $str = "aaa"; my $view := substr($str, 1, 1); $view = "bbb"; say $str
Su-Shee oh wait, no he isn't. now it's showing.
p6eval rakudo ae5bea: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/N6EM60cKOq␤»
TimToady sorear: how much does that pessimize rvalue substrs?
tadzik moritz: can we declare Week #3 done? 17:58
moritz tadzik: aye
TimToady sorear: I'm quite willing to have a view generated by subview rather than substr if that would make substr faster 17:59
or substr-rw
18:00 Zapelius joined
sorear TimToady: in the current niecza implementation, I don't think it has any effect whatsoever 18:00
TimToady: however it will hurt future implementations the cost of 1 allocation and 1 indirect function call (and nom, which already uses an implementation like what I'm considering) 18:01
18:02 mkramer joined, mkramer left
TimToady "Lookup of $!a outside of package that can support attributes" bugs me for some reason; it's a developer-centric message, not a user-centric message 18:10
sorear TimToady: is that a nom error message? 18:11
TimToady yes
irclog.perlgeek.de/perl6/2011-06-14#i_3923464
sorear it's better than this:
niecza: say $!foo
p6eval niecza v6-153-g6cb84d6: OUTPUT«===SORRY!===␤␤Cannot resolve class for private method at /tmp/hk5lgeWgRz line 1 (EOF):␤------> say $!foo⏏<EOL>␤␤Variable $!foo used where no 'self' is available at /tmp/hk5lgeWgRz line 1:␤------> say
..⏏$!foo␤␤Unhandled exceptio…
sorear (also, wrong, since niecza still thinks $!foo means $(self!foo). TOFIX) 18:12
TimToady "Cannot use attribute $!a in this context" is more user-centric 18:13
or Cannot understand
18:14 ymasory joined
TimToady or even "Illegal use of attribute $!a outside of any context that knows about attributes" 18:14
PerlJam Isn't "package that can support attributes" just "class"?
TimToady roles
moritz class, role, grammar
PerlJam oh, yes
TimToady but 'package' is misleading
if acccurate
and also leads people to think that attributes are stored in packages 18:15
slavik TimToady: perl5? :P
TimToady and snake oil go way back...
slavik ^^
PerlJam TimToady: at least you only got the oil and not the whole snake
TimToady snakes are too constricting 18:16
slavik TimToady: thanks for a new signature quote ;)
18:17 sftp left
Su-Shee slavik: are you by any chance BBBike-slavik? 18:17
slavik no idea who that would be
Su-Shee a perl hacker who wrote an insanely cool bike map for berlin. ;) 18:18
18:18 sftp joined
slavik I was in germany once ... for an hour ... until I got on a TWA plane to NYC 18:18
:)
in frankfurt 18:19
dalek kudo/nom: 3398e0b | pmichaud++ | src/Perl6/Actions.pm:
"Lookup of $name outside of package that..." ==> "Cannot understand attribute $name in this context" TimToady++
18:22
PerlJam moritz: did your grant cover adding more advanced error information? (like "use diagnostics" in perl 5) 18:24
if not, that would make an excellent follow-up grant IMHO
18:27 sftp left 18:28 sftp joined 18:29 ab5tract joined
moritz PerlJam: not covered... but it would be mostly doc work, so no good material for hague grants 18:31
18:39 bluescreen10 left, bluescreen10 joined 18:40 estrabd is now known as estrabd_afUH 18:52 ymasory left, Bzek left 18:53 tyatpi_ joined, sftp left 18:58 sftp joined 19:03 lichtkind joined
lichtkind cheers 19:04
sorear: esspecially you :) 19:05
19:05 daemon left
sorear hi 19:05
19:06 mkramer joined 19:07 daemon joined
tadzik <pmichaud jnthn moritz>.pick(2) 19:12
rakudo: <pmichaud jnthn moritz>.pick(2)
p6eval rakudo ae5bea: ( no output )
tadzik ah, whatever
pmichaud ("say" ?)
tadzik yeah, I know
orka, how the Swedish people say
s/how/as/ I suppose 19:13
19:17 jaldhar left, ymasory joined 19:46 sftp left 19:49 mkramer left 19:52 _sri left 19:53 sftp joined 19:55 _sri joined 19:58 sftp left 19:59 sftp joined
jnthn nom: package Foo { has $!a } 19:59
p6eval nom: OUTPUT«A package cannot have attributes at line 1, near " }"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23569 (src/stage2/gen/NQPHLL.pir:6311)␤»
20:00 sftp left
sorear nom: class Foo { has $!a; has $!a } 20:00
p6eval nom: OUTPUT«Package 'Foo' already has an attribute named '$!a'␤current instr.: 'nqp;Perl6;Metamodel;AttributeContainer;_block1613' pc 18296 (src/gen/perl6-metamodel.pir:4066)␤»
20:01 sftp joined
pmichaud jnthn: ping (when you're done discussing on #phasers) 20:02
slavik pew pew pew? 20:03
dalek kudo/nom: ff8b4a6 | pmichaud++ | tools/build/Makefile.in:
"make test" does not require Test.pir.
jnthn pmichaud: pong 20:04
20:04 mtk left
pmichaud jnthn: I'm interested in getting ** params to "work" -- pretty easy to implement the parameter/binding part? 20:04
jnthn pmichaud: er :) 20:05
pmichaud: I need you to define "work" a bit more :)
pmichaud parse and bind to an appropriate slurpy type
jnthn pmichaud: So basically same as for *@foo but a different type? 20:06
pmichaud yes
jnthn pmichaud: Oh, easy :)
pmichaud I figured as much. I was even thinking of attempting it myself but don't want to muck something up.
jnthn pmichaud: You're not liable to but it's far quicker for somebody who knows where all the bits go. :)
Literally bits, given we need to add another flag to a bitfield :) 20:07
pmichaud that was the other reason for me doing it -- to figure out where all the bits go
jnthn ah :)
pmichaud and I had already gotten as far as the bitfield part
anyway, I have so much on my plate I'll lety ou do it :)
jnthn :P
OK
pmichaud: Can you stub in the type you want to use?
pmichaud sure
LoL
20:07 jlaire joined
jnthn WtF? 20:08
pmichaud stubbing now
jnthn :)
pmichaud: er, hmm
pmichaud: Maybe BOOTSTRAP is a wise choice also
pmichaud stubbing it into BOOTSTRAP, yes.
jnthn pmichaud: OK, thanks.
pmichaud: Where does LoL fit type wise?
pmichaud is List, for now.
jnthn k
pmichaud so, easy.
actually, I may make it 'is Array' for now 20:09
can change it later if need be
hmmm
no, I'll do 'is List' with a $!descriptor
jnthn k 20:10
pmichaud pushed. 20:11
jnthn ok
afk for 5 mins, then can look
pmichaud oh wait, forgot a step
I'm not sure what (if anything) to do with pir::perl6_set_types_list_array__vPP(List, Array); 20:12
I'll leave that for you :)
jnthn yes, but I'll handle it. 20:13
pmichaud one last push. 20:14
thanks
dalek kudo/nom: da5ab6c | pmichaud++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Stub in LoL type so jnthn++ can work on **@param.
kudo/nom: a7858a9 | pmichaud++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Forgot to put LoL in the PACKAGE.
kudo/nom: 1f46ba0 | pmichaud++ | src/Perl6/Grammar.pm:
Add '**' as a parameter quant.
pmichaud absolutely no rush on this, btw, just wanted to make sure we're set up to start handling it at some point.
20:14 Moukeddar joined
pmichaud I figure it's easy to stub in and then I can start working on it and playing with it. 20:15
20:15 Moukeddar left, shiftless joined
jnthn pmichaud: oh, if there's no rush I'll deal with the current half-way-done set of patches I'm working on first. 20:17
20:17 mtk joined, estrabd_afUH is now known as estrabd 20:18 fhelmberger_ left
pmichaud jnthn: that's fine 20:19
I doubt I'll get to LoL today, for example
but at some point in the next day or two I may want to play with it
20:21 sftp left, fhelmberger joined, Moukeddar joined, Moukeddar left 20:22 sftp joined
shiftless hey guys, I was wondering if someone could briefly explain why perl 6 is so slow right now? is it the parsing? just wondering if there is any progress being made to improve this. I like the language and I think I will be sticking with it for my project. 20:22
20:22 sftp left
tadzik my expertise shows that the new metamodel branch is up to 40 times faster. Stay tuned 20:22
and I believe it's just the bbeginning, the serious optimizations are not yet worked on 20:23
shiftless cool
PerlJam shiftless: It's slow for a variety of reasons, nto the least of which is a focus on getting the correct semantics rather than a focus on optimization. 20:27
shiftless: but, as tadzik says ... it's getting faster all the time :) 20:28
20:34 masak joined
masak oh hai, #perl6. 20:34
tadzik oh hai masak
masak $work talk for which I've been procrastinating for three days now is finished. I am relieved. :) 20:43
jnthn Time to start procrastinating for Friday and NPW ;)
masak \o/
Friday and NPW! 20:44
jnthn We're gonna be cream crackered by Monday :)
colomon ?
masak jnthn: what's that? o.O
colomon ooo, I just got ncurses to install! (sounds stupid, but I've been struggling in the background with it all day today) 20:45
jnthn oh :)
masak jnthn: some kind of British biscuit?
jnthn Slang for "knackered" :)
masak oh :)
jnthn Meant to be more polight.
*polite
...
masak phenny: sv "sliten"?
phenny masak: "worn" (sv to en, translate.google.com)
masak :)
20:45 Moukeddar joined
masak Moukeddar! \o/ 20:46
Moukeddar Hey my man :)
masak kowtows
Moukeddar how's your day so far?
masak I'm cream crackered. :)
jnthn :P
Moukeddar Oo
20:46 bluescreen10 left
masak eating a cold pizza after a long day. 20:47
Moukeddar lol
20:47 bluescreen10 joined
Moukeddar warm it a little bit 20:47
masak nah. it's supposed to be cold :) 20:48
moritz but in the oven, not in the micro wave
Moukeddar microwave ?
tadzik .u wave
Moukeddar never used it :)
phenny U+223F SINE WAVE (∿)
masak Moukeddar: I gave a talk tonight, about CQRS and Event Sourcing.
Moukeddar where masak ?
tadzik hi ha, microwave! ∿
masak Moukeddar: in Malmö, where I work.
Moukeddar it won't be online ? 20:49
i just understood the concept of a service bus :)
masak no, won't be online.
moritz it's funny that the sine wave doesn't look like a sine at all in my font
Moukeddar and the whole language thing is crippling me :( 20:50
masak I did demo our Hex code, though. so there was a bit of Perl in it. :)
Moukeddar: what, the Arabic-English-French thing?
Moukeddar yes , that
jnthn masak: It was funny, it was an event for .Net developers. You showed no .Net-related code, just Perl. \o/ 20:51
masak that is a bit funny. :)
Moukeddar he did perl on an .NET event?
you got balls :)
masak :P
20:51 [particle] left
masak I said it was Modern Perl, which is why they probably didn't recognize it as Perl :P 20:51
jnthn The only talk I've given to the .Net user group was about regexes :)
Moukeddar i bet the whole presence was silenced when they saw perl snippets :) 20:52
masak Moukeddar: no, the reaction was fairly mild.
Moukeddar: it's Perl code that doesn't much stand out as Perl code.
Moukeddar: github.com/jnthn/hex/blob/master/t/gameplay.t
Moukeddar i remember this demo :) 20:55
i need to rearange my bookmarks :) 20:56
masak abandoned bookmarks as a way of life back in 2006
jnthn bookmark = tab
;)
Moukeddar what do you use?
masak I just saved everything in a big file database on a server. 20:57
jnthn doesn't do bookmarks generally
masak then I grep'd it when I needed seomething :)
Moukeddar isn't that an overkill ?
or for fun ?
jnthn For the stuff I visit a lot, I know the URL. For everything else I google.
masak Moukeddar: I admit it was a bit excessive. but I have lots of data on my browsing habits.
Moukeddar the idea of server DB is pretty interesting i must say 20:58
moritz I only uee bookmarks for pages that are notoriously hard to google
usually if I forget the name of something :-) 20:59
20:59 mj41 joined, envi_laptop left
Moukeddar the other day , me and my friends were discussing ,they thought the whole idea of reusability and maintainability was tidious as they only sell the soft one, then i remembered a saying from some infoQ talks, if you do that , better turn into nursering 21:02
moritz Moukeddar: in English it is common not to a space after a comma, not before it
masak I'm not 100% sure about reusability, but I'd accept maintainability willingly in just about any project. :) 21:03
21:03 [particle] joined
Moukeddar thanks for pointing that out moritz,bad habits :) 21:04
so masak every piece of software is unique ?
masak Moukeddar: moritz said "after, but not before" :P 21:05
Moukeddar like this, heh?
masak \o/
sbp in early modern usage they often used to compress the space out when printing. and they used to put spaces before colons and semi-colons, which drives me up the wall. they also used long s with a half bar, so what do they know
masak Moukeddar: I'm not saying reuse is bad. I'm saying it's not as common as we like to believe, and we perhaps shouldn't optimize for it as much as we sometimes do. 21:06
Moukeddar: the problem with DRY is that it introduces coupling.
Moukeddar right, strive for lwo coupling and high cohesion 21:07
low*
masak aye.
and we tend to over-focus on the opposite problem, that of updating denormalized data.
because it's so visible.
moritz there's another reason 21:08
there are simply fantastic tools for working with normalized data
Moukeddar like ?
moritz DBs with referential integrity checks, ORM mappers 21:09
Moukeddar i like ORM more :)
moritz the two work on very different levels
pmichaud jnthn: did you see gist.github.com/1025161 yet? (rakudo-work is the key line) 21:10
masak ORMs are a solution to a problem we shouldn't be getting in the first place. at least according to the world view of Event Sourcing.
Moukeddar elaborate please
moritz masak: maybe, but then we'd have other problems
21:10 PhatEddy left
PerlJam masak: and SQL shouldn't exist according to Date and Codd too :) 21:10
Moukeddar so NoSQL is the answer to that problem ? 21:11
pmichaud
.oO( NQSQL? :)
21:11 EDevil joined
PerlJam NoSQL is just everyone re-discovering some old patterns are useful in a new context 21:11
21:11 EDevil left
Moukeddar so , it isn't the answer 21:12
PerlJam Moukeddar: there is no "the answer"
masak noSQL really means "non-relational". there are lots of good stuff out there besides relational, and not everything needs to be relational.
pmichaud "the answer?" I thought this was #perl6 :-)
masak :P
Moukeddar lol
Moukeddar stopped looking for the answer
pmichaud TMTOWTAI 21:13
PerlJam and infinite number of ways in fact :)
moritz pmichaud: so, register allocation really boosts regexes?
masak Moukeddar: one of the nice things about DDD is that it allows you to have several "the answer" (several models) co-existing in your application.
pmichaud moritz: not quite :)
rx.t is one long mainline sub
Moukeddar TMTOWTAI ? looks like a martial art name :)
pmichaud i.e., it's a *ton* of regex matches one right after another
moritz pmichaud: ah
pmichaud: so more "huge subs"?
masak Moukeddar: "There's More Than One Way To Answer It" :P
pmichaud which meant it became a single Parrot sub with a lot of registers (many of which end up holding Match objects) 21:14
so register allocation boosts long mainlines :)
(or any long block, for that matter)
Moukeddar i understand now, there's no universal solution :) 21:15
jnthn pmichaud: Nice side-effect. :) 21:16
pmichaud: I'd never have guessed so much of compiling that tests was spent in reg alloc. :/
pmichaud well, I suspect it's not just reg alloc but also gc
21:17 ab5tract left
masak Moukeddar: well, each solution is "universal" from its own point of view. it's just that there are parallel universes :P 21:17
pmichaud same with atan2.p6 -- it's a longish mainline
here's the impact on spectests (actually, the 'commontest' subset): gist.github.com/1025199 21:18
masak rakudo: given 42 { .say; redo } 21:19
p6eval rakudo ae5bea: OUTPUT«42␤ in <anon> at line 22:/tmp/NT6IvWKZbk␤»
pmichaud I suspect nothing catches the redo exception.
21:20 bluescreen10 left
jnthn pmichaud: Over 4% improvement...I'll take that. :) 21:20
pmichaud++
masak pmichaud: I suspect so too. 21:21
pmichaud: shouldn't the redo exception contain something like "can't redo outside of a loop"?
Moukeddar well , thank you guys for all the info, corrections and clarifications 21:22
moritz well, the corrections regarding the commas + whitespace didn't help much :/ 21:24
Moukeddar it was helpful (for me) 21:25
jnthn masak: Perhaps the default handler should, yes.
masak jnthn: no, I was thinking the control exception itself...
Moukeddar i'll be back later with more questions :)
have a nice day/night
masak moritz: you usually like when we put whitespace around our binary operators :P
Moukeddar: \o 21:26
moritz masak: usually.
21:27 alester left
masak rakudo: repeat until True { say "OH HAI" } 21:29
p6eval rakudo ae5bea: OUTPUT«OH HAI␤»
masak do-once block :)
21:29 Moukeddar left
tadzik rakudo: say not so Cool 21:30
p6eval rakudo ae5bea: OUTPUT«Bool::True␤»
moritz rakudo: say so not Cool
p6eval rakudo ae5bea: OUTPUT«Bool::True␤»
21:31 wamba left
masak rakudo: say so not True or Cool 21:31
p6eval rakudo ae5bea: OUTPUT«Bool::False␤»
tadzik rakudo: say not so True or Cool 21:32
p6eval rakudo ae5bea: OUTPUT«Bool::False␤»
masak rakudo: say True or False and Cool or Mu or so Real 21:33
p6eval rakudo ae5bea: OUTPUT«Bool::True␤»
tylercur1is rakudo: not True or Cool; ? so say not True or Cool
p6eval rakudo ae5bea: OUTPUT«Bool::False␤»
21:33 Trashlord left
masak rakudo: say so not True and Real and not Cool 21:33
tadzik rakudo: say Rat.can(Mu)
p6eval rakudo ae5bea: OUTPUT«Bool::False␤Method 'Bridge' not found for invocant of class 'Failure'␤ in 'infix:<!=>' at line 3749:CORE.setting␤ in 'infix:<!=>' at line 3749:CORE.setting␤ in 'Bool' at line 3548:CORE.setting␤ in main program body at line 1:/tmp/E4_vcsd3yS␤»
rakudo ae5bea: OUTPUT«␤»
tadzik :( 21:34
flussence rakudo: say 1 XZXZXXXZXZZXZXZZ 2; # I still like this piece of inanity
p6eval rakudo ae5bea: OUTPUT«(timeout)»
tadzik how do you turn Perl into Ruby?
PerlJam you forgot to use R and S in there too
tadzik rakudo: my $a = "perl"; $a++ for (1..444); say $a 21:35
p6eval rakudo ae5bea: OUTPUT«pfin␤»
flussence you got a fish
or part of one...
(I think the number was more like 5347) 21:36
masak tadzik: don't do it! you'll get de-karma'd :P 21:37
tadzik 44994 gives me rtfz
I think it wants to tell me something
21:38 sftp joined 21:39 y3llow_ joined
masak tadzik: to read the zanual? 21:40
flussence ride the zebras?
21:40 y3llow left, pothos_ joined
flussence (they float!) 21:40
21:40 y3llow_ is now known as y3llow
tadzik they do? 21:40
21:41 Psyche^ joined, pothos left
tadzik zannual – Zebras' Annual 21:41
21:41 pothos_ is now known as pothos 21:43 thou left
pmichaud loliblogged: pmthium.com/2011/06/14/rakudo-nom-r...pir-files/ 21:44
21:44 Patterner left, Psyche^ is now known as Patterner
masak \o/ 21:45
pmichaud++
lichtkind pmichaud is always worth to be ++ :)
TimToady to turn Perl into Ruby you just have to monkey patch a .times method into Int 21:46
jnthn pmichaud++ # nice post :)
benabik pmichaud: I think you goofed the link to the nom branch.
flussence ...and define circumfix:«| |», and you're done (more or less)
TimToady well, that's not gonna fly, unless you remove prefix:<|> 21:47
pmichaud benabik: thanks, I caught that also. Fixed now.
TimToady and shoot all the mathematicians who want it for abs() 21:48
flussence (maybe it could use those ¦¦ things that no keyboard lets you type directly...)
tadzik use MONKE^WMATH_SYNTAX; 21:49
flussence
.oO( why does unicode give mathematicians several thousand codepoints, but chemists get a benzene ring buried in "Miscellaneous Technical Symbols"? )
21:53
21:53 lumi_ left, shiftless left 21:54 lumi_ joined
TimToady and why are there no dominoes above 🂓 21:54
masak flussence: because chemists are lousy bribers.
flussence is shocked to find out there really are no double-nines :( 21:56
21:56 Maddeth left
masak .u 🂓 21:57
phenny U+1F093 DOMINO TILE VERTICAL-06-06 (🂓)
masak "Double-six ought to be enough for anyone."
blog post! strangelyconsistent.org/blog/june-1...-operators 21:58
flussence that's the first time I've seen irssi and/or urxvt give up and just display a �...
TimToady obviously they should have made dominoes into combining characters, then just defined one end of them 21:59
22:01 tyatpi_ left
masak "Learn combining characters through dominoes!" 22:01
22:03 ymasory left, ymasory joined 22:04 ymasory left 22:05 supernovus joined
flussence I recall seeing a text editor on some really old computer that could do overstrike characters... you'd get Ø with O-backspace-/ 22:06
TimToady let me guess, an APL terminal... :) 22:07
masak or INTERCAL. 22:08
flussence heh, I never got to play with big toys, I might've been thinking of RISC OS... 22:09
supernovus 􏿽xF8 rly
dalek kudo/nom: b2e9a57 | pmichaud++ | README:
Update README.
22:10
22:10 tokuhiro_ left
masak 'night, #perl6. tomorrow there's a game in the edublog, and then I must plan the other half of the month. :) 22:11
22:11 masak left 22:13 mj41 left 22:18 takadonet left
mikemol *applauds* pmthium.com/2011/06/14/rakudo-nom-r...pir-files/ 22:20
mikemol is going to need to start reading up on NQP, so he can passively ruminate on a C++ implementation.
sorear hi mikemol 22:23
mikemol Where's the most comprehensive, comprehensible (if one doesn't know PIR or Perl6 extensively) description of NQP?
sorear: o/
sorear ping jnthn 22:24
mikemol Not sure I need to, now.
:)
sorear sorry 22:25
jnthn: ping. How should I factor "passing source location info to the meta model"?
benabik mikehh: I find nqp.git/t/nqp to be the most complete description
mikemol benabik: I'm going to need something that looks a bit more URL-like 22:26
sorear github.com/perl6/nqp
benabik mikemol: github.com/perl6/nqp/tree/master/t/nqp It's the test files, but they're laid out in a simple sequence of features. 22:28
22:29 supernovus left
jnthn sorear: I thought I was clear enough before that I don't think you should be doing that. 22:29
I can't really explain how to factor something I think is the wrong factoring... :)
sorear jnthn: you made it clear that HOW methods shouldn't be calling "sorry" 22:30
jnthn sorear: Ah, OK.
sorear jnthn: but to emulate STD's error messages I need the source location of the original definition
jnthn sorear: Original definition of which things in particular? 22:31
sorear jnthn: For STD-equivalent functionality, package symbols and lexicals
ideally also attributes and methods
I've had more than one embarrassing bug in niecza caused by accidentally defining the same method twice 22:32
22:32 mberends left
sorear not that it's *essential* to have source locations for those 22:32
22:34 mberends joined
jnthn sorear: If you're going to put it in meta-objects then they're just attributes in the meta-object. 22:34
And make sure it's optional
Just have a "has int $!position" or some such. 22:35
sorear *nod* 22:36
jnthn is mostly worrying about separation of concerns :)
TimToady is mostly worried about separating the users from their concerns... 22:37
and in the real world, "separation of concerns" usually just results in finger pointing 22:38
22:38 Trashlord joined 22:42 lumi_ left 22:44 lumi_ joined 22:45 mtk left
dalek p: 8bc12e5 | jonathan++ | src/ (3 files):
Enrich type checking a bit to support some more ways of doing type checks.
22:49
22:53 Zapelius left 23:00 whiteknight joined 23:07 cdarroch left
dalek kudo/nom: 692a140 | jnthn++ | / (4 files):
Sketch out SubsetHOW. Untested.
23:07
kudo/nom: 22efa4f | jnthn++ | src/core/Code.pm:
Code.ACCEPTS
kudo/nom: 888d2f0 | jnthn++ | src/binder/sixmodelobject.h:
Chase 6model API update.
kudo/nom: cb6bc83 | jnthn++ | src/Perl6/Metamodel/SubsetHOW.pm:
More twiddling with SubsetHOW's checking code.
kudo/nom: 7fde1b2 | jnthn++ | src/core/traits.pm:
Tentative 'of' trait, for use with subset.
kudo/nom: a181c92 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP revision to get latest 6model core.
23:13 thou joined 23:17 Chillance left 23:18 Trashlord left 23:28 daniel-s joined 23:32 Tedd1 left 23:34 Tedd1 joined 23:35 betterworld left 23:36 betterworld joined 23:37 lumi_ left 23:38 lumi_ joined
jnthn nom: say Int ~~ Cool 23:44
p6eval nom: OUTPUT«Could not find sub &coerce-smartmatch-result␤current instr.: '_block1002' pc 105 ((file unknown):139) (:1)␤»
dalek kudo/nom: c6d592d | jnthn++ | src/Perl6/ (3 files):
First incomplete cut of subset type declaration. Seems to essentially work, at least with a few basic tests.
kudo/nom: 53ad49c | jnthn++ | src/Perl6/Metamodel/SubsetHOW.pm:
A refinement type should carry the methods of its refinee.
23:49 hudnix left 23:54 [particle] left, [particle] joined, hudnix joined 23:55 TBA2 left
dalek kudo/nom: 297e88c | jnthn++ | src/Perl6/Actions.pm:
Unbust smartmatching.
23:59
kudo/nom: dbbd98d | jnthn++ | LHF.markdown:
A couple more bits of LHF to nom.