pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
meppl good night 03:46
pmurias svn: REPORT request failed on '/pugs/!svn/bc/22012' 08:11
svn: REPORT of '/pugs/!svn/bc/22012': 400 Bad Request (svn.pugscode.org)
lambdabot Title: Revision 22032: /
pmurias whe svn up'ing is a problem with the network not with the repo? 08:12
* when
moritz_ when I try, and it works for me, it's a problem with the network (as in this case) ;-)
pmurias how can i check if there's a proxy and workaround it? 08:15
moritz_ dunno
pmurias checking out via https worked 08:20
dr_df0 sorry for bothering You, but I've been looking at readme and howto files 09:04
masak dr_df0: yes? 09:05
dr_df0 rakudo: say "just testing .." 10:13
p6eval rakudo 29834: OUTPUT[just testing ..␤]
moritz_ you can also let pugs or elf eval your code 10:14
pugs: say [+] 1..4
p6eval pugs: OUTPUT[10␤]
masak pugs: say [=>] 1..4 11:01
p6eval pugs: OUTPUT[1 2 3 4␤]
masak pugs: say ([=>] 1..4).perl 11:02
p6eval pugs: OUTPUT[\(1, \(2, \(3, 4)))␤]
moritz_ pugs: say [>=] 1..4 11:05
p6eval pugs: OUTPUT[␤]
moritz_ pugs: say [<=] 1..4
p6eval pugs: OUTPUT[1␤]
moritz_ masak: I tried to write a lexer for the Perl 6 version of HTML::Template, but RT #58312 stopped me :/ 11:07
masak moritz_: I'm on it. I'll rewrite the whole HTML::Template today or tomorrow. 11:08
with tests.
moritz_ my plan was to tokenize the input into chunks of normal text and directives, and then write a recursive decending parser on these tokens
well, you already have some tests ;)
masak I'll see if I can find a way to make Perl 6 grammars do the recdescent 11:09
moritz_ and I guess you could ask samtregar if you can use his HTML::Template test suite, at least the relevant parts
masak I've looked a bit at that test suite 11:10
it looks very comprehensive
but it may or may not be too tied to the Perl 5 HTML::Template
that said, I might be able to 'borrow' the good parts, or at least get inspiration from it 11:11
moritz_ it certainly depends on whether you want to be HTML::Template 5 compatible, or only alike
masak alike
I thought I'd redesign the interface while I'm at it
(yes, 2nd sys synd, I know)
I've noticed that all of our usages follow the pattern create - set params - output 11:12
so I thought I'd design the interface around that
make it easy to do that case, with sensible fallbacks if you want to get more elaborate
moritz_ sounds great 11:13
masak will probably write something about it on use.perl.org
maybe I'll decide to make our HTML::Template fully compatible, and then write a wrapper that does the DWIMmery 11:14
moritz_ or the other way round
clean break, remember? ;-)
masak true. 11:15
moritz_ masak: when you're done with your refactor, ping me, and I'll contribute an implementation of default_escape
masak moritz_: nice. I will.
moritz_ (which I consider to be most important wrt XSS)
masak moritz_: do you still prefer to send us patches from outside? :) 11:16
moritz_ at the moment, yes
masak that's ok.
moritz_ when I'm more confident with git I'll certainly accept a commit bit 11:17
masak moritz_: you're going to love git 11:18
moritz_ speaking of which... 11:19
"error: Entry 'p6w/HTML/Template.pm' not uptodate. Cannot merge.
what do I do now?
masak moritz_: btw, your #58312 is just a special case of #57858. marking it as such.
masak moritz_: git merge? 11:19
oh, that's what you're doing. sorry
what was the command you were running when you got that error? 11:20
moritz_ git-pull 11:21
I probably shouldn't have modified the file in master, right? 11:22
masak check out a clean version of that file and try again 11:23
that might solve it
git does some unexpected things for a few days, and then it becomes wonderful 11:24
but I'm still a bit unclear on the way to handle merge conflicts, because it doesn't happen too often 11:25
moritz_ so how do I check out a clean copy of the file?
masak git checkout
moritz_ ok, that tells me M p6w/HTML/Template.pm 11:26
Your branch is behind the tracked remote branch 'origin/master' by 12 commits,
and can be fast-forwarded.
what do I do then? git-pull again?
masak interesting.
yes, try that...
moritz_ p6w/HTML/Template.pm: needs update 11:27
error: Entry 'p6w/HTML/Template.pm' not uptodate. Cannot merge.
masak :/
moritz_ git-diff|patch -R -p1 11:28
followed by a git-pull
not very nice, but worked :
:/
masak heh
moritz_ perhaps git-clean might have helped 11:29
masak dunno
wolverian does the spec allow you to "wrap" a class method with a role method? in scala, this kind of a trait method is marked "abstract override", and it calls the class method via super 12:31
particularly this allows you to stack these traits (roles) that modify a given method 12:32
masak will subs in classes be inlined automatically? 12:34
pmurias masak: i think inlining is implementation dependend 12:37
masak but there's no theoretical obstacle?
pmurias subs in classes should be inlined the same as subs everywhere 12:38
i think it should be possible 12:39
moritz_ rakudo: my $M; my $str = 'abc'; while $M := $str ~~ /b/ { say "from ", $M.from; $str = '' }; 12:40
p6eval rakudo 29834: OUTPUT[from 1␤]
masak seems to work. 12:42
moritz_ aye 12:43
now I'm one step closer to my tokenizer
masak moritz_++
pasteling "moritz_" at 89.13.210.223 pasted "Shot at a first tokenizer for HTML::Template" (30 lines, 694B) at sial.org/pbot/31985 12:44
moritz_ I wonder why it says No match on ' <dsadf '
but then @tokens is ["foo ", "<TMPL_VA", ""] 12:45
ie last item is empty
ah, @otkens.push: $str.substr(0); # weird way to get a copy of a string 12:48
masak moritz_: interesting work. best of luck. right now I'm at $work, so I'm not hacking on a new HTML::Template -- but when I get home, I'll take a closer look at what you've done. 12:49
without any real proof, I'd say you are inventing Perl 6 grammars right now 12:50
moritz_ masak: ok, I have a tokenizer now that basically works
masak but -Ofun, so...
moritz_ I know, but this actually works ;)
masak so do Perl 6 grammars :)
moritz_ my succcess with grammars was verly limited so far 12:51
masak I've had the opposite experience
moritz_ how do I match against a grammar rule? $stuff ~~ /<Grammar.TOP>/ ?
masak $stuff ~~ Grammar.TOP
see Wiki.pm
moritz_ ok
masak that's how we parse wiki markup at present
though there, too, I have some pending changes 12:52
moritz_ do you knew if 'token ws { ... }' does what it should?
ah, probably no :sigspace yet
masak I think it was a mistake to parse on the article level as opposed to the paragraph level 12:53
Str.split could pry apart paragraphs better than a grammar could, and then intra-whitespace handling becomes simpler
s/intra-/intra-paragraph / 12:54
moritz_ grammars work fine for me as long as I don't recurse :( 13:09
masak hm, we recurse, so far without problems
but what you say does sound like a new rakudo bug 13:10
moritz_ I'll try to track it down
masak also, be careful not to call any of your tokens 'text' :/
PGE doesn't like that.
moritz_ f*ck, I did
masak haha
I call mine 'twext' 13:11
moritz_ I call it 'plain
masak developing in rakudo is a bit like building sand castles in a mine field. 13:12
as long as you build in the right spots, it's pretty nice. 13:13
moritz_ do you know if lookaraounds are implemented and accessible?
masak we've used both -aheads and -behinds a bit 13:14
see Wiki.pm
moritz_ cool
YaY 13:15
masak :)
moritz_ I have a working grammar for HTML::Template now 13:33
pugs_svn r22033 | pmurias++ | [smop] fixed warnings raised by gcc and the bugs that caused them
moritz_ mostly working ;) 13:34
masak moritz_: cool!
pugs_svn r22034 | pmurias++ | [smop] removed a no longer relevant files which likely appeared due to a svk bug 13:37
moritz_ masak: sent mail 13:55
masak moritz_: many thanks 13:56
moritz_ no problem, that was -Ofun indeed
masak -Ofun++ 13:59
rakudo_svn r30536 | pmichaud++ | [rakudo]: spectest-progress.csv update: 127 files, 2278 passing tests 15:04
moritz_ TimToady: %hash.exists<key> doesn't look like English to me. What about an alias %hash.contains<key>, or perhaps .has? 16:07
smg has_key? 16:10
masak has-key?
contains-key?
moritz_ smg: just has
masak likes 'has' 16:11
as long as we're making a clean break -- we already changed length to elems/chars/etc 16:12
so s/exists/has/++
OTOH, `exists %hash<key>` _does_ make sense 16:25
is that syntax still valid in Perl 6?
moritz_ no 16:28
we discussed this the other day when larry added symbol tables to STD.pm which caught such mistakes
masak moritz_: in that case, I'd say that `exists` has played out its wole 16:44
s/w/r/
moritz_ I CAN HAZ HASH KEY? 16:45
Khisanth more like English? Perl6 stealing from COBOL? :) 17:15
allbery_b lemme guess, - in identifiers? 17:17
moritz_ Perl has always been happily stealing features from other languages, and admitted it freely ;)
moritz_ on use.perl.org, how do I become a "fan" of somebody else? 19:09
BinGOs the little smiley faces. 19:27
moritz_ is fan == friend? 19:28
BinGOs i believe so. 19:29
moritz_ ah, I think if I declare somebody as my friend, I'll appear as his fan - or something like that 19:31
dr_df0 Hi all, I've installed Pugs from sources and i have problems running prove6 utility 19:45
it always stops with error on first test
moritz_ how did you install pugs? with 'perl Makefile.PL && make' ?
moritz_ from svn? 19:46
dr_df0 Yeah, just before building i've done svn up
moritz_ can you pleae nopaste the error message?
and what happens when you run 'make test'?
dr_df0 but I did also the last bit "make install" ?!?
moritz_ I never did that ;) 19:47
dr_df0: so what's the error message? 19:49
dr_df0 info: Harness with pugs (Haskell backend). 19:51
t/spec/S03-operators/arith....NOK 144# Failed test (t/spec/S03-operators/arith.t line 330, column 1-17)
# Expected: 'Inf'
# Actual: '-Inf'
# Looks like you failed 1 tests of 190
t/spec/S03-operators/arith....FAILED test 144
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/spec/S03-operators/arith.t 190 1 0.53% 144
Failed 1/1 test scripts, 0.00% okay. 1/190 subtests failed, 99.47% okay.
moritz_ it means the test fails ;) 19:52
which is because it's written wrongly
is -Inf.abs, Inf;
should actually be is (-Inf).abs, Inf;
dr_df0: could be your first test to fix 19:53
dr_df0 i've checked few of them, and i could not find any working 19:54
moritz_ pugs isn't really well maintained at the moment
which is why I mostly focus on rakudo these days
pugs_svn r22035 | moritz++ | [t/spec] fixed precedence bug in arith.t, dr_df0++ for spotting it 20:07
moritz_ perlbot: karma dr_df0 20:10
perlbot Karma for dr_df0: 2