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. |
|||
00:00
larsen_ left
00:01
calin left
00:07
bacek joined
00:12
dr_df0 left
00:19
SamB left
00:33
[particle] joined
00:34
SamB joined
00:37
Lichtkind left
00:44
a-jing joined,
a-jing left
00:49
Lichtkind joined
|
|||
Lichtkind | slurp closes immidiatly? | 00:49 | |
00:49
[particle]1 left
|
|||
ruoso | @tell pmurias, alright... that should be ok... so let's think in the m0ld code that would initialize the class... | 00:51 | |
lambdabot | Consider it noted. | ||
00:54
[particle] left
01:00
[particle] joined
01:19
cognominal joined
01:22
stef__ joined
01:24
stef__ left
01:30
hercynium joined
01:36
hcchien_ is now known as hcchien,
Lichtkind left
|
|||
meppl | good night | 01:39 | |
01:40
meppl left
01:43
bacek_ joined
01:44
bacek left,
bacek_ left,
bacek joined
01:49
Chillance left
02:19
hercynium left
02:25
jferrero left
02:34
bacek left
|
|||
s1n | moritz_: maybe you're a better person to ask. i've been pestering pmichaud for a while and he seems extremely busy right now | 02:52 | |
i want to start hackin on rakudo itself, not just the test suite, but i'm looking for guidance as to where to begin | |||
i've looked through the roadmap, but not really understanding what it says is needed, i don't really know where to start on any of those things | 02:53 | ||
moritz_: can you help me in this department? | |||
02:56
wknight8111 left
02:57
PZt left
03:03
elmex_ joined,
PZt joined,
Limbic_Region left
|
|||
PerlJam | s1n: Do you know how to use NQP? PIR? C? | 03:06 | |
s1n: were I you, I'd look at some of the items in the roadmap that are estimated at just a few hours and don't really depend on anything and start hacking on those. | 03:08 | ||
In fact, I may just do that myself since I may have time to do it soon :) | |||
03:16
elmex left,
elmex_ is now known as elmex
03:17
elmex left
03:29
zch051383471952 joined
03:31
zch051383471952 left
03:34
bacek joined
03:49
a-jing1 joined
04:26
cognominal_ joined,
cognominal left
04:28
a-jing1 left
04:42
BinGOs_ joined
04:44
penk joined
04:45
alanhaggai left
04:51
BinGOs left
05:05
alanhaggai joined
05:26
Psyche^ joined
05:39
sri_work joined
05:41
PZt left,
PZt joined
05:42
Patterner left,
Psyche^ is now known as Patterner
05:43
smtms left
05:48
smtms joined
06:05
ashizawa joined
06:35
cls_bsd left
06:46
pmurias joined
06:50
c1sung joined
06:52
cls_bsd joined
|
|||
pmurias | ruoso: i'm not sure what hello world should look like in m0ld | 07:06 | |
07:16
Ehtyar joined
07:20
pmurias_ joined,
pmurias left,
pmurias_ left,
pmurias joined
|
|||
pmurias | ruoso: and i think classes are created at BEGIN time | 07:33 | |
07:36
masak joined
07:44
BinGOs_ is now known as BinGOs
|
|||
pmurias | ruoso: but if we move them to runtime the should desugar to method calls | 07:46 | |
08:04
zamolxes left
08:21
pmurias left
08:37
iblechbot joined
08:41
pen1 joined
08:44
larsen_ joined
|
|||
moritz_ | masak: are you (or november) blocking on RT #58352? if so, I could revert that change (although it seems right to me) | 08:55 | |
masak | moritz_: no, s'ok | 08:56 | |
but it was the first "fix" in rakudo to trigger an addition of a workaround in november :) | |||
moritz_ | :/ | ||
which clearly means that we need more tests | 08:57 | ||
08:57
penk left
|
|||
masak | I implemented recursive HTML Template directives yesterday evening | 08:57 | |
moritz_ | if it were tested properly my "fix" would have been caught | ||
cool ;) | |||
masak | ...and discovered another bug in rakudo which I'm reporting now | ||
moritz_ | as always :/ | 08:58 | |
masak | currently checking in svn history whether it's been with us since the beginning of time | ||
my guess is yet | |||
s/t/s/ | |||
masak should really write a script that does binary search on svn revisions | 09:00 | ||
moritz_ | or you get a git mirror, and use git-bisect | ||
masak | yes. | ||
moritz_ | which seems to be *much* more efficient | ||
since you don't have to contact the server every time | |||
masak | right. no net latency. | ||
still have to compile, though | |||
that's the real bottleneck | 09:01 | ||
moritz_ | that's where dual core + ccache start to help ;) | ||
masak | :) | ||
sorry, what were your make flags again? -j2 and something | |||
moritz_ | yes | ||
make realclean && perl Configure.pl --cc='ccache gcc' && TEST_JOBS=2 make -j 2 test | |||
masak | ah, dz | 09:02 | |
moritz_ | (for bisecting you'll don't need the test target, of course) | ||
masak | no. | ||
moritz_ | btw matching in the condition of a while-loop works - you just can't access $/ after that :/ | 09:03 | |
masak | moritz_: I know. | 09:04 | |
I hope that's what the bug description says, too | |||
otherwise I have to clarify | |||
moritz_ | oh, right | ||
I should actually read what you write ;) | |||
masak | it's been known to help :) | ||
09:07
pen1 left,
penk joined
|
|||
pugs_svn | r22038 | moritz++ | [t/spec] tests for RT #58352 | 09:09 | |
09:10
iblechbot left,
jan left
|
|||
masak | moritz_++ # writing more tests | 09:11 | |
I should do it myself, but I find myself being occupied with classifying bugs :) | |||
pugs_svn | r22039 | moritz++ | [t/spec] add tests for junctions in boolean context, from RT #58302 | 09:13 | |
09:14
riffraff joined
|
|||
pugs_svn | r22040 | moritz++ | [t/spec] junction tests need explicit ?(...) to force boolean context, | 09:15 | |
r22040 | moritz++ | otherwise ok() autothreads on it | |||
masak | ah, so ?(...) collapses the quantum wave | 09:16 | |
moritz_ | yes, it's a measurement ;) | 09:17 | |
which always collapses a wave function to an Eigenvalue | |||
masak | "you changed the outcome by measuring it!" | ||
futurama++ | |||
moritz_ | (quantum physics)++ | 09:18 | |
masak | cats++ | ||
heh, when bifurcating in a known integer range, the current integer carries informaion about all integers tested before it, and about the range of remaining uncertainty | 09:23 | ||
moritz_ | yes, but only if you know the limits of the range | ||
masak | yes. | 09:24 | |
and the exact conditions for rounding up and down. | |||
moritz_ | I was about to add that as well ;) | ||
09:25
fridim_ joined
09:27
bacek left
|
|||
pugs_svn | r22041 | moritz++ | [t/spec] fudged boolean-context.t for rakudo. | 09:31 | |
r22041 | moritz++ | This is a bit ugly, because fudge doesn't understand the test syntax | |||
moritz_ | STD.pm doesn't like t/spec/S03-junctions/boolean-context.t | ||
Obsolete use of undef as a verb; in Perl 6 please use undefine function instead | 09:32 | ||
it doesn't look like a verb to me, in that context | |||
09:33
wknight8111 joined
|
|||
moritz_ | today's xkcd is great ;) | 09:34 | |
09:35
kanru joined,
dr_df0 joined
|
|||
masak | moritz_: what doesn't look like a verb? 'undefine'? it does to me. | 09:35 | |
moritz_ | ok !(undef&1), '...' | 09:36 | |
that's what STD.pm complains about | |||
and in that context undef doesn't look like a verb, IMHO | 09:37 | ||
09:37
zamolxes joined
09:43
cls_bsd_ joined
|
|||
masak | moritz_: I concur. | 09:44 | |
STD is at fault. | |||
unless a space is required before the '&' for it to be treated as a binary op | 09:45 | ||
09:45
cls_bsd left
|
|||
moritz_ | I think only when disambiguating | 09:46 | |
and I don't know from what it needs disambiguation | |||
since there's no postfix or postcircumfix that starts with & | |||
rakudo_svn | r30590 | moritz++ | [rakudo] more junction tests for spectest_regression, (Stephen Simmons)++ | 09:50 | |
09:56
a-jing joined,
a-jing left
09:59
dr_df0 left
10:04
Myoma left
10:11
fridim_ left,
fridim_ joined
10:14
kst left,
kst joined
10:17
alanhaggai left
10:20
alanhaggai joined
10:24
riffraff left,
riffraff joined
10:26
yahooooo left
10:36
ruoso left
10:39
zamolxes left
10:40
dr_df0 joined
|
|||
dr_df0 | i've got problems running make test on pugs (latest version from svn) | 10:51 | |
'make test' stops with: Can't locate Test/Harness/Results.pm in @INC .... at inc/Test/Harness/Straps.pm line 12 | 10:52 | ||
i'm able to run pugs | |||
10:53
elmex joined
11:00
yahooooo joined
11:01
Bzek joined
11:05
meppl joined
11:15
a-jing joined,
a-jing left
11:16
dr_df0 left
11:20
zamolxes joined
11:21
BinGOs left
11:23
fridim__ joined,
fridim_ left
11:27
BinGOs joined
11:36
a-jing1 joined,
wknight8111 left,
a-jing1 left
11:37
a-jing2 joined
11:40
a-jing2 left
11:54
riffraff left
11:56
BinGOs left
11:57
BinGOs joined
12:07
ashizawa left
|
|||
moritz_ | cpan Task::Smoke | 12:13 | |
12:14
penk left
12:15
penk joined
12:23
a-jing joined,
a-jing left
12:31
jan_ joined
12:33
a-jing1 joined,
a-jing1 left,
fridim_ joined
|
|||
rakudo_svn | r30591 | moritz++ | [rakudo] add subs pass and fail to Test.pm | 12:41 | |
masak | perl6: sub f($l) { return() if $l<=0; print $l; for 1..3 { f($l-1); print "." } }; f(2); say | ||
p6eval | rakudo 29834: OUTPUT[ā¤] | ||
..elf 22041, pugs: OUTPUT[21....1....1....ā¤] | |||
masak | that's the right output! | 12:42 | |
on my box (r30590) it outputs "21......" | |||
moritz_ | so what's the problem? the return()? | 12:43 | |
or the 'if as a statement modifier'? | |||
masak | no, I get a completely different result locally | ||
"21......" | |||
12:43
abra joined
|
|||
moritz_ rebuilds parrot, and tries again | 12:44 | ||
masak | I've reported this to rakudobug, because it's a bit of a showstopper for one of my new tests | ||
the one with nested for templates | |||
it kinda needs recursion in for loops to work | 12:45 | ||
12:45
fridim__ left
|
|||
masak | but it's VERY strange that the perl6 bot thinks everything is ok | 12:45 | |
moritz_ | does it? | ||
12:45
abra left,
abra joined
|
|||
masak | yes, that output looks fine | 12:45 | |
moritz_ | empty output looks fine? | ||
14:41 < p6eval> rakudo 29834: OUTPUT[ā¤] | 12:46 | ||
masak | empty output? | ||
moritz_ | just an \n | ||
masak | oh | ||
it was pugs that reported ok | |||
then I see. | |||
that's congruent with my bug report | |||
in newer rakudo versions, it gives an output, but the wrong one | |||
moritz_ | didn't we talk about reading earlier today? ;-) | ||
masak blushes | 12:47 | ||
moritz_ | locally it says 21...... | ||
masak | up until 29883, rakudo outputs nothing | ||
after 29884, it outpus 21...... | |||
*outputs | 12:48 | ||
moritz_ | and I wonder why rakudo lacks so far behind | ||
we're at 30590 now | |||
masak | yes | ||
strange thing is, r29884 was really just a cleanup commit | |||
moritz_ | building Rakudo at Wed Aug 27 12:45:01 2008 | ||
svn: Working copy '.' locked | |||
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details) | |||
masak | ah. | ||
12:48
Lichtkind joined
|
|||
TimToady | the problem with undef&1 is that &1 is a valid sub name in Perl 5, and undef may be used on subs | 12:49 | |
we could restrict it to sub names starting with alpha | |||
or undef & 1 would also be a good way to avoid the problem | 12:50 | ||
moritz_ wonders if he'll ever grok those two weird programming languages | |||
masak | TimToady: how would I go about declaring such a sub in Perl 5? 'sub 1 { ... }' obviously doesn't work | 12:53 | |
moritz_ | masak: *1 = sub { ... } | ||
masak | ah. | ||
TimToady | admittedly it's an uncommon name for a sub :) | ||
so we can certainly fix the warning | |||
moritz_ | or even $::{'1'} = ... | ||
masak | moritz_: of course :) | ||
pugs_svn | r22042 | moritz++ | [t/spec] some whitespace disambiguations | ||
moritz_ | in the symbol table anything is fair game | 12:54 | |
TimToady | but we're also encouraging the use of whitespace around most binary operators | ||
moritz_ | the golfers will hate us | ||
masak | indeed. but Perl 6 is not just for them. | ||
also, there's op overloading and macros :) | 12:55 | ||
moritz_ | I was about to say that Abigail will hate Perl 6, but I think that's nothing new ;) | ||
TimToady | we're not requiring it where it's unambiguous, but we expect more such ambiguities to arise as the language gets extended | ||
moritz_ | but sub infix:<+> is just too long for a good golf ;) | ||
TimToady | well, it's not like you can even name that operator in p5 | 12:57 | |
12:58
rdice joined
|
|||
masak | perl6: if 5 -> $a { say $a } | 13:04 | |
p6eval | pugs: OUTPUT[*** Cannot bind to non-existing variable: "$a"ā¤ at /tmp/ZYUNaYXv2k line 1, column 1ā¤] | ||
..elf 22042: RESULT[CODE.new(!!!)ā¤] | |||
..rakudo 29834: OUTPUT[Null PMC access in get_string()ā¤current instr.: 'parrot;P6metaclass;add_parent' pc 95 (runtime/parrot/library/P6object.pir:126)ā¤] | |||
masak | haha -- globally unsupported :) | ||
moritz_ | elf++ for creativity | ||
13:11
Lichtkind_ joined
13:14
alanhaggai left
13:15
alanhaggai joined
13:20
abra left
13:28
Lichtkind left
13:47
cmarcelo joined,
Lunchy left,
Lunchy joined
13:49
ggoebel joined
14:04
cmarcelo left
14:07
kanru left
|
|||
moritz_ | masak: that rakudo bug is... really weird | 14:13 | |
masak | the recursive one? | 14:15 | |
moritz_ | yes | ||
masak | it is. | ||
also, it's the most urgent rakudo bug I know of in the RT system right now | 14:16 | ||
moritz_ | I'm turning it into a test | ||
masak | great. | ||
moritz_++ | |||
14:16
TJCRI joined
|
|||
pugs_svn | r22043 | moritz++ | [t/spec] test for RT #58392, masak++ | 14:20 | |
masak | one of the first bugs I don't know how to work around. | 14:22 | |
I guess I could simulate the correct stack fram behaviour with an array... | |||
s/fram/frame/ | |||
14:27
SamB left
|
|||
pugs_svn | r22044 | moritz++ | [t/spec] fail() is acutally called flunk() | 14:29 | |
r22045 | moritz++ | [t] move statements/if.t to spec/ | 14:31 | ||
rakudo_svn | r30592 | moritz++ | [rakudo] remove fail() from Test.pm, it's a duplicate of flunk() | 14:32 | |
moritz_ | I think 'if 1; 2' isn't valid syntax, right? | 14:34 | |
pugs_svn | r22046 | moritz++ | [t/spec] fudged if.t for rakudo; cleared up one test | 14:35 | |
14:37
SamB joined
|
|||
masak | moritz_: in Perl 6? I'd say no -- if is followed by an expression and then a pointy block, not an expression and a semicolon. | 14:37 | |
14:38
larsen_ left
|
|||
moritz_ | I was rather confused by that test | 14:39 | |
14:39
Jedai joined
|
|||
moritz_ | it was isnt eval('if 1; 2'), 2, 'test if 1; 2'; # WTF? | 14:39 | |
rakudo_svn | r30593 | moritz++ | [rakudo] added S04-statements/if.t to spectest_regression | 14:40 | |
masak | moritz_: haha :) | ||
I liked 'test if 1; 2' | |||
it's like the Chinese wordbook I have at home. it's entirely in Chinese. so when you look up a character, you're greeted with an explanation consisting of characters. | 14:42 | ||
I'm looking forward to the day that book will be useful to me. | |||
pugs_svn | r22047 | moritz++ | [t] moved unless.t to spec/; simplified quotes. | 14:43 | |
14:45
alanhaggai left
14:47
hercynium joined
14:48
alanhaggai joined,
fridim__ joined
|
|||
pugs_svn | r22048 | moritz++ | [t] moved loop.t to spec/ | 14:50 | |
moritz_ | wtf? | 14:54 | |
is($loopvar, $loopvar, "bare loop iterates $loopvar"); | |||
masak | typo? | ||
moritz_ | there's no other variable to compare against | 14:55 | |
14:55
kanru joined
|
|||
masak | one might rightly wonder what the test was expected to test | 14:55 | |
[particle] | this one does so wonder | ||
masak | would undef fail such a test in Perl 6? | ||
pugs_svn | r22049 | moritz++ | [t/spec] loop.t: fudged for rakudo, removed non-sensically test | 14:56 | |
moritz_ | rakudo: say (undef eq undef) | ||
p6eval | rakudo 29834: No output (you need to produce output to STDOUT) | ||
masak | hm, shouldn't that at least print a newline? | ||
moritz_ | masak: that variable can't even become undef | ||
masak | oki | 14:57 | |
moritz_ | masak: yes | ||
well, it terminates with a segfault | |||
sh: line 1: 29916 Segmentation fault ./parrot languages/perl6/perl6.pbc /tmp/xJQw2zMkG8 >> /tmp/v4cClTSoMF 2>&1 | |||
14:58
zamolxes left
|
|||
masak | mine doesn't. | 14:59 | |
maybe fixed since r29384? | |||
moritz_ | I'm realcleaning the parrot dir now | 15:00 | |
uhm, Configure is really slow on that server | 15:02 | ||
building now | 15:03 | ||
masak | I get the answer '1' on both 'eq' and '==' | ||
I get '0' on '===' | |||
15:03
fridim_ left
|
|||
masak | and 'eqv' insn't implemented yet | 15:03 | |
moritz_ | they are all correct, IMHO | 15:04 | |
except that I'm not sure what === should actually return, the more I think of it | |||
masak | :) | ||
where's Sartre and Heidegger when you need them? | |||
moritz_ | well no, it's actually correct | ||
15:06
Exodist joined
15:10
Bzek left
|
|||
rakudo_svn | r30594 | moritz++ | [rakudo] two more S04-statement/ files for spectest_regression | 15:12 | |
masak | tonight is november hacking night. | 15:13 | |
I'll be back in an hour, probably with viklund in tow | 15:14 | ||
moritz_ | cool | ||
masak | and then we'll hack :) | ||
till then | |||
15:14
masak left
15:19
meteorjay joined
15:33
jan_ left,
abra joined
15:36
abra left
15:37
penk left
15:41
Auzon left,
donaldh joined
16:09
masak joined
16:15
alanhaggai left
16:17
iblechbot joined
|
|||
masak | how do I override the behaviour of ~(...) for a class? | 16:23 | |
moritz_ | in Perl 6 or in Rakudo? | ||
[particle] | prefix:<~> ? | ||
masak | in Rakudo, for now. | ||
moritz_ | uhm | ||
masak | not possible? | 16:24 | |
masak feels a rakudobug forming... | |||
moritz_ | > class A { method get_string { "foo" }; }; say A.new | ||
lambdabot | Parse error at "class" (column 1) | ||
moritz_ | get_string() not implemented in class 'A' | ||
that has a certain irony ;) | |||
masak | indeed | ||
a question of levels, I guess | |||
moritz_ | yes | 16:25 | |
[particle] | in nqp, ~ is get_string | ||
what does perl6 --target=pir -e"say ~(1)" give you? | |||
moritz_ | it should be either a prefix:<~> multi or a .Str | ||
masak | [particle]: checking. | 16:26 | |
[particle] | you don't even need say there | ||
pasteling | "moritz_" at 89.13.242.53 pasted "pir for ~(1)" (28 lines, 576B) at sial.org/pbot/32009 | ||
masak | assign $P15, 1\n$P16 = "prefix:~"($P15) | 16:27 | |
those are the relevant lines | |||
[particle] | yep | ||
so you need to implement prefix:<~> | |||
masak | how hard can it be? :) | ||
moritz_ | and in PIR you can write .sub 'prefix:<~>', but I doubt that rakudo parses that | ||
maybe a valid workaround would be to make Any.prefix:<~> call self.Str for now | 16:28 | ||
masak | could I inject a .sub 'prefix:<~>' into the class post-compilation? | ||
into the compiled PIR, I mean | 16:29 | ||
moritz_ | perhaps | ||
masak | we'll figure out a way :) | ||
s'not critical or anything | |||
moritz_ | can I give a pir .sub multi(_) a multi variant with a Perl 6 type? | 16:32 | |
[particle] | not sure, but jonathan has done some work in that direction | 16:35 | |
moritz_ | .sub 'prefix:~' :multi('Junction') | 16:36 | |
in Junction.pir | |||
[particle] | there you go | ||
16:42
alanhaggai joined
|
|||
moritz_ | anyway, my attempts don't work | 16:45 | |
masak | moritz_++ # for trying | 16:46 | |
moritz_ | which might be due to the fact that my parrot knowledge is nearly non-existant | ||
[particle] | sorry, i wish i had a checkout to help | ||
pasteling | "moritz_" at 89.13.242.53 pasted "this is what I've tried (seems to have no effect)" (16 lines, 345B) at sial.org/pbot/32010 | ||
16:47
sri_work left
|
|||
masak | moritz_: what do you imagine x will be at the point of call? | 16:48 | |
moritz_ | masak: the parameter to prefix:~ | ||
which is the object we want to stringify | |||
masak | ah -- .param | ||
masak blind | |||
for, like, the third time today | |||
moritz_ | I still get get_string() not implemented in class 'Foo' | ||
so it seems that parrot doesn't even look at prefix:~ | 16:49 | ||
masak | dang. | ||
moritz_ | which is why I tried to call that thing .sub 'get_string' :method :vtable | ||
masak | not only can't you declare it in rakudo -- when you sneak it in, it's still ignored! | ||
moritz_ | which blew up about any test | ||
masak | next question: is there any test or other working code wherein a new() method is successfully overridden? | 16:52 | |
more specifically, I want to limit access to the new() method | 16:53 | ||
moritz_ | rakudo: class Foo { method new { say %_.perl }; }; Foo.new(a => 1); | ||
p6eval | rakudo 30596: OUTPUT[{"a" => 1}ā¤] | ||
moritz_ | but then new doesn't create an object anymore | 16:54 | |
masak | p6eval: hello, updated rakudo | ||
moritz_: is there a way to override new(), yet allow objects of that class to be created? | 16:55 | ||
moritz_ | masak: I think the standard way of it doing it is with submethod BUILD, which new() calls (NYI in rakudo) | ||
masak | right. | ||
IOW, Not Right Now | 16:56 | ||
moritz_ | and I think there's a way to invoke the method from the super class | ||
masak | yay! the test for reading HTML templates from file passes! | 16:57 | |
and on my first attempt, to boot | |||
I'm soon ready to merge my branch here | 16:58 | ||
just going to work the new HTML::Template into november | |||
moritz_ | masak++ | 16:59 | |
masak | moritz_++ # just as much | 17:01 | |
moritz_ | I only did the fun parts ;-) | 17:02 | |
masak | moritz_: that's your design, your grammar, your tests | ||
I only did the minimal gruntwork | |||
moritz_ | we can spend all day acknowledging the other's work, and downplaying the own contribution ;) | 17:03 | |
masak | it still won't change the fact that you did most of it :) | ||
17:03
larsen_ joined
|
|||
moritz_ sighs | 17:04 | ||
[particle] | this discussion is off topic, please join #mutual-admiration-society | 17:06 | |
:P | |||
moritz_ | or short #mas | ||
masak | [particle]: I got kicked out of that room :/ | 17:07 | |
[particle] | :) | ||
17:09
ruoso joined
|
|||
pasteling | "masak" at 130.243.195.243 pasted "any comments on this API syntax before I finalize it?" (6 lines, 202B) at sial.org/pbot/32012 | 17:12 | |
moritz_ | do you have to pass a hash ref? | 17:13 | |
Lichtkind_ | do you open a dir also with open? | ||
17:13
Lichtkind_ is now known as Lichtkind
|
|||
moritz_ | Lichtkind: I doubt that | 17:13 | |
[particle] | from_file preferred instead of new_from_file? | ||
masak | [particle]: I think so, yes | 17:14 | |
moritz_ | well, I guess that's a hack anyway until new() works as desired | ||
[particle] | and as opposed to .new( :file<...> | ||
masak | exactly | ||
Lichtkind | but slurp closes as soon after reading? | ||
masak | [particle]: I plan to support that when it's possible | ||
[particle] | gotcha | ||
masak | as an alternative syntax | 17:15 | |
moritz_ just would like to use named arguments if possible | |||
but I guess that can be added afterwards as well | |||
masak | moritz_: if you can make it work, I'd happily accept it | ||
probably not a problem to make both approaches work | |||
moritz_ | masak: %_ worked for me, last I looked | ||
masak investigates | |||
moritz_ | Lichtkind: slurp hides the opening/closing/reading from the user | ||
rakudo: sub foo { say %_.perl } ; foo(a => 2, b => 4) | 17:16 | ||
p6eval | rakudo 30596: OUTPUT[{"a" => 2, "b" => 4}ā¤] | ||
moritz_ | so you can make .param look like the one in p5's HTML::Template | ||
masak | whee! | ||
moritz_ wonders if that is tested properly | 17:18 | ||
masak | moritz_: you told me to ping you once I got the tests passing for HTML::Template, so that you could contribute the escape part | 17:19 | |
did I do that clearly enough yesterday? :) | |||
moritz_ | masak: dunno, but at least you did now ;) | ||
ok %_ is tested | |||
17:20
abra joined
|
|||
masak | moritz_: seems the idea of sending in nameds might be fundamentally incompatible with the test suite | 17:20 | |
moritz_ | rakudo: sub foo { say %_.perl } ; my %f = (a => 1, b => 2); foo(%f) | 17:21 | |
p6eval | rakudo 30596: OUTPUT[positional inside named args at position 1ā¤current instr.: 'foo' pc 100 (EVAL_13:33)ā¤] | ||
moritz_ | rakudo: sub foo { say %_.perl } ; my %f = (a => 1, b => 2); foo(!%f) | ||
p6eval | rakudo 30596: OUTPUT[positional inside named args at position 1ā¤current instr.: 'foo' pc 111 (EVAL_13:34)ā¤] | ||
moritz_ | rakudo: sub foo { say %_.perl } ; my %f = (a => 1, b => 2); foo(|%f) | ||
p6eval | rakudo 30596: OUTPUT[Statement not terminated properly at line 1, near "(|%f)"ā¤ā¤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)ā¤] | ||
moritz_ | eek | ||
masak | :/ | ||
moritz_ | we can add a multi later ;) | ||
masak | haha | ||
masak leaves it as it is for now | |||
moritz_ | is there a reason for name TMPL_IF insertion, while TMPL_FOR is called for_statement etc? | 17:24 | |
masak | TMPL_VAR is named insertion | ||
moritz_ | erm, yes | 17:25 | |
masak | TMPL_IF is named if_statement | ||
moritz_ | TMPL_FOR is named for_statement | ||
masak | I've tried to name them after what they do. | ||
or what they are, rather | |||
ah -- code is much shorted with the new module | 17:27 | ||
17:28
cognominal_ left
|
|||
moritz_ | I assume you have a HTML escape sub lying around somewhere? | 17:28 | |
masak | not at all | 17:29 | |
oh, you mean in Wiki.pm? | |||
hold on | |||
yes, method quote | |||
but I can't give guarantees about its completeness | 17:30 | ||
moritz_ | rakudo: my $x = 'a<b<'; while $x.subst(/'<'/, '<') { 1; }; say $x | 17:31 | |
p6eval | rakudo 30596: No output (you need to produce output to STDOUT) | 17:32 | |
masak | moritz_: it's not mutating | ||
the .= form is | |||
moritz_ | rakudo: my $x = 'a<b<'; while $x.=subst(/'<'/, '<') { 1; }; say $x | ||
p6eval | rakudo 30596: OUTPUT[MMD function __concatenate not found for types (160, -98)ā¤current instr.: 'parrot;Perl6;Grammar;Actions;dotty' pc 111170 (src/gen_actions.pir:5274)ā¤] | ||
masak | (but that doesn't work in rakudo) | ||
moritz_ | rakudo: say "sanity" | ||
p6eval | rakudo 30596: OUTPUT[sanityā¤] | ||
masak | moritz_: also, had that worked, you'd probably had an infinite loop on your hands | 17:33 | |
moritz_ | yes | ||
Lichtkind | moritz_: in other words yes :) | 17:35 | |
moritz_ | masak: where should common subs go? | ||
like a general HTML escaper | |||
masak | uhm | 17:36 | |
hm | |||
moritz_ | Text::Escape? ;-) | ||
[particle] | how about creating a package for it | ||
yep | |||
masak | sure, why not | ||
moritz_ | I'll first stuff it into HTML::Template, and when it works I'll factor it out | ||
masak | here's our chance to grab all the good names before anyone else :) | ||
[particle] | :) | ||
masak claims DBI | 17:37 | ||
moritz_ claims Perl - oh, too late | |||
[particle] claims STD | |||
masak | :) | ||
moritz_ | who wants sexually transmitted deceases anyway? ;) | 17:38 | |
[particle] | you can have Crab::Lice | ||
masak does a double take on STDIN and STDOUT | |||
moritz_ | masak: go ahead, those are called $*IN and $*OUT now anyway ;) | 17:39 | |
masak | dang. | ||
I guess I have to make to with the namespaces Sub, Code, Regex, Array and Hash, then... | 17:41 | ||
s/make to/make do/ | |||
moritz_ | my escaping code works, for <>", but when I use it for & also it segfaults :/ | 17:44 | |
masak | moritz_: mind the recursion | ||
moritz_ | masak: iterative | ||
masak | still might cause problems. | ||
infinite expansion | |||
moritz_ | THIS IS NO FUN | 17:45 | |
masak | hehe | ||
17:45
rindolf joined
|
|||
masak has been where moritz_ is, about twice | 17:46 | ||
moritz_ | sial.org/pbot/32014 | ||
lambdabot | Title: Paste #32014 from "moritz_" at 89.13.242.53 | ||
masak | viklund says that he likes our old one better :) | 17:47 | |
moritz_ | rakudo: say 'abc'.subst(/b/, { $_ x 3 }) | 17:48 | |
p6eval | rakudo 30596: OUTPUT[a_block18cā¤] | ||
moritz_ | that would be *really* helpful | ||
masak | indeed. | ||
moritz_ | then we could just do a hash lookup | ||
17:48
pmurias joined
|
|||
masak | we could now too, but not with subst | 17:48 | |
17:48
fridim__ left
|
|||
moritz_ | yes | 17:49 | |
masak | possibly with ~~ | ||
moritz_ tries | |||
masak | still a bit tricky to avoid the expansion stuff | 17:50 | |
I guess one could check that $/.from has advanced, or sumth'n | |||
moritz_ | YES | 17:51 | |
masak | :) | 17:52 | |
pasteling | "moritz_" at 89.13.242.53 pasted "working HTML escape" (21 lines, 430B) at sial.org/pbot/32015 | ||
masak | we're getting there :) | ||
with ~~, you won't need to iterate every position in the string | 17:53 | ||
moritz_ | so how does that work without :g ? deconstruct the string? | ||
masak | also, viklund adds that your impl might miss the last few chars | ||
17:54
Myoma joined
|
|||
masak | moritz_: I was thinking looping, and using ~~ to find the next char of interest | 17:54 | |
moritz_ | viklund: do you have a test case where it looses the last char(s)? | ||
masak: yes, but ~~ always starts from... the start | |||
masak | moritz_: viklund doesn't have a keyboard right now. he's holding the baby :) | 17:55 | |
I might give an example | |||
moritz_ | lol | ||
masak | '<<<<<<<<<<<' | ||
.oO( pair programming: one at keyboard, one holds baby ) |
17:56 | ||
moritz_ | prints <<<<<<<<<<< for me | ||
which is right, IMHO | |||
masak | oh -- is $str.chars - 1 dynamically eval'ed? | ||
in that case, nvm | 17:57 | ||
moritz_ | no, $str never changes | ||
[particle] | what about '&' | ||
masak | moritz_: oh, right | ||
sry | |||
[particle]: see recent insight about $str never changing | |||
moritz_ | [particle]: is turned into &amp; | ||
[particle] | good | ||
you should have a uri escape, too | 17:58 | ||
masak | yes. | ||
moritz_ | rakudo: sub f ($x) { $x(2) }; say f({$_ * 2 }); | 18:00 | |
p6eval | rakudo 30596: RESULT[4ā¤1] | ||
masak | rakudo++ | ||
moritz_ | Higher Order Rakudo ;-) | 18:01 | |
masak | aye :) | ||
moritz_ | YaY | 18:02 | |
masak | much of that today :) | ||
pasteling | "moritz_" at 89.13.242.53 pasted "Higher Order HTML escape" (29 lines, 681B) at sial.org/pbot/32016 | ||
18:03
pmurias_ joined
|
|||
pmurias_ | ruoso: hi | 18:04 | |
moritz_ | should & in URLs be translated to & or to %56, in HTML::Escape? | ||
18:04
pmurias left
|
|||
masak | moritz_: make the book deal with MJD right away :) | 18:04 | |
moritz_ | heh ;) | ||
18:04
pmurias_ is now known as pmurias
|
|||
masak | the baby has grabbed my right hand! I have to program single-handedly! | 18:06 | |
18:07
Myoma left
|
|||
moritz_ | whose baby is it? | 18:07 | |
masak | viklund's | ||
and viklund.wife()'s | |||
moritz_ | ;) | ||
how do you run november's tests? | 18:08 | ||
masak | in my branch, perl6 t/html-template.t | ||
moritz_ | so have you installed perl6 somewhere? | 18:09 | |
masak | no, just an alias | ||
moritz_ passes all tests | 18:12 | ||
masak | really? number 13 too? | ||
moritz_ | no, not quite | ||
but that doesn't count | |||
masak | thought so :) | ||
moritz_ | except that remove a debugging statement ruins it all | 18:13 | |
masak | how so? | 18:14 | |
moritz_ | say $chunk<directive><insertion><attributes><escape>.perl; | ||
$value = escape($value, | |||
~$chunk<directive><insertion><attributes><escape>); | |||
works | |||
when I remove the line with say | |||
it passes 1 instead of the escape value to escape() | |||
masak | strange. | 18:15 | |
usually, when we remove insignificant lines, Parrot crashes :) | |||
moritz_ | but I can s/say/my $dummy = / ;-) | ||
masak | sure! | ||
moritz_ | git-diff doesn't report git-add'ed files | 18:19 | |
how can I change that? | |||
masak | moritz_: git diff --cached | ||
(says viklund) | 18:20 | ||
moritz_ | uhm, I accidentially added a superflous file | ||
what's the git-delete equivalent? ;-) | 18:21 | ||
masak | hm, maybe there's a switch to git rm... | ||
...so that it doesn't actually nuke the file in the wc | |||
moritz_ | ah, git-rm | ||
18:22
pmurias left
|
|||
masak | dang, I've forgotten <TMPL_ELSE>... | 18:23 | |
masak goes back to the drawing board | |||
18:24
pmurias joined
|
|||
moritz_ | [PATCH] sent | 18:24 | |
masak | moritz_++ | 18:25 | |
will look at it as soon as the baby stops being so adorable as to grab all the attention | |||
moritz_ | hehe ;) | ||
18:34
abra left
|
|||
masak | tinyurl.com/5a6pu2 # the baby | 18:43 | |
lambdabot | Title: Incompatible Browser | Facebook | ||
masak | lambdabot++ # being incompatible with Facebook | ||
moritz_ | ;) | 18:44 | |
masak | you can spot #perl6 in the upper left corner | ||
moritz_ | ;) | ||
masak | actually, at the far left is a terminal window with november programming | 18:45 | |
19:00
IRSeekBot left
19:04
larsen_ left
|
|||
masak calls it a night | 19:16 | ||
moritz_, [particle]: thanks for a fun session! | |||
19:17
masak left
|
|||
moritz_ | ;) | 19:17 | |
19:32
IRSeekBot joined
|
|||
rakudo_svn | r30598 | pmichaud++ | [rakudo]: spectest-progress.csv update: 127 files, 2278 passing tests | 19:33 | |
19:34
pmurias left
19:35
jferrero joined,
jferrero left
19:38
lambdabot left
19:40
lambdabot joined
19:42
BinGOs_ joined
|
|||
pasteling | "#rurban" at 212.183.85.199 pasted "bf also" (31 lines, 941B) at sial.org/pbot/32022 | 19:44 | |
19:45
lambdabot left
19:47
BinGOs_ left
|
|||
moritz_ | rakudo_svn: it seems that parts of this patch is already applied, which is why the patch fails | 19:47 | |
erm, I meant rurban ;) | |||
19:48
pjcj_ joined,
pjcj left
19:50
BinGOs left
20:08
rdice left
20:20
pmurias joined
20:24
rindolf left
20:35
Alias_ joined
20:41
dmq left
20:44
ruoso left
21:01
pmurias left
21:26
cognominal joined
21:35
BinGOs joined
21:37
wknight8111 joined
21:43
TJCRI left
21:53
jfredett joined,
japhb left
21:56
japhb joined
22:31
hercynium left
23:03
Exodist left
23:12
ruoso joined
|
|||
ruoso | Hello | 23:14 | |
23:25
IRSeekBot left
|
|||
Lichtkind | ruoso: hello | 23:28 | |
ruoso: sorry missed your talk at yapc | |||
ruoso | Lichtkind, me too ;) | ||
Lichtkind, pmurias gave it in my place ;) | 23:29 | ||
the slides are in the wiki | |||
Lichtkind | ruoso: you werent in kopenhagen? | ||
ruoso | no... I've recently moved back to brazil... So I couldn't get there... | 23:30 | |
Lichtkind | ruoso: i first thought you said you missed my talk too :) | 23:32 | |
ruoso | but... I did miss it ;) | ||
Lichtkind | ruoso: does smop develope well? | 23:34 | |
ruoso | yes... we're very close of getting the first stage compiler ready... | ||
23:34
funktio left
|
|||
ruoso | I mean... the runtime that this first stage compiler requires is almost ready... | 23:34 | |
not the compiler itself | |||
Lichtkind | understand | 23:35 | |
23:35
hercynium joined
23:36
cognominal left,
funktio joined
|
|||
Lichtkind | ruoso: great i make also progress with kephra | 23:39 | |
ruoso | cool | 23:42 | |
Lichtkind | ruoso: you heard from that? | ||
ruoso reading the site atm | 23:43 | ||
Lichtkind | ruoso: i currently work on a output panel so i can ran perl scripts inside the editor | ||
there are some issues | 23:44 | ||
but i want to make a bigger release soon | |||
to grep some atention | 23:45 | ||
ruoso | Lichtkind, the one thing that really holds me to emacs is the code indenter (tab-always-indent) | 23:46 | |
I would definitively try kephra if it supports tab-always-indent... | |||
Lichtkind | ruoso: explain please | ||
23:47
cognominal joined
|
|||
ruoso | when I press "tab" it re-indents the current line (according to the code)... instead of adding a "tab" character | 23:47 | |
the indent mechanism is pretty smart... | |||
and usually I trust it to the point that if it's doing something weird, it's because my code is wrong... | 23:48 | ||
Lichtkind | i never tried that, sounds interesting but i can do that in next phase when PPI is plugged into the system | 23:51 | |
its already compilation wise but there are many issues | |||
thanks for that hint interesting feature | 23:52 | ||
ruoso | I see... I would love to switch to an editor that I can actually understand the source code... | ||
Lichtkind | :) | ||
ruoso | emacs lisp is just something I can't get... | ||
Lichtkind | its not only that | 23:53 | |
ruoso | about features... having "emacs-style" keybindings is also a "must-have" ;) | ||
Lichtkind | thats on todo but currently low | ||
its not even that i want turn CPAN into IDE | 23:54 | ||
its about really editor in perl style easy but sophisticated | |||
ruoso | I've already considered writing an editor myself.. | 23:55 | |
I would even call it pmacs ;) | |||
Lichtkind | because editor is always something personal and every programmer wnats to tweak its enviroment a little | ||
ruoso | but then I got other stuff to do and never actually started it | ||
Lichtkind | in cpan is already a vip :) | 23:56 | |
yes writing an editor is a whole life job :) | |||
ruoso | but one thing I think today is that an editor is basically two things: | ||
1) a good buffer model | 23:57 | ||
Lichtkind | but someone has to do it :) | ||
ruoso | 2) a good event model | ||
Lichtkind | 2) is building up but 1) is encapsulated in component | ||
ruoso | if the two items above are well implemented, the rest comes naturally | ||
Lichtkind | i using same es Komodo | ||
or i never woul get usable results | 23:58 | ||
ruoso | I would suggest using the component as a view of that model | ||
Lichtkind | maybe later | ||
theory comes later :) | |||
ruoso | :P | ||
Lichtkind | i refactures it several times | 23:59 | |
it now gets some decent api for commands and events and extentions |