6.2.11 released! | pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | < audreyt> my fingers juxpatosed Set by nothingmuch on 24 February 2006. |
|||
00:11
TMTOWTDIt left
00:37
frederico_ joined
01:23
joepurl joined
01:48
pankaj_ joined
02:16
vel joined
02:29
Supaplex_ joined
02:45
samuel joined
02:49
Bit-Man joined
03:03
Khisanth joined
03:09
samuel joined
03:12
samuel joined
03:14
samuel joined
03:15
samuel joined
03:18
samuel joined
03:19
hcarty joined,
hcarty left
03:20
samuel joined
03:23
samuel joined
03:27
samuel joined
03:34
samuel joined
03:38
samuel joined
03:44
samuel joined
03:48
samuel joined
03:51
samuel joined
03:53
samuel joined
03:56
joepurl joined
03:58
samuel joined
04:04
samuel joined
04:06
samuel joined
04:09
samuel joined
04:12
samuel joined
04:13
amnesiac joined
04:14
samuel joined
|
|||
ayrnieu | sigh, I'm lame. | 04:21 | |
ayrnieu forgets his feather password. | |||
Khisanth | samuel: are you planning on staying or what? | 04:33 | |
04:36
mako132_ joined
04:37
samuel joined
04:39
samuel joined
04:41
samuel joined
04:44
samuel joined
04:45
stevan joined
04:47
samuel joined
04:49
samuel joined
04:51
samuel joined
04:54
samuel joined
04:57
samuel joined
04:59
justatheory joined
05:00
samuel joined
05:02
samuel joined
05:05
samuel joined
05:06
samuel joined
05:07
mauke joined
05:10
samuel joined
05:12
samuel joined,
drrho joined
05:15
K joined
05:17
samuel joined
05:21
samuel joined
05:25
jisom joined
05:26
samuel joined
05:31
samuel joined
05:33
samuel joined
05:36
samuel joined
05:38
samuel joined
05:41
samuel joined
|
|||
TimToady | putter: it would be relatively easy to make a patch to disable interpolation (except for \\) on regexen. Would that help? | 05:43 | |
05:44
samuel joined
05:49
samuel joined
05:52
samuel joined
|
|||
gaal | bsb, lumi: ping | 05:53 | |
05:53
samuel joined
|
|||
gaal | pizza saturday, my place | 05:54 | |
05:54
xinming joined
05:56
samuel joined
06:01
samuel joined
06:06
samuel joined
|
|||
jisom | is there currently any intention of allowing inlined pir/pasm in perl 6? | 06:09 | |
06:09
samuel joined
06:12
samuel joined
06:17
samuel joined
06:18
draconit_ joined
06:19
samuel joined
06:23
iblechbot joined,
samuel joined
06:27
beppu_ joined,
jisom left,
samuel joined
06:28
jisom joined
06:29
samuel joined
06:31
draconit_ left
06:32
samuel joined,
draconit_ joined
|
|||
gaal | jisom: eval $pir, :lang<parrot> should work | 06:35 | |
$work & | |||
jisom | right now I think compiling ghc stalled the computer building ghc...might have to force it to restart....should also say that the memory requirements for building ghc are excessive instead of just "it's slow" | 06:36 | |
06:38
samuel joined
06:40
samuel joined
06:42
samuel joined
06:44
samuel joined
|
|||
GeJ | morning folks | 06:48 | |
draconit_ | boker | ||
morning | |||
06:53
samuel joined
|
|||
dduncan | I think that effing multiple commit is going to happen again ... | 06:57 | |
svnbot6 | r9230 | Darren_Duncan++ | r2625@darren-duncans-power-mac-g4: darrenduncan | 2006-02-23 16:48:45 -0800 | ||
r9230 | Darren_Duncan++ | ext/Rosetta/ : small changes to resync with new 0.721.0 CPAN release | |||
dduncan | yep, there it is | ||
06:58
samuel joined
|
|||
dduncan | god, and I don't think that's the only one, either | 06:58 | |
svnbot6 | r9231 | Darren_Duncan++ | r2646@darren-duncans-power-mac-g4: darrenduncan | 2006-02-24 01:11:26 -0800 | ||
r9231 | Darren_Duncan++ | ext/Rosetta/ : incremented main module versions following CPAN release, fixed format bugs in Language.pod | |||
dduncan | f*ck | ||
stupid svk | 06:59 | ||
yet another ... | |||
svnbot6 | r9232 | Darren_Duncan++ | r2671@darren-duncans-power-mac-g4: darrenduncan | 2006-02-25 01:39:44 -0800 | 07:01 | |
r9232 | Darren_Duncan++ | ext/Rosetta/ : added new module Rosetta::Shell, an interactive command shell over Rosetta, to make casual use/try-outs/dev/testing easier | |||
r9233 | Darren_Duncan++ | r2730@darren-duncans-power-mac-g4: darrenduncan | 2006-03-01 22:54:27 -0800 | |||
r9233 | Darren_Duncan++ | ext/Rosetta/ : added new file examples/shell.p6, updated Shell.pm and Model.pm | |||
dduncan | okay, actually that one was correct | 07:02 | |
r9233 is correct, 32 and 31 are dups | |||
and 30 is a dup | 07:03 | ||
07:03
samuel joined
07:08
samuel joined
07:13
f joined,
samuel joined
07:15
samuel joined
07:17
samuel joined
07:20
samuel joined
07:22
samuel joined
|
|||
xinming | flooding? | 07:22 | |
07:24
samuel joined
|
|||
buu | So | 07:26 | |
07:27
samuel joined
|
|||
buu | How are roles different from multiple inheritance? | 07:27 | |
07:29
samuel joined
07:32
samuel joined
07:34
samuel joined
07:37
samuel joined
|
|||
audreyt | greetings | 07:37 | |
<- about to take taxi to German Perl Workshop | 07:38 | ||
Kattana | Hallo o/ | ||
audreyt | the airline (Austrian/Lufthansa) lost all baggage | ||
they are still trying to 1)find it and 2)send it to hotel | |||
hence I'm without most of my stuff :/ | |||
buu: roles are flattened, so you don't ever have to call super() | |||
buu: also, if two roles provides the same methods to a class that mixes them in, that's a compile time error rather than runtime breakage | 07:39 | ||
buu | So what happens if one role provides a method another role does? | ||
heh | |||
audreyt | conflict | ||
;) | |||
07:39
samuel joined
|
|||
audreyt | okay, bbl in ~30min if the workshop has wireless | 07:40 | |
& | |||
07:42
samuel joined
07:44
samuel joined
07:47
samuel joined
07:49
mj41__ joined,
wilx`` joined
07:52
samuel joined
07:55
samuel joined
|
|||
ayrnieu | irssi: /ignore samuel JOINS PARTS | 07:56 | |
07:56
samuel joined
07:58
meppl joined
|
|||
gaal | audreyt! | 07:59 | |
08:00
samuel joined
08:10
Bit-Man joined
08:25
ghenry joined
08:27
jisom_ joined
08:31
pankaj_ is now known as spo0nman,
jisom_ joined
08:33
ghenry_ joined
08:39
marmic joined
08:59
nothingmuch joined
|
|||
nothingmuch | hola | 09:01 | |
gaal | hey nothingmuch | ||
nothingmuch read the first SYB paper | 09:05 | ||
how does it replace the threading of inherited/synthesized attrs in AGs? | |||
it's like having just synthesized ones | |||
and while impressive, it's completely orthogonal =) | 09:06 | ||
azuroth curses UML | 09:07 | ||
gaal | I've no idea--am not familiar with AGs--where did you see it claimed that it did? | 09:09 | |
nothingmuch | everyone said that SYB is >= AGs | 09:10 | |
mooseness | 09:24 | ||
ayrnieu | ?eval { my $bal = 0; sub deposit { $bal += @_[0]; $bal } sub withdraw { if ($bal - @_[0] < 0) { "Sorry, you only have a balance of \\$bal" } else { $bal -= @_[0]; $bal } } } [deposit(250), withdraw(5), withdraw(5), withdraw(100), withdraw(200)] | 09:29 | |
evalbot_9233 | [undef, undef, undef, undef, sub {...}] | ||
azuroth | dare I question that? | 09:31 | |
ayrnieu | ah, oops. | ||
?eval { my $bal = 0; sub deposit { $bal += @_[0]; $bal } sub withdraw { if ($bal - @_[0] < 0) { "Sorry, you only have a balance of \$bal" } else { $bal -= @_[0]; $bal } } }; [deposit(250), withdraw(5), withdraw(5), withdraw(100), withdraw(200)] | 09:32 | ||
evalbot_9233 | [250, 245, 240, 140, "Sorry, you only have a balance of \$bal"] | ||
ayrnieu | oops again :-) azuroth - sure, why not? | ||
azuroth | ohh, it was.. trying to subscript the scope..? | ||
for fear of being laughed at ;-) | 09:33 | ||
ayrnieu | if you're already afraid of being laughed at, and in no danger of contracting this fear through trauma... | 09:36 | |
would you mind rewriting what I just wrote where $bal is an object with .deposit and .withdraw methods? :-) | 09:37 | ||
azuroth | I can try... | ||
?eval class Account { has $:bal; method deposit(Int $amt) { $:bal += $amt }; method withdraw(Int $amt) { if ($bal - $amt < 0) {"Sorry, $bal"} else {$bal -= $amt} } } | 09:39 | ||
evalbot_9233 | Error: unexpected ":" expecting "$!" | ||
09:43
Draconit joined
|
|||
azuroth | nah, I've no idea | 09:43 | |
ayrnieu | ah well, someone who has one will surely come along. | 09:46 | |
curiously, though, why did you say Int $amt ? | |||
azuroth | good point; s/Int/Num/ | 09:47 | |
or did you mean why prototype at all? | 09:48 | ||
ayrnieu | no, just why the Int | 09:49 | |
rafl searches for an easy but practical example of rules. | 10:02 | ||
I'd like to mention them in my Perl 6 talk on GPW, but I think I would need 40 minutes only to explain them. | 10:03 | ||
Unfortunately the whole talk needs to fit into 40 minutes. | |||
10:04
rantanplan_ joined
10:12
mako132_ joined
|
|||
ayrnieu | ?eval class Account { has $.bal; method deposit (Num $amt) { $.bal += $amt; $?SELF }; method withdraw (Num $amt) { $.bal < $amt and return "Sorry, you've only \$$.bal"; $.bal -= $amt; $?SELF } }; my $act = ::Account.new.deposit(250); [map { $act.withdraw($_); $act.bal } <5 5 100 200>] | 10:14 | |
evalbot_9233 | [245.0, 240.0, 140.0, 140.0] | ||
ayrnieu | bias towards returning $self^W$?SELF , meet wall. | 10:15 | |
?eval class Account { has $.bal; method deposit (Num $amt) { $.bal += $amt }; method withdraw (Num $amt) { $.bal < $amt and return "Sorry, you've only \$$.bal"; $.bal -= $amt } }; my $act = ::Account.new.deposit(250); [map { $act.withdraw($_) } <5 5 100 200>] | |||
evalbot_9233 | Error: No such method in class Int: "&withdraw" | ||
10:16
iblechbot joined
|
|||
ayrnieu | ?eval class Account { has $.bal; method deposit (Num $amt) { $.bal += $amt }; method withdraw (Num $amt) { $.bal < $amt and return "Sorry, you've only \$$.bal"; $.bal -= $amt } }; my $act = ::Account.new; $act.deposit(250); [map { $act.withdraw($_) } <5 5 100 200>] # :-( | 10:16 | |
evalbot_9233 | [245.0, 240.0, 140.0, "Sorry, you\'ve only \$140"] | ||
jp-autark | can you defined your own "Num" type, say to be all numbers >= 0? | 10:17 | |
define | 10:18 | ||
ayrnieu doesn't know. | 10:19 | ||
azuroth | I think so - somehow | ||
ayrnieu | class Num { has $.bal = 1_000_000 }; 5.bal | ||
?eval class Num { has $.bal = 1_000_000 }; 5.bal | |||
evalbot_9233 | Error: unexpected "=" expecting trait, "handles", ";" or "}" | 10:20 | |
10:22
clkao joined
|
|||
lypanov | hey clkao | 10:24 | |
ayrnieu | ?eval class Num { has $.bal is rw }; my $n = ::Num.new; [$n, $n.foo = 10, $n.foo, $n.foo = 5, $n.foo] | 10:25 | |
evalbot_9233 | Error: No such method in class Num: "&foo" | ||
ayrnieu | ?eval class Num { has $.foo is rw }; my $n = ::Num.new; [$n, $n.foo = 10, $n.foo, $n.foo = 5, $n.foo] | ||
evalbot_9233 | [Num.new(("foo" => 5),), 10, 10, 5, 5] | ||
azuroth | ?eval my subset PosNum of Num where {$^x >= 0}; my PosNum $a = 5; | 10:28 | |
evalbot_9233 | Error: unexpected "P" expecting variable name or "(" | 10:29 | |
azuroth | ?eval my subset PosNum of Num where {$^x >= 0}; my $a = PosNum.new(5); | ||
evalbot_9233 | Error: unexpected "P" expecting variable name or "(" | ||
azuroth | ?eval my subset PosNum of Num where {$^x >= 0}; my $a = ::PosNum.new(5); | ||
evalbot_9233 | Error: unexpected "P" expecting variable name or "(" | ||
azuroth | ?eval my Num subset PosNum where {$^x >= 0}; my $a = ::PosNum.new(5); | 10:30 | |
evalbot_9233 | Error: unexpected "s" expecting variable name or "(" | ||
azuroth | oh well | ||
ayrnieu | there are no subtype tests in Pugs, currently. Want to write a test? | 10:34 | |
oops, they are in data_types/ | 10:36 | ||
somehow, my grepping failed me. | |||
actually, Perl6::Bible's S12.pod just seems out of date. The tests indicate that it's called 'subtype', now. | 10:37 | ||
azuroth | hmm. I'd be inclined to go with the synopses rather than the tests? :x | 10:38 | |
ayrnieu | (still not implemented) | ||
10:39
chris2 joined
|
|||
ayrnieu | (I mean, the not-implementedness of subtype continues the perceived likely not-implementedness of subset.) | 10:40 | |
azuroth | true | 10:41 | |
ayrnieu | but, yes, it looks like I could just use a lexical subtype for ::Account :-) | 10:44 | |
where I could make type errors out of <=0 | 10:45 | ||
azuroth | interesting indeed | 10:47 | |
I'm learning about derivatives of graphs. I really wish I'd done some proper maths | 10:48 | ||
ayrnieu | ?eval multi rev () {}; multi rev (*$a, *@r) { (rev(@r), $a) }; rev 1..5 | 10:55 | |
evalbot_9233 | (\5, \4, \3, \2, \1) | ||
ayrnieu | ?eval, (5,4) | ||
evalbot_9233 | Error: unexpected "," expecting program | ||
ayrnieu | ?eval (5,4) | 10:56 | |
evalbot_9233 | (5, 4) | ||
svnbot6 | r9234 | juerd++ | Committing my Perl 6 Myths talk | 11:06 | |
rafl | audreyt: Nice talk | 11:16 | |
11:18
ntgrl joined
|
|||
nothingmuch | jabbot: seen audreyt? | 11:22 | |
jabbot | nothingmuch: audreyt was seen 3 hours 41 minutes 51 seconds ago | ||
nothingmuch | arf | ||
just missed her then =) | |||
=( | |||
lypanov | 01:57 < audreyt> [00:40] okay, bbl in ~30min if the workshop has wireless | ||
now == 04:22 | 11:23 | ||
so at a guess, workshop didn't have wireless | |||
nothingmuch | lypanov: Juerd seemed to have access | ||
Juerd | Audrey can't get the vpn to work | 11:24 | |
nothingmuch | i just got retro-spam | ||
spam dated for 2005 | |||
oh | |||
Juerd | We exchange my lightening talk on a usb stick :) | 11:25 | |
11:28
K joined
11:35
Draconit left
|
|||
nothingmuch | ×××”! | 11:35 | |
11:35
Draconit joined
|
|||
nothingmuch | Juerd: send my regards to balas if she's at the workshop | 11:36 | |
Juerd | I haven't seen balas | 11:37 | |
svnbot6 | r9235 | juerd++ | Audrey's changes: present tense, blank lines, a new slide, a better "Perl 6 is not Perl" slide | ||
lypanov | umm | 11:38 | |
nothingmuch | In that case, please don't try to greet her under any circumstance | ||
lypanov | that reminds me. stupid question... but | ||
nothingmuch | there's no point in trying to do it if she's not there! | ||
lypanov | why did perl6 keep $/%/@ ? | ||
ntgrl | lypanov++ | ||
Juerd | lypanov: Because they're useful. | 11:39 | |
nothingmuch | lypanov: they help disambiguate things | ||
for example &sub is the value | |||
but sub is a call | |||
this allows us to not need to say sub() all the time | |||
lypanov | & understand | 11:40 | |
but $ % and @? | |||
nothingmuch | it also helps reading | ||
lypanov | & makes perfect sense, i'm a ruby oldie and have to agree | ||
nothingmuch | they're not *really* necessary | ||
lypanov | is it still possible to use a % instead of a $ and make the code just /not work/? | ||
nothingmuch | but:a | ||
Juerd | lypanov: Of course. | ||
nothingmuch | a. it doesn't really fudge | ||
i mean, it's not a hindrance of any sort | 11:41 | ||
lumi | nothingmuch: ping | ||
nothingmuch | b. it helps readability | ||
lumi | Well, not ping | ||
nothingmuch | c. it is perlish | ||
lypanov | but it requires you to think about it while you are coding more... | ||
nothingmuch | lumi: gnip? | ||
lypanov | its the reason i don't use perl... | ||
Juerd | lypanov: They're *ugly*, but ugly isn't a reason to have or not have something. | ||
nothingmuch | i like having to think while i code | ||
lypanov | this is kind of sad :( | ||
Juerd | lypanov: They're useful and make many things easier. | ||
nothingmuch | ;-) | ||
lypanov | nothingmuch: i don't | ||
nothingmuch: my test cases do my thinking | |||
nothingmuch | actually i sort of agree | ||
eek | |||
that's not a good enough approahc | |||
thinking is required | 11:42 | ||
Juerd | lypanov: Every feature, every character, everything, in programming, requires thinking. If you are unable to think, or don't like to think, programming is not for you. | ||
nothingmuch | at least at some level | ||
lypanov | nothingmuch: somedays i'm tired | ||
nothingmuch | thinking about *language tax* is not | ||
ntgrl | you could also ask why we have % and @, instead of just having all containers as objects in $ vars | ||
nothingmuch | but | ||
sigils help when reading | |||
lypanov | ntgrl: exactly | ||
nothingmuch | lack of sigils help with writing | ||
Juerd | ntgrl: You can have that if you want. | ||
ntgrl | it's easy to think that functions are special to warrant a sigil | ||
lypanov | sigils just confuse... | ||
ntgrl | Juerd: yeah, you just have to become world president first to force everyone else to do it too =) | ||
Juerd | ntgrl: Forcing people has never been Perlish. | 11:43 | |
ntgrl | Juerd: okay, how do I write perl code *without* being forced to use sigils? :-P | ||
lypanov | okay. lets put it another way | ||
is slice syntax still utterly fucked or does it Just Work these days? | 11:44 | ||
ntgrl | it was utterly fucked? (for something other than hash references...) | ||
lypanov | ntgrl: i mean for hash refs | ||
sorry should have said that | |||
nothingmuch | perl 6 slicing for hashes is OK now | 11:45 | |
i think | |||
lypanov | does perl6 still have this weird concept of refs vs non refs? | ||
nothingmuch | that's a weird concept? | ||
ntgrl | my question is: why separate sigils for hashes and arrays? why not just: my @array is vector; my @array is hash; my @array is btree; ? | ||
lypanov: curiously I wouldn't have said that was weird :-/ | |||
nothingmuch | ntgrl: again, it's a cultural issue more than anything | 11:46 | |
perl programmers are more important to Perl 6's design than ruby programmers | |||
in terms of "feeling at home" | |||
lypanov | i can code both, well | ||
ntgrl | maybe, but I can understand that you can slice an @ or a %, but you can't slice a $, so there's *two* categories there, not the three | ||
lypanov | doesn't remove the fact that it is very difficult to change perl code when compared to changing ruby code | 11:47 | |
nothingmuch | the main diff is that arrays are ordered, hashes aren't | ||
and that implies that some things make sense with one thing implicitly | |||
but have to be explicit otherwise | |||
ntgrl | like? | ||
lypanov | umm *thinks* | ||
wolverian | refs can't be sliced? | 11:48 | |
nothingmuch | (iteration, splicing, poping, pushing) | ||
refs can be sliced today | |||
ntgrl | we cope with "key", "values" and "each" already | ||
wolverian: well you're slicing the container pointed at by the ref... but I'm needlessly pedantic | |||
nothingmuch | ntgrl: it DWIMs in perl 6 | ||
lypanov | nothingmuch: okay. maybe the main reason for my hate is the difficult with finding a variables type, and added to that the insane syntax that is needed in many cases | ||
nothingmuch | $array_ref[...]; | ||
lypanov | but it sure sounds like the syntax has been fixed | 11:49 | |
nothingmuch | define finding a variable's type | ||
the value class? | |||
ntgrl | but it's still slicing the pointed at thing, not the scalar | ||
nothingmuch | or the container implementation? | ||
ntgrl: true, sigils are not as neeeded in perl 6 as they were in perl 5 | 11:50 | ||
due to more "automatic" behavior WRT reference | |||
auto dereferencing | |||
auto enreferencing | |||
ntgrl | sure, but that doesn't change what's being sliced! | ||
nothingmuch | but we still distinguish between list and scalar context | ||
and listy things are @ish | |||
and @ish things behave in a listy way | 11:51 | ||
like automatically concatenating | |||
etc | |||
again, this is more of a cultural issue | |||
lypanov | i'll have to just try it, its all about feel | ||
if i dislike it i'll try and come up with tests and point out how it can be improved | |||
nothingmuch | you can probably hack a weird glue layer over the grammar that makes any term an rvlaue | ||
not just sigiled stuff | |||
sure | |||
that's always welcome | |||
lypanov | nothingmuch: i think its stupid so say "this is cultural issue" | ||
s/so/to/ | 11:52 | ||
nothingmuch | but since Perl 5 programmers feel at home with this, i doubt it's going to change a lot | ||
lypanov | nothingmuch: you can surely make it less of a cultural issue and improve it for others | ||
nothingmuch | well, show me how it isn't | ||
most of Perl 6's target audience irrationally thinks that sigils are important | |||
lypanov | print Dumper in perl5 doesn't work generically | ||
nor does ref(blah) always work | |||
nothingmuch | (just read all the crap P6 has been getting for changing -> to . | ||
the first should be fixable in perl 6 | 11:53 | ||
the second will not | |||
because not everything is a ref | |||
lypanov | there is thusly in some (read, many) cases when its simply impossible to find out how you are meant to use a methods returned value | ||
without good documentation (*cough*) | |||
or reading the entire damn source | |||
nothingmuch | okay | ||
lypanov | this is fixed somehow? | ||
nothingmuch | you mean returning an array ref instead of a list for "performance" reasons? | ||
lypanov | for example, yes | ||
nothingmuch | okay | ||
that behaves better now | 11:54 | ||
because things coerce more nicely | |||
but frankly, i couldn't care less | |||
this is a low level issue | |||
the reason I want Perl 6 is because of high level things | |||
for example, all the idiots that diss python for using significant whitespace are just white noise to me | |||
it's just syntax | 11:55 | ||
if the semantics are good enough, than who cares | |||
(i like haskell, and it parses almost like python, but i wasn't very impressed with python... guess why?) | |||
ntgrl | lack of overriding the whitespace convention? | ||
nothingmuch | ? | 11:56 | |
Perl 6's approach to this is: here's a default, the underlyingg API lets you change that | |||
ntgrl | you can do: do { f; g } in haskell, so whitespace convention is entirely optional | ||
nothingmuch | if you want 'use Syntax::Ruby' i don't think it'll mind | ||
not just for do | |||
also for where | |||
and let | |||
they have significant whitespace | |||
azuroth | why weren't you impressed though, nm? | 11:57 | |
nothingmuch | and nobody uses do { f; g }, that's ugly ;-) | ||
because python has this sort of uninspiredness about it | |||
ntgrl | sure, that's because it's defined as a single way to convert {;} <-> whitespace | ||
nothingmuch | it is as simple as it can ever be, and getting simpler | ||
read: dumber | |||
azuroth | hmm. I think I feel the same way about PHP | ||
a similar way, at least | |||
nothingmuch | there is lots of stuff to sto pthe user from being inspired | ||
php is an attrocity | |||
the only think i liked about php was that open returns a file handle, instead of accepting an uninitialized one as a param | 11:58 | ||
but now we have lexically scoped handles in perl 5 so it doesn't matter | |||
anyway, this discussion is really going nowhere | 11:59 | ||
bottom line is: | |||
sigils won't go | |||
it's not my fault | |||
lypanov | not saying it is | 12:00 | |
gaal | I am! of course it's nothingmuch's fault | ||
lypanov | just feel its very short sighted to not attempt to address these issues while "you" still can | ||
its audreyt's fault. as always ;) | |||
lypanov no longer likes the direction ruby is heading in | |||
lypanov is most impressed by perl6 and pypy | |||
lypanov hates python | |||
so what is my option? ;) | 12:01 | ||
"fix" perl6... | |||
nothingmuch | why don't you like it? | ||
lypanov | perl6 or the direction of ruby? | ||
nothingmuch | (ruby) | ||
lypanov | ah | ||
there are a number of syntax changes that i dislike heavily, feel they are huge regressions | |||
nothingmuch | like? | ||
lypanov | nothingmuch: can't think of specifics, its a feeling | 12:02 | |
nothingmuch | syntax can be anything as long as it isn't taxing | ||
Perl 5's syntax for OO and FP is hard | |||
lypanov | syntax effects me a lot, if it doesn't look pretty then i really don't want to work with it :) | ||
nothingmuch | because it's easier to misbehave than to do the right thing | ||
okay | |||
let's try a few things in ext | |||
lypanov | and python made me just want to cry | ||
nothingmuch | i feel that most of the code i've written in Perl 6 is very beauutiful compared to what I can dish out in Perl 5 | ||
lypanov | (first time i had an indentation related bug i ran screaming) | 12:03 | |
nothingmuch | svn.openfoundry.org/pugs/ext/ | ||
lypanov | most of the code i've written in perl6 is cute | ||
s/writ/seen &/ | |||
nothingmuch | write some then =) | ||
lypanov | waiting on the arrival of a new machine | ||
nothingmuch | something that really made me happy was Class::Event | 12:04 | |
and another thing that was very fun was Getopt::Process | |||
Perl 5 really lacked the umph to make these feel dense and meaningful | |||
wolverian | Class::Event? | 12:05 | |
nothingmuch | oh! collect_arguments should be lexical to parse_arguments | ||
wolverian: yes | |||
it's not in ext | |||
wolverian | ah. | 12:06 | |
nothingmuch | because it makes very very heavy use of roles and mmds | ||
wolverian | is the module name in Getopt::Process a typo btw? | ||
(module Getopt::Proccesor) | |||
wolverian imagines it could be a namespace clash too | |||
nothingmuch | yes, i think it is ;-) | ||
Migo wanted to rename it anyway | |||
to Getopt::Engine | |||
svnbot6 | r9236 | gaal++ | r9257@sike: roo | 2006-03-02 14:01:55 +0200 | 12:07 | |
r9236 | gaal++ | Minor edits to Peek talk. Online version updated. | |||
nothingmuch | svn.openfoundry.org/pugs/ext/ | ||
sorry | |||
damn clipboard | |||
svn.openfoundry.org/pugs/misc/Class.../Events.pm | |||
wolverian | those are long lines | 12:09 | |
anatoly | ugh, I don't know :( | ||
looks too javaish to my taste | |||
nothingmuch | anatoly: interfaces? | ||
gaal | yo tolymoose | ||
anatoly | interfaces and the general verbosity | ||
method get_subscriptions (Class::Events::Publisher $publisher, Class::Publisher::Event $event) | 12:10 | ||
this is not a line I will enjoy writing out | |||
perl5 almost never has lines I don't enjoy writing out | |||
yo gaal | |||
gaal: what time at your place saturday? | |||
lumi | Yo gaal | ||
nothingmuch | anatoly: err, you don't need to =) | ||
get_subscriptions( $thing, $event ); | |||
but that's internal, isn't it? | 12:11 | ||
and interfaces suck | |||
roles are nice because they can actually contain behavior | |||
anatoly | nothingmuch: what do you mean I don't need to? When I use the role? Sure, not the point though. | ||
nothingmuch | oh, yhou mean how iwrote it? | 12:12 | |
you can shorten the class names | |||
and you can not annotate the types if you don't want to | |||
but i have the Ć¼ber power of completion on my side | |||
anatoly | by the way, if I'm in A::B::C::D, why do I have to write A::B::C::E and not some kind of ::..E or whatever? | ||
nothingmuch | yes, there's something like that | ||
i just don't remember how to write that | |||
anatoly | ah, ok :) | ||
nothingmuch | also, please look at the code within | 12:13 | |
lumi | Package names are globally scoped, right? | ||
nothingmuch | the idea of Class::Event's numerous roles is that you can milk performance but also get flexibility | ||
lumi | Like Java and not like Python | ||
nothingmuch | lumi: not necessarily | ||
you can have lexical ones too | |||
they default to global though | |||
gaal | anatoly: not sure about time yet | 12:14 | |
there may be a jazz gig i want to go to afterwards :) | |||
nothingmuch | gaal: which one? | 12:15 | |
gaal | Third World Love | ||
anatoly | gaal: well moose me or something, I'm in Rishon over weekend. | 12:16 | |
gaal | great, will do | ||
nothingmuch | when is it? | ||
gaal | trying to check | 12:17 | |
hmm, 21:30 but it's w/o daniel friedman who I really like | 12:18 | ||
nothingmuch | what date? | 12:19 | |
saturday? | |||
gaal | yeah. next thu, 9/3, he will be there. | ||
www.hagada.org.il/hagada/html/modul...&pid=7 | |||
nothingmuch | whatever happenned to luqui =( | 12:23 | |
12:39
sisi joined
|
|||
sisi | what else is new? :) | 12:50 | |
12:52
Aragone is now known as Arathorn
|
|||
sisi | . o O | 12:53 | |
12:53
sisi left
12:59
elmex joined
|
|||
Arathorn | everything old is new again. | 13:00 | |
elmex is stitting on the GPW | 13:07 | ||
13:08
Draconi1 joined
13:10
Draconi1 left,
Draconi1 joined,
nothingmuch joined
|
|||
Juerd | ntgrl: Write your own grammar, that is sigilless. | 13:10 | |
nothingmuch | no, just derive a grammar | 13:11 | |
== less repeating yourself | |||
13:11
Draconi1 left,
sisi joined
|
|||
integral | except that sigils are stored in the pads, so I have to magic them out of somewhere... | 13:11 | |
Juerd | ntgrl: This is a matter of changing the syntax for "my", and alike declaration keywords, and having them install lvalue subs. | ||
nothingmuch: Same difference. | |||
nothingmuch | integral: what ntgrl wants is to have just scalars | ||
sisi | Ah..."everything changed" | ||
Juerd | sisi: No | ||
integral | nothingmuch: sort of, More like bound values like in haskell really | 13:12 | |
but maybe not *sigh* | |||
sisi | Juerd: oh? :) | ||
integral | ntgrl ::= integral | ||
Juerd | integral: Hey, don't fool us into thinking you're some kind of newbie ;) | ||
13:13
Draconit joined
|
|||
elmex | is there a syntax freeze in perl6 ? | 13:14 | |
Juerd | No | ||
sisi | "No means no"? | ||
13:14
fglock joined
|
|||
Juerd sees audreyt read and edit a talk. Impressive, that speed of reading and typing. | 13:15 | ||
elmex | when is a syntax freeze going to happen? when is the final perl6 interpreter going to be written? | ||
Juerd | elmex: Probably not even then. Why do you ask? | ||
nothingmuch | elmex: christmas | ||
Juerd | elmex: Do you want a freeze? | ||
lypanov | Juerd: have to admit i'd love to be there just to see that :) | ||
Juerd | Someone's whistling here. Very annoying during a talk. | ||
lypanov: Why? Don't you think that if something isn't perfect, and someone has something *better*, we should use the better thing? | 13:16 | ||
lypanov: Don't you think that if ambiguous cases are found, clashing syntax is found, we should be able to fix the problem? | |||
I think a syntax freeze before the release is a bad idea. | |||
Eh, s/before/long before/ | |||
rafl: Don't forget to diff the usb stick against your local old copy. | 13:17 | ||
elmex | ok, then, when will there be a release of the final perl6 compiler (which targets parrot)? | ||
lypanov | Juerd: sorry. "Juerd sees audreyt read and edit a talk. Impressive, that speed of reading and typing." | ||
Juerd | elmex: Christmas | ||
lypanov: Ahhh, okay. | |||
lypanov: Sorry for my misinterpretation. | |||
lypanov | i don't believe there is ever any such thing as a "final interpreter" | ||
and nor do i believe in syntax freezes | |||
;) | |||
rafl | Juerd: I won't. | 13:18 | |
Juerd | elmex: Perl 5 has known a syntax freeze for very long; it hasn't benefitted from that. | ||
elmex: In fact, it pushed innovations like // far, far away. | |||
We still don't have it, while the feature itself has been wished for for over a decade. | |||
(Originally it was written "??", hookhook.) | |||
lypanov | rationals or comments? | ||
oh. i have no idea then? :) | 13:19 | ||
i like the ?? !! syntax btw | |||
Juerd | So do I. | ||
elmex | ah, ok, so there will be finally the real perl6 interpreter.... why took it so long? :) | ||
lypanov | elmex: its Hard (tm) | ||
Juerd | elmex: It's hard to create something that hasn't existed ever before. | ||
fglock | audreyt: re packing iterator_engine to CPAN: how about "Perl6::Grammar", and reuse Parse::RecDescent API? | 13:20 | |
elmex | yes, it is, i agree. but that doesn't explain why the interpreter hasn't been started earlier | ||
Juerd | elmex: There is no programming language that has all these new features | ||
elmex | Juerd: perl5 has at least a part of it | ||
Juerd | elmex: Yes, but we're not trying to re-create Perl 5. Perl 5 already exists, it doesn't need to be created. | 13:21 | |
lypanov | and its not possible to easily add to perl5 | 13:22 | |
Juerd | elmex: Perl 5 has many neat features, but Perl 6 has more. They cannot be integrated into Perl 5, because Perl 5 is very hard to maintain because (lack of) its internal structure. | ||
elmex | yes... Perl6 isn't Perl anymore | ||
rgs | and backward compatibility constraints | ||
Juerd | Also, for a better Perl, we need *fundamental* changes in syntax. | 13:23 | |
lypanov | perl sucks. yay for perl6! :P | ||
elmex | yes, maybe | ||
Juerd | elmex: It depends on your definition of Perl. It still looks and feels like Perl. | ||
elmex: Do you think that Larry Wall's view on the definition of Perl isn't authoritive? | |||
elmex | Juerd: yes, but it is not the successor of Perl5 | ||
rgs | some would say it even smells like perl. | ||
Juerd | He thinks the definition *includes* Perl 6. | ||
elmex | Juerd: no, i don't think that larrys view is the end of all wisdom | ||
Juerd | rgs: Mind if I quote you on that in my lightening talk? :) | ||
rgs | heh | ||
nothingmuch | elmex: look at my compiling perl 6 ttalk | 13:24 | |
Juerd | elmex: But he created both Perl 5 and 6. | ||
rgs | and the previous ones too. | ||
lypanov | and patch! | ||
elmex | Juerd: Perl6 was created by the comunity | ||
lypanov | elmex: perl6 was defined by larry | ||
nothingmuch | nothingmuch.woobling.org/perl6_comp...start.html | ||
note that images willl load very slowly | |||
lypanov | and implemented / refined by the community | ||
nothingmuch | and only then will S5 kick in | ||
Juerd | elmex: Nah, the community will *write* it :) | ||
elmex | lypanov: there were RFC's | ||
Juerd | elmex: Larry is this ship's captain | ||
elmex | Juerd: the ship is traveling very long now.... | 13:25 | |
svnbot6 | r9237 | fglock++ | iterator_engine - added a talk sketch | ||
nothingmuch | elmex: don't take it as "larry is not open to suggestions" | ||
Juerd | elmex: Indeed. | ||
nothingmuch | in fact, i wasted about 4-5 hours of larry's time just in the OSDC/Hackathon | ||
he is a very good listener | 13:26 | ||
lypanov | elmex: /win 5 | ||
elmex | thats great | ||
Juerd | elmex: However, I think it's good to wait and get something that resembles perfection, instead of rushing things and getting something as horrible as the unreadable as Perl 5's source. | ||
lypanov | doh | ||
lypanov kicks irssi | |||
elmex: sorry. ignore that :) | |||
Juerd: i disagree for what its worth | |||
Juerd | elmex: It has taken years, and perhaps it will take a few more. | ||
nothingmuch | lypanov: you can use esc/meta | 13:27 | |
sisi thinks: marriages don't break up on account of infidelity. *^.^* | |||
Juerd | elmex: In the meantime, we have Perl 5. | ||
lypanov: Elaborate | |||
lypanov | nothingmuch: oh. esc-1 etc is a wonderful idea | ||
elmex | Juerd: i've been waiting since 2002, and there is no real spec yet. the synopsis are imho very incomplete and many things are only documented on the mailing list | ||
lypanov | nothingmuch: thanks :) | ||
13:27
sisi left
|
|||
lypanov | elmex: the spec == the test cases | 13:27 | |
elmex | Juerd: yes, but Perl6 does block improvements in Perl5 imho | ||
Juerd | elmex: Audrey et all are working on that. Don't expect things to change extremely quickly. | ||
nothingmuch | elmex: well, we're not going to scrap it | 13:28 | |
elmex | lypanov: great, so i have to crawl through thousand lines of test-code to learn perl6 ? | ||
nothingmuch | this is a volunteer thing | ||
Juerd | elmex: Different people work on Pelr 5. | ||
nothingmuch | nobody tells anyone to work on this and not that | ||
or vice versa | |||
lypanov | elmex: you learn from a spec?! | ||
Juerd | elmex: Perl 6 doesn't block Perl 5 development, it actually improves it at times. | ||
rgs | right ! | ||
Juerd | Perl 5 learns from Perl 6, and gets some of its features. | ||
rgs | like //, switch, ~~, say | ||
elmex | lypanov: yes, partially. i learn mainly from having an interpreter and then i look at the spec and try out | ||
lypanov | elmex: pugs runs now | ||
nothingmuch | // is lovely | 13:29 | |
elmex | ok | ||
lypanov | ?eval 5 | ||
evalbot_9236 | 5 | ||
lypanov | elmex: ^^ see? :P | ||
elmex | perl -e 'print 5' | 13:30 | |
# 5 | |||
lypanov: see? :) | |||
lypanov | no... not really | ||
elmex | lypanov: yes, me too | ||
lypanov | elmex: pugs (one impl of perl6), runs now | ||
elmex: and there is a partial constantly updating spec. and testcases | |||
i also have to admit i'd like a more compact version of the spec | 13:31 | ||
is one available? | |||
nothingmuch | test cases, interpreter, and spec are all complements to each other | ||
none can be good without the other | |||
lypanov | the current stuff is verrrry verbose | ||
lypanov doesn't really like reading | |||
nothingmuch | lypanov: there's a quick ref | ||
lypanov | nothingmuch: ah. neat. uri? | ||
azuroth | am I horribly mistaken in thinking fixity is somehow a synonym for associativity? | ||
lypanov | or in docs/ ? | ||
nothingmuch | lypanov: in docs or something | ||
lypanov | nothingmuch: thx. shall check it out | 13:32 | |
nothingmuch | azuroth: fixity is how manny, where | ||
like, postfix is 'after' | |||
it's always after "one thing" | |||
as with prefix | |||
azuroth | ahh, right | ||
nothingmuch | circumfix is around any number | ||
infix is between two things | |||
postcircumfix is after, and then around some more stuff | |||
lypanov | fixity == arity + associativity? | ||
azuroth | damn. is there a short word for assoc? | ||
nothingmuch | like [ ] is after @array and around the slice | ||
lypanov: you could say that, yes | 13:33 | ||
lypanov | azuroth: assoc? :P | ||
nothingmuch | ass | ||
azuroth | uglyyy :-P | ||
lypanov | hehe | ||
ummmm ass | |||
13:35
Nouk joined
|
|||
elmex | it's just scary that Perl5 grow from a evolutionary process out of perl1 to perl4 and was mainly done by Larry. Perl6 seems to throw away most things from Perl5 and introduce very many new untested concepts in a very short time and throws away the old codebase | 13:35 | |
rgs | nope, it doesn't | 13:36 | |
Juerd | rgs: How does one pronounce your name? | ||
lypanov | elmex: its not a bad thing go occasionally throw away the codebase... | ||
rgs | translators will happen ! | ||
Juerd: I don't know. Spanishish ? | |||
Arathorn | elmex: sounds exciting rather than scary to me :) | 13:37 | |
Juerd | rgs: I can't guess the last part, Suarez | ||
rgs | Juerd: "aar - gee - ess" ? | ||
Juerd | Does that sound like swahres? | ||
rgs | Juerd: soo a ress | ||
Juerd | Ah, thank you | ||
rgs | yes | ||
azuroth | spanishish... sounds an interesting - oil of spaniards? | 13:38 | |
13:38
kolibrie joined
|
|||
Juerd | elmex: What do you mean "untested"? | 13:38 | |
rgs | even *I* pronounce my name differently depending on contexts | ||
elmex | imho the perl5 people should improve the old perl5 interpreter a little bit more and just bump the version to perl6 | ||
Juerd | elmex: Larry *is* actively improving (refactoring) Perl 5! | ||
elmex: Nicholas Clark will integrate his changes back into the main Perl 5. | |||
elmex: This all helps migration to Perl 6. | 13:39 | ||
elmex | Juerd: many concepts were invented before there was Pugs and some concepts aren't implemented yet | ||
Juerd | elmex: Indeed. | ||
elmex: Your point, please? | |||
elmex | Juerd: good question | ||
Juerd | Also, isn't every invention at first untested? | ||
rgs | aren't the specs written before the implementation ? :) | ||
lypanov | Juerd: i think the point is depth vs breadth wise implementation | ||
Juerd | Like, ehm, pseudohashes? Restricted hashes? Formats? All those other things we don't use, but are implemented in Perl 5? | 13:40 | |
lypanov | Juerd: and afaic there is slightly too much depth in perl6 | ||
s/ic/ics/ | |||
elmex | yes, but wouldn't it be better if all these new concepts were integrated in perl5 from the beginning? then they could've been tested when they came up | ||
Juerd | elmex: It's hard for me to understand what you want. A few moments ago, you complained that there was no complete specification, but now you say things should be tested first. | ||
rgs | no, because perl 5 needs to be mostly backwards compatible | ||
Juerd | elmex: Can you explain how these go together? | ||
lypanov | elmex: perl5 is very difficult to extend | 13:41 | |
Juerd | lypanov: There might be. The Plan is to do it Right. | ||
lypanov | elmex: if what you did was the case, it would take /even longer/ | ||
s/did/said/ | |||
Juerd | (See how the uppercase words make things really cute in English, while they just don't even look weird in German? :)) | ||
lypanov | Juerd: hehe | ||
elmex | lypanov: i don't think it would have taken 6 years to have // in perl5 or a 'class' keyword... | 13:42 | |
lypanov | elmex: the perl6 spec is a lot more than jusrt that | ||
s/rt/t/ | |||
rgs | // is in perl 5 right now | ||
Juerd | Because they capitalize every Noun, you cannot use uppercase Letters to indicate something that is cutely official. | ||
elmex | lypanov: yes, the perl6 spec is a big blob | ||
Juerd | elmex: You don't NEED those in Perl 5. | ||
elmex | rgs: yes, after 6 years | 13:43 | |
lypanov | when did pugs start? | ||
lypanov is sure it wasn't six years ago | |||
rgs | one year ago | ||
Juerd | elmex: Why write "class Foo { }" instead of "{ package Foo; }" if they mean exactly the same thing? | ||
The point is that it does something *different* in Perl 6. | |||
lypanov doesn't really care about parrot all that much as he deems it doomed | |||
Juerd | lypanov: One year and one month ago. | ||
lypanov | right | ||
its come very far | 13:44 | ||
rgs jumps off the troll train | |||
lypanov | good idea | ||
bbl | |||
elmex | maybe the only thing that bugs me is that Perl6 is not Perl5+1 | ||
lypanov | everyone hates change, but its pretty much inevitable | 13:45 | |
lypanov personally hates lack of change | |||
azuroth | parrot is doomed? | ||
lypanov | azuroth: yeah | ||
elmex | i don't hate change. perl6 has many great features. | ||
nothingmuch | parrot has had lots of management issues | ||
and I think parrot has been prematurely optimized in ways that are not generally useful enough | |||
azuroth | hmm, ok | ||
nothingmuch | but that doesn't mean it's doomed | ||
people are still participating and helping | 13:46 | ||
nothingmuch is not so quick to mark it off as a dead thing | |||
rgs | it's merely resting !! | ||
lypanov | nothingmuch: its slow. and pretty much pointless | ||
azuroth | :-) | ||
nothingmuch | rgs: when *I* made that joke i was beaten up | 13:47 | |
13:47
haggai_e joined
|
|||
rgs runs and hides | 13:47 | ||
lypanov | ;) | ||
nothingmuch | rgs: you're supposed to give lypanov a voucher for your brother's fish store instead | ||
and instead of running off and hiding, running off to become a lumberjack | 13:48 | ||
lumi | Pet store, surely? | ||
13:48
haggai_e left,
haggai_e joined
|
|||
nothingmuch | i thiink it was more specialized but can't remember.... googling | 13:48 | |
lypanov | que? :P | ||
lumi | His brother's pet store in Bolton | ||
nothingmuch | ah | 13:49 | |
lypanov: www.mtholyoke.edu/~ebarnes/python/d...parrot.htm | |||
lypanov | ummm | ||
lypanov sucks at quotes | |||
gaal | lypanov: I wouldn't say it's slow: | ||
# www.nntp.perl.org/group/perl.perl6....nals/32958 | |||
lypanov | lumi: second you said "bolton" i knew something was going on ;) | ||
gaal: ackermans makes no difference in the real world | 13:50 | ||
gaal: real world optimisations == high level things such as malloc coaslescing | |||
gaal: sorry but parrot is just bullshit | |||
i agree entirely with nothingmuch in "in ways that are not generally useful enough" | 13:51 | ||
and yes. its true, i can not spell coacleslssing | |||
Juerd | Hm, would it be safe to mention that I put my talk in the Pugs repository? ;) | ||
lypanov flames Juerd | |||
Juerd | (It might be construed as "If you really don't like my talk, go ahead, and change it") | ||
nothingmuch | lypanov: did yyou see the perl 6 compilation talk? | ||
Juerd | Ah well. We'll see. | ||
nothingmuch | i'm very very concerned with Perl 6 being fast | 13:52 | |
and most of the ways I want to make sure it's fast have nothing to do with parrot | |||
lypanov | nothingmuch: no. any urls? | ||
nothingmuch | nothingmuch.woobling.org/perl6_comp...start.html | ||
images will load slowly | |||
lypanov reads | |||
nothingmuch | but when they're done S5 will kick in | ||
lypanov | k | ||
ummmfunkycheese | 13:53 | ||
elmex | yaho, audrey is having her talk now | ||
Juerd | Visual Basic Rocks. | 13:54 | |
elmex | yes | ||
azuroth | for real? | ||
Juerd | gwbasic++ | ||
:) | |||
lypanov | lol | ||
Juerd | # Audrey | ||
# Larry | |||
# me | |||
rafl | # me | 13:55 | |
Juerd | gwbasic++ then | ||
elmex | elmex-- | ||
Juerd | # toothpaste | ||
lypanov | Juerd: how come? ;) | ||
anatoly | gwbasic doesn't really ++ | ||
lypanov | s5 kicked in! yay! | ||
anatoly | but audrey's talk is cute | ||
elmex | VB was one of my first languages too | 13:56 | |
nothingmuch | anatoly: but it seems that vb 9 *does* rock ;-) | ||
anatoly | nothingmuch: in a funny way, yes | 13:57 | |
Arathorn wonders if audrey's trying to get hired by M$ ;) | |||
anatoly | vb is one of those languages which either "no one uses" or "everyone uses" depending on your perspective | 13:58 | |
Juerd | She already is | ||
;) | |||
Arathorn | ah, that makes more sense, then :) | ||
Juerd | Not really | ||
But there is another Audrey Tang who is. | |||
anatoly | but then again, so is perl, so we shouldn't be snobbish about vb, I guess. | ||
Juerd | pugs.blogs.com/audrey/2005/12/the_o...audre.html | 13:59 | |
lypanov | umm | ||
nothingmuch: s5 is lame | |||
nothingmuch | lypanov: i can generate plain spork | ||
i just like working with it better since it's one file instead of N per slide | |||
ughhhhhhhhhhhhhhhhhhhhh | 14:00 | ||
Juerd | audreyt++ # Good speaker | ||
nothingmuch | there's a "python rocks, perl sucks, you shouldn't make perl 6 it hurts perl 5" thread on the OSDC list | ||
why do people go that way so easily? | 14:01 | ||
what point are they fucking trying to prove? | |||
it's so pathetic | |||
webmind | nothingmuch, url? :) | ||
nothingmuch | webmind: for what? | ||
webmind | of the archive? | ||
nothingmuch | ah | ||
err | |||
it's not worth it | |||
elmex | elmex-- | ||
nothingmuch | you can google if you like | ||
webmind | ok | ||
nothingmuch | osdc-discuss is the list | ||
lumi | elmex: Keep that up, there'll be nothing left of you | ||
nothingmuch | the thread is a subthread of "feedbacks from the conference" | 14:02 | |
webmind | ok, thanks :) | ||
anatoly | nothingmuch: i can't believe you put ninjas and pirates in your talk | ||
nothingmuch | starting with a reply by Roman Yakovenko to Dov Levenglick | ||
anatoly: =D | |||
webmind | something to fight the boredom ;) | ||
anatoly | nothingmuch: you're a psycho! but ++ :) | ||
lypanov | nothingmuch: anything but this. is it xul or something? | 14:03 | |
svnbot6 | r9238 | juerd++ | Some more slides | ||
nothingmuch | lypanov: javascript + css | ||
i'll make it plain html | 14:04 | ||
lypanov | nothingmuch: either firefox or s5 is damn lame | ||
nothingmuch: it keeps on reverting to unstyled when i open a new tab | |||
nothingmuch | uh | ||
odd | |||
complain to eric s. raymond, he wrote the damn thing | |||
lypanov | lol | ||
i just pressed a link | |||
anatoly | haha | ||
nothingmuch | i must admit i don't optimize for portability when doing that stuff | ||
lypanov | and ... dum dum dum. firefox crashed | ||
anatoly | that explains a few things | ||
what's the thing that audreyt uses for her talks? use that :) it's also one file | 14:05 | ||
gaal | anatoly: nothingmuch is a DrMcNinja really | ||
lypanov | anatoly: only works on firefox. also lame | ||
nothingmuch | anatoly: takahashi xul | ||
anatoly | lypanov: is not lame | ||
lypanov | anatoly: if it runs only on firefox its lame | 14:06 | |
nothingmuch: yeah... i could really do with the html version | |||
nothingmuch: ff just died again | |||
anatoly | lypanov: anything that lets you write the talk as one text file so easily and fast rocks. bah about firefox, it's for displaying at the conference, who cares. | ||
lypanov | anatoly: then don't public the damn things on a public site... | ||
nothingmuch | haha | ||
lypanov | and why not use powerpoint? | 14:07 | |
its /more/ accesible than this shit | |||
nothingmuch | i don't have ppt | ||
lypanov | sorry. but meh | ||
nothingmuch | and s5 is accessible for *me* | ||
anatoly | lypanov: because powerpoint blows | ||
nothingmuch | again, i was not optimizing for portability | ||
but i *can* | |||
give me 2 mins | |||
anatoly | lypanov: powerpoint eats your brain | ||
lypanov | nothingmuch: was just bitching at anatoly not you, sorry | ||
anatoly: then buy a mac and use keynote :) | 14:08 | ||
anatoly | lypanov: you have ff already. it crashes at nm's spork but won't at audreyt's takahashi, so what's your problem? :) | ||
lypanov | anatoly: i don't have ff on my osx box | ||
nothingmuch | lypanov: actually, not spork | ||
s5 | |||
spork is just kwid -> slides | |||
and it defaults to plain html | |||
well, kwiki | |||
but we use spork::formatter::kwid nowadays | 14:09 | ||
lypanov | so many funny cute names! | ||
nothingmuch | okay | ||
yeah, that's ingy for you | |||
nothingmuch.woobling.org/perl6_comp/slides/ | |||
reload that | |||
it's in hotpink | |||
because that's the default | |||
;-) | |||
lypanov | yay hot pink! | ||
nothingmuch | gaal has a nice scheme for plain spork, but i don't know it | 14:10 | |
gaal | quite simple really | ||
nothingmuch | also, wrt ff/s5 borkedage - it's known | ||
that's why my darcs talk sucked | |||
because i had to use ff unexpectedly | |||
but it didn't crash, it was just very slow | |||
lypanov | same thing :) | ||
when i can read 10x faster than my computer can display. i begin to worry ;) | 14:11 | ||
nothingmuch | the old html is in s5.html | ||
gaal | for reference: | ||
nothingmuch | hehe | ||
gaal | banner_bgcolor: lightblue | ||
nothingmuch | i use it in safari and it works very well | ||
lypanov | okay | ||
nothingmuch | so there | ||
=) | |||
lypanov | *opens his mac up* | ||
nothingmuch | no need | ||
s5 is no longer the default for that URL | |||
lypanov | i just got s5 again, maybe cached | 14:12 | |
nothingmuch | think i'll delete index.html | ||
there is start.html which is plain spork | |||
and s5.html which is s5 | |||
lypanov | nothingmuch: thx. works absolutely perfectly in safari | ||
nothingmuch | =) | 14:13 | |
again, i'm optimizing for my comfort as I give the talk | |||
and write it | |||
lypanov nods | |||
azuroth | nothingmuch++ # like the slides | ||
nothingmuch | if we could have Spork::Keynote i'd be even happier | ||
because Keynote has mad-presenter-skill-toolz | |||
like a timer, and the next slide, and whatnot | |||
but i don't work well with graphical tools for this stuff | |||
just for real graphics | 14:14 | ||
14:14
haggai_e left,
feng123 joined
|
|||
fglock | can I use 'return' inside a BEGIN block? | 14:17 | |
nothingmuch | fglock: you should be able to, yes | ||
when a begin block is used in rvalue context then it's return value is serialized and reused as a constant | 14:18 | ||
e.g. 'print BEGIN { localtime }' | |||
although, wait | |||
return might not work | |||
because BEGIN isn't a sub | |||
but i guess that ought to be fixed? | |||
fglock | nothingmuch: I read it is a sub | ||
nothingmuch | since there is no other possible use for return at begin time, not in a macro? | ||
fglock | nothingmuch: I need to eval a string that has a BEGIN block, and I don't want BEGIN to be executed twice | 14:19 | |
nothingmuch | oh wait, is this perl 5 or perl 6? | ||
14:20
Draconit joined
|
|||
fglock | it's p6 compiled to p5, so it's p5 | 14:20 | |
14:20
Draconit left
|
|||
nothingmuch | ah | 14:20 | |
fglock | I need to evaluate a BEGIN block during parse, and then again when executing | ||
nothingmuch | in that case I don't think that's specccced | ||
fglock | nothingmuch: it works: | 14:22 | |
perl -e ' BEGIN { print "begin\n"; return; print "not\n"; } ' | |||
nothingmuch | yay! | ||
14:23
Draconit joined
|
|||
Juerd just had his lightening talk | 14:23 | ||
And I invited people to come here (just in case there's a big stampede... ;)) | 14:24 | ||
nothingmuch | yay | ||
we need to have a lightning talk about TTH btw | |||
welcome back, Draconit | 14:25 | ||
Juerd | What exactly is TTH? | ||
integral | that'd be why it needs a lightning talk :-P | ||
Juerd | :) | ||
So what is it? | 14:26 | ||
Heh, rafl just asked me "What's TTH" :) | |||
So now two people want to know :) | |||
nothingmuch | Test::TAP::Harness | 14:27 | |
Juerd | Ah | ||
nothingmuch | basically say: | ||
hi, i'm X | |||
Juerd | Different from T::H? | ||
nothingmuch | at pugs we have many many unit tests | ||
sorry | |||
Test::TAP::HTMLMatrix | |||
Juerd | Ahh | ||
nothingmuch | i always confuse the name | ||
find t/ | |||
find t/ | wc -l | |||
Juerd | Right. | ||
nothingmuch | then say: | ||
so we wrote an HTML visualizer | |||
show the lovely output | |||
Juerd | I actually did a count yesterday, 35000+ (see my lightening talk, p6myths2.html) | 14:28 | |
nothingmuch | and have another 2 mins about how to actually run it | ||
Juerd | Right | ||
14:28
wilx`` is now known as wilx
|
|||
Juerd | Get over here, and have it :) | 14:28 | |
14:29
samuel joined
|
|||
gaal | nothingmuch: I think TimToady just mentioned BEGIN was, in fact, a sub on p6-l just the other day | 14:33 | |
or here, or somewhere | |||
Draconit | ×× ×× ×ש××Ŗ× ×©××ש×× ×××× ××××× ×©× ×× ×”×Ŗ× ××¤× | 14:34 | |
nothingmuch | yay | 14:35 | |
Draconit | sorry dont know how to say that in english | ||
nothingmuch | Draconit: well, we are very sensitive people | ||
and we get a little line saying 'Draconit ..... has joined #perl6' whenever you joined | |||
gaal | Juerd: there are another 8-odd k in ext/ | ||
Draconit | yes, and clorfall too! | ||
sorry for my spelling.. | 14:36 | ||
14:41
nnunley joined
14:45
fglock left
|
|||
kolibrie | I did not see TimToady in AUTHORS. Who is he? | 14:46 | |
integral | you've never met him on perlmonks? | 14:47 | |
gaal | he's someone who puts moose in his talks. gotta love him! | ||
kolibrie has never been to perlmonks | |||
azuroth | I've heard he can write an IRC client in less than ten characters | 14:48 | |
gaal | kolibrie: look at all his replies here: perlmonks.org/?node=perl+oddities&a...ton=Search | ||
GeJ | cat /dev/urandom | perl <-- more than 10 characters | 14:49 | |
gaal | useless use of cat! | 14:50 | |
Juerd | rafl: Hm | 14:51 | |
GeJ | yes... realized that just after typing <Enter> | ||
kolibrie | gaal: I still haven't solved the riddle | 14:53 | |
Arathorn blames CPM | 14:54 | ||
where you had to TYPE FOO.DOC | MORE to paginate it | |||
iirc | |||
hence not useless abuse of s/cat/type/ | |||
Arathorn mumbles | |||
kolibrie: if you want the riddle spoilt: pugs.blogs.com/pugs/2006/02/hackathonil_12_.html | 14:55 | ||
kolibrie | gaal: by the way, I got a little 'hello world' parsec parser working, but don't think I quite understand the AST definition syntax | ||
Arathorn: thanks | 14:56 | ||
kolibrie almost wanted to guess that, but knowledge generally serves me better than my guesses | 14:57 | ||
gaal | kolibrie: ooh I need to thank you again BTW because a lot of what we talked about made it into my talk | ||
kolibrie | gaal: you're welcome - it was mutually beneficial | 14:58 | |
14:59
Draconi1 joined
|
|||
kolibrie | gaal: do you have time a little later today to help me comprehend a little more? | 14:59 | |
gaal | ignoring what AST means for a moment, look at: perlcabal.org/~gaal/peek/slide17b.html#end | ||
how about now? :) | |||
and perlcabal.org/~gaal/peek/slide19.html | |||
kolibrie | gaal: have a half hour meeting starting seconds ago | 15:00 | |
but after that is fine | |||
gaal | ok | ||
15:02
Draconit_ joined
|
|||
Draconit_ | i hate gaim | 15:03 | |
it is evil | |||
when u r not a geek | |||
anatoly | don't use gaim for irc | 15:04 | |
it's ok for im i think | |||
azuroth | I don't particularly mind it for IRC.. | ||
lypanov | colloquy!!!! | ||
Draconit_ | it has mood swings | ||
lumi | Sadly, there's no Colloquy or Adium for [wl]in | 15:05 | |
Draconit_ | whats colloquy? | ||
azuroth | not for win or lin? what is it on, then? | 15:06 | |
lumi | Mac OS X | ||
Which is a BSD, of course | |||
azuroth | oh, heh, whoops | ||
integral | irssi is pretty standard for *nix | ||
lypanov admits to being in irssi right now | |||
lumi | aol | 15:07 | |
integral | gaal: you've got a missing return on slide23a before the Syn | 15:08 | |
gaal | integral: nope, look at the soource | 15:09 | |
oh wait no | 15:10 | ||
you're right | |||
nice catch :) | |||
integral | np | ||
gaal | that's what I get for rhetorical simplifications (it uses a trivial helper retSyn in the real source) | 15:11 | |
integral | I wish the source wouldn't use things like retSyn sometimes. With return $ Syn, everybody knows what return does | 15:12 | |
gaal | it is kind of a trivial function, yes | ||
anyone know what might start making vim look for X all the time? it used to work fine, but now I always need to vim -X to avoid sloooow loads | 15:14 | ||
fixed | |||
svnbot6 | r9239 | gaal++ | r9261@sike: roo | 2006-03-02 17:11:16 +0200 | 15:15 | |
r9239 | gaal++ | * fix a missing `return`. Reported by integral++. | |||
Juerd | rafl: jitcrunch.cafepress.com/jitcrunch.a...bnQvZ2xvYm | ||
gaal | yikes | ||
Juerd | ;) | ||
xrl.us/j9rm | |||
rafl | Juerd: It incomplete | 15:16 | |
Juerd | Your sentence also incomplete, it verbless. | ||
(Hi, Leo :P) | 15:27 | ||
:) | 15:28 | ||
LeTo | *g* | ||
Juerd | rafl: gather { ...; take $something; ... } | 15:30 | |
Where $something is in list context | |||
azuroth | gee. he does seem to have broken english. I'd never really noticed, or it's just worse than usual | ||
Juerd | @foo = gather { for @numbers { take $_ + rand() } }; | 15:31 | |
azuroth: Who be he? | |||
azuroth | err, doesn't matter :-) | ||
Juerd | I'm sure it doesn't, but I want to know ;) | 15:32 | |
azuroth | when you said "hi, leo" up there I thought you were referring to leopold, so I backlogged #parrot and noticed he was talking noticably foreign-english | 15:34 | |
svnbot6 | r9240 | bsmith++ | Factored out the localisation of the environment from ruleBlockBody. | ||
Odin- | Juerd: You want to end like the cat? | ||
15:34
bd_ joined
|
|||
Juerd | Odin-: ...cat? :) | 15:36 | |
azuroth: I see :) | |||
Odin- | Juerd: Yeah, the one that got killed by curiousity. :) | 15:37 | |
15:37
justatheory joined
|
|||
rafl | Juerd: That was caused by the us_intl layout. | 15:37 | |
Juerd | Odin-: I'm not curious, I just want to know everything. | ||
rafl: You and your silly umlauts | |||
Sorry, *U*mlauts. | |||
Odin- | Juerd: I think one is the definition of the other... :p | ||
Juerd | Odin-: Nahhh | ||
Odin- | Ć¼mlĆ¤Ć¼ts! :p | ||
Juerd | ?ml??ts? | 15:38 | |
rafl | Juerd: They are nice to have in german presentations. | ||
Juerd | Ć¼mlƤs | ||
Hm | |||
rafl: Disagreed. | |||
kolibrie | gaal: so, the 'data' block is very concise. Can we go over that line-by-line | ||
integral | argh, why does the pod parser need to call ruleStatementList?! | 15:39 | |
Juerd | Why is anything that has to do with perl called xxxxXxxxxxxxxXxxxx? | 15:40 | |
kolibrie | Juerd++ | ||
gaal | kolibrie: sure | 15:41 | |
kolibrie listens | 15:42 | ||
gaal | look at both those slides... Exp is the name for the entire data type, each variant is one of the possible types in an actual box | ||
it's a *little* like inheritance, but not really | 15:43 | ||
kolibrie | so the AST Syn 'if' matches the line: Syntax String [Exp] | ||
gaal | when you're talking in general, an AST is a tree of Exps | ||
but each Exp needs to be of a particular variant | 15:44 | ||
you can have functions that demand one variant, or you can have functions that are more general | |||
the slide with the long names is just for pedagogical purposes :) | 15:45 | ||
kolibrie wants to see how the data definition yields a tree, but does not see it | |||
gaal | the real code defines Syn String [Exp] as one variant | ||
and "Syn" is called a "constructor" because it's one of the various ways to construct an Exp | 15:46 | ||
:t Syn | |||
Syn :: String -> [Exp] -> Exp | |||
this means, that in your code you can have Syn "for" [body] | |||
and that returns an Exp (that is of the Syn variant), whose String element is "for" | 15:47 | ||
kolibrie | what are :: and -> ? | ||
gaal | that's haskell typing syntax | ||
:: reads "has the type" | 15:48 | ||
kolibrie | so Syn has the type String | ||
gaal | the type String -> [Exp] -> Exp | ||
Juerd | Does that mean it turns a string into a list of exp, and that into an exp? | ||
gaal | which means that if you give it a String and an array of Exp, you get an Exp | 15:49 | |
Juerd | Oh, almost | ||
kolibrie | why do they both use an -> then? | ||
gaal | when coming from a non-functional point of view, read type signatures this way: | ||
a -> b -> c -> d -> e | |||
function taking a b c d and yielding e | 15:50 | ||
but of course there's a trick: | |||
Juerd | Hm | ||
Multiple arguments? | |||
gaal | if you call this function with fewer args than it "needs", it doesn't blow up | ||
Juerd | Why not a, b, c, d -> e or something like that? | 15:51 | |
gaal | it returns a function waiting on the rest of the arguments! | ||
this is called autocurrying | |||
so for example: | |||
(+) 1 5 | |||
"add 1 and five" | |||
(+) :: Int -> Int -> Int | |||
lumi | Read it: a -> (b -> (c -> (d -> e))) | ||
gaal | but if I say | 15:52 | |
(+) 1 | |||
I get back a function | |||
azuroth is impressed. looks like I have a parser that supports variable associativity and precedence in 40 lines | |||
gaal | its type is Int -> Int | ||
and I can apply that function to an int, and get.. another int, one higher. | |||
(+) 1 is "the function that adds one to its argument" | 15:53 | ||
kolibrie | so any number you pass it will have one added to it and be returned | ||
gaal | this is also known as partial application, or sometimes, a section. | ||
you can give this function a name, too: | |||
let inc = (+) 1 | |||
you can also write this | |||
let inc = (+1) | |||
lumi | gaal: section is the name for the (+ 1) syntax, I think | 15:54 | |
kolibrie | do all haskell functions autocurry? | ||
gaal | lumi: I think you're right. | ||
15:54
vel joined
|
|||
gaal | kolibrie: yes. | 15:54 | |
kolibrie | ok | ||
gaal | in fact, all functions in haskell only take one arguemnt! | ||
so when you see "f 1 2 3 4" | |||
azuroth | and sections can let you curry the second arg, instead of the first | ||
gaal | it's like saying | 15:55 | |
((((f 1) 2) 3) 4) | |||
(well, they all take one argument except for those that take one.) | 15:56 | ||
lumi | Like (** 2) is raise-to-the-power-of-two, and (2 **) is raise-two-to-the-nth-power | ||
gaal | so how is Exp a tree? look at the slide with the graphic again | ||
kolibrie looks | |||
gaal | the node for Syn, for example, had a name to it, and also an array of Exps | ||
so for example the "if" node has two or three children | 15:57 | ||
Syn "if" [condition, truecase, elsecase] | |||
kolibrie | ok | ||
gaal | The node for function application is defined as | 15:58 | |
15:58
TMTOWTDIt joined
|
|||
gaal | App Exp (Maybe Exp) [Exp] | 15:58 | |
that means it has (1) an Exp representing the function to be called | |||
kolibrie | so condition = 42, truecase = { say "hello" }, elsecase = { say "oh no!" } | 15:59 | |
gaal | (2) an optional invocant, defined only in method calls | ||
(3) an argument list | |||
exactly | |||
more precisely, condition == Val (VInt 42) | |||
because the condition must be an Exp also, not a haskell native type | 16:00 | ||
you can see that in the graphic: | |||
under the if there's an extra Val box, not immediately 42 | |||
and note that Val is one of the variants of Exp | |||
kolibrie | and so the condition, being an Int, uses line: Value Val | ||
gaal | yeah. of course, it could have been a much more complex condition | 16:01 | |
for example, an equality test | |||
42 == 42 | |||
which in Perl really means &infix:<==>(42, 42) | |||
that is, a function application | 16:02 | ||
in that case, the condition would be replaced by a subtree which was a little more complex: | |||
App (Val (VStr "&infix:<==>")) Nothing [Val (VInt 42), Val (VInt 42)] | 16:03 | ||
see if you can mentally parse that | |||
kolibrie concentrates really hard | |||
gaal | you know that App A B C | 16:04 | |
start by distinguishing A, B, and C | 16:05 | ||
kolibrie | A = (Val (VStr "&infix:<==>")) | ||
B = Nothing | |||
C = [Val (VInt 42), Val (VInt 42)] | |||
gaal | exactly | ||
kolibrie | but I forgot what A B and C are | 16:06 | |
B is invocant? | |||
gaal | then look at the data definition again | ||
oh, in terms of what they mean | |||
yes | |||
that can use a little commenting :-) | |||
A == Exp evaluating to whatever function we're invocing | 16:07 | ||
B == invocant, maybe | |||
C == argument list | 16:08 | ||
*invoking | |||
now, it may be the case that the expression resulting in the condition is even more complex | |||
kolibrie | wait | 16:09 | |
gaal | if 42 == get_answer() { say "..." } | ||
kolibrie | so for that line, the function we call is (Val (VStr "&infix:<==>")) | ||
there is no invocant | |||
gaal | yes | ||
right | |||
kolibrie | and we have been given two arguments | ||
or a list with two elements as our argument | 16:10 | ||
gaal | yeah. it's somebody else's job to check that == really wants two args. | ||
yes | |||
kolibrie | ok, /me is ready to continue | ||
gaal | cool. have a pugs handy? | 16:11 | |
kolibrie | yes | ||
gaal | run it with nothing on the command line | ||
kolibrie | ready | ||
gaal | and write ":d 42 == 42" | ||
then ":D 42 == 42" | |||
the first one is a little abbreviated | 16:12 | ||
the second is actual runnable haskell code | |||
kolibrie | nifty | ||
gaal | (which also contains annotations, like in the slide after the graphic we've been looking at) | ||
kolibrie | so, I see the stuff we were just talking about at the end of the second one | 16:13 | |
but a lot of stuff at the front I don't understand | |||
gaal | there are other representations for this AST, I think we saw the YAML one together last time we talked, no? | ||
kolibrie | yes | 16:14 | |
gaal | yeah, that stuff is Ann nodes, which add more info about parts of the tree | ||
mainly position | |||
so that if there's an error message, it knows to tell the user where the error was | |||
MkPos "<interactive>" 1 2 1 8 | |||
that means "in the interactive pugs, from line 1 col 2 to line 1 column 8" | 16:15 | ||
kolibrie | ok | ||
gaal | it also happens to be parsed as a bunch of statements, and there's a spurious Noop in there, but you can ignore that | 16:16 | |
kolibrie | on some of those lines in the data definition, there a more pieces, and some have less | ||
gaal | yes; but haskell doesn't get confused because for each type there is a precise number of pieces. | 16:17 | |
kolibrie | and those types are all defined somewhere else | ||
gaal | yes, learning to find them quickly takes a bit of getting used to | 16:18 | |
if you know the general data type name (like Exp), you can grep around for /^data Exp/ | |||
kolibrie | and before this parser is run, strings have already been converted into tokens by something else | 16:19 | |
gaal | but if you didn't know that Syn belonged to Exp, you may have had a little harder time finding that | ||
I don't have a great solution to that | |||
but when you see this kind of thing, start from the beginning | |||
in this case, you see Stmts Noop (...) | 16:20 | ||
we happen to know that Stmts is a constructor in Exp | |||
Stmts :: Exp -> Exp -> Exp | |||
that is: | |||
it takes Noop and another (long!) Exp, and together they are one Exp of variant Stmts | 16:21 | ||
if you have a Perl block with some stuff: | |||
{ A; B; C; } | |||
then the statements inside the block can be arranged to look like Stmts A (Stmts B (Stmts C Noop)) | 16:22 | ||
kolibrie | Stmts has the type Exp -> Exp -> Exp (or, it takes two Exps and returns an Exp) | ||
gaal | yes. | ||
integral | do I need to do anything to add a new .hs file to the build? | 16:23 | |
gaal | this isn't really important, except that it provides us with a way to talk aobut a bunch of statements together. | ||
integral: add it to Pugs.cabal.in | |||
integral | ah! | ||
gaal | and to the clean directive in Makefile.PL | ||
the second bit may not be needed | 16:24 | ||
integral | ack! why? Makefile.PL already uses glob to *search* for .hs files automatically | ||
gaal | integral: why what, why can't this only be defined in one place? I don't know the good answer to it, but I do see why cabal wants to know about files | 16:25 | |
integral | well it's actually wanted to know module names, so I guess it's slightly different :-/ | 16:26 | |
*wanting | |||
gaal | we can probably engineer things so as this is more automatic, but that'd add some more complexity to our glorious build system | ||
commits welcome, in other words :) | 16:27 | ||
integral | I hope that "glorious" was sarcastic ;-) | ||
gaal | kolibrie: so, have things started to sink in? | ||
integral: sarcastic? well, we do use Haskell during build... | 16:28 | ||
kolibrie | gaal: somewhat. I'm going to paste an example | 16:29 | |
pasteling | "kolibrie" at 66.239.158.2 pasted "gaal: this tokenizes, but how do I define what a sentence must contain" (47 lines, 1K) at sial.org/pbot/16114 | 16:30 | |
kolibrie | I got that from an example, and don't really understand parseToken | 16:31 | |
16:33
Draconit_ joined
|
|||
mauke | do you know choice? | 16:33 | |
gaal | let me rewrite it in hopefully more readable form | ||
kolibrie | choice is like alternation, I think | 16:34 | |
16:34
kulp joined
|
|||
mauke | yeah, choice [a, b, c] is a <|> b <|> c | 16:34 | |
do you know >>=? | |||
kolibrie | no | ||
mauke | ah, that's the problem | 16:35 | |
azuroth | not quite related, but how does <- work? it seems like magic | ||
integral | mauke: no, it's mzero <|> a <|> b <|> c, it foldls with mzero, not foldl1 | ||
mauke | d'oh | ||
azuroth: you mean in do blocks? | 16:36 | ||
azuroth | yeah | ||
mauke | m >>= \x -> y is the same as do { x <- m; y } | ||
<- is syntactic sugar for >>= | |||
kolibrie | ok, that almost makes sense | 16:37 | |
kolibrie let's it sink in | |||
azuroth | ohh! I thought the ; was, for some reason | ||
mauke | (>>=) :: (Monad m) => m a -> (a -> m b) -> m b | 16:38 | |
gaal | don't worry about that monadic stuff yet :) | ||
kolibrie | hmm, don't know => either | 16:39 | |
mauke | => is special syntax in type declarations | ||
the things before it are class constraints | 16:40 | ||
in this case it says m must be an instance of class Monad | |||
in our example it's like (>>=) :: Parser a -> (a -> Parser b) -> Parser b | 16:41 | ||
gaal | that's probably a mouthful right now | ||
kolibrie | so it could also read: (>>=) :: m a -> (a -> m b) -> m b | ||
mauke | p >>= f runs the parser p, calls f with the result, then runs the resulting parser | ||
gaal | consider parseToken to mean something like | 16:42 | |
parseToken = choice [ A, B, C, D, E ] | |||
16:42
kulp left
|
|||
gaal | where the return value of each of these is what's on the right of the >> or >>= | 16:42 | |
this example is a little golfy. | 16:43 | ||
kolibrie | so parseToken defines which subparsers to run on the input | ||
and each subparser tokenizes what it can | |||
gaal | kolibrie: they are tried in order, and the parses backtracks when one fails | ||
in Pugs style, that would have been | |||
parseToken = choice [ ruleSpaces, ruleEnding, ruleName, ruleWord, ruleChar ] | 16:44 | ||
mauke | huhu, fmap ((: []) . TokenEnding) ending | ||
azuroth | what does { e <- getInt; f <- getInt; return (e - f)} monadify to? {getInt >>= \e -> (getInt >>= \f -> return (e - f))} or something similarly crazy? | ||
mauke | azuroth: no { } | ||
gaal | and ruleSpaces woudl be | ||
16:45
Nouk joined
|
|||
azuroth | and no return? | 16:45 | |
mauke | return stays, it's just a function | ||
gaal | ruleSpaces = do | ||
many1 space | |||
return [] | |||
mauke | getInt >>= \e -> getInt >>= \f -> return (e - f) -- works | ||
gaal | ruleEnding = do | ||
s <- ending | |||
return [TokenEnding s] | |||
ruleComma = do | 16:46 | ||
char ',' | |||
return [TokenComma] | |||
that's hopefully clearer | |||
take ruleComma | |||
the line char ',' is a sort of an assertion | 16:47 | ||
if it fails, so does ruleComma | |||
that behaves like throwing an exception | |||
azuroth | cool, thanks mauke! it makes much more sense now | ||
kolibrie | gaal: so I could replace me parseToken with those definitions | ||
gaal | yes | 16:48 | |
svnbot6 | r9241 | bsmith++ | Factored out inline documentation from Pugs.Parser to Pugs.Parser.Doc. | ||
r9241 | bsmith++ | Had to leave ruleDocBlock in Pugs.Parser for the moment. | |||
gaal | ooh integral++ | ||
mauke | a >> b = a >>= \_ -> b | ||
integral | gaal: that was the easy part, now to figure out ruleDocBlock and why it needs to parse statement lists :) | ||
kolibrie | and then to make the parser fail if a sentence is not correct, do I change the definition of the new parseToken? | 16:49 | |
gaal | kolibrie: what does a parser do now if a sentence is incorrect? | 16:51 | |
integral | *argh* I see why it's so annoying. it's the silly recursive way ruleStatementList works :-/ | ||
kolibrie | gaal: right now it tokenizes anything that matches a subparser | 16:52 | |
I want it to fail if no ending punctuation, for instance | |||
gaal | oops, I have a "ride" home | 16:53 | |
kolibrie: add assertions | |||
in this case, it looks like you want choice [ ruleEndOfInput, ruleEndOfSentence ] | 16:54 | ||
but i gotta go :) | |||
kolibrie | gaal: thanks so much! | ||
gaal | integral: worst case pass ruleStatement as an implicit param. | ||
or an explicit one :) | 16:55 | ||
& | |||
integral | best case: rewrite ruleStatementList to use these higher-order functions we keep talking about :-P | ||
16:56
fglock joined
|
|||
svnbot6 | r9242 | fglock++ | - iterator_engine_p6grammar.pl - precompiled Prelude! | 16:56 | |
r9242 | fglock++ | loads in less than 1 second | |||
integral | *sigh* it's so nice how emptyExp and Noop are the same thing, but it can be confusing to read | 16:59 | |
svnbot6 | r9243 | fglock++ | - iterator_engine_p6prelude.p6 - this is the Prelude file | 17:02 | |
azuroth | night, all | 17:03 | |
fglock | iterator_engine now has dynamic grammar - iterator_engine_p6prelude.p6 defines pod, and then immediately uses pod for documentation | 17:04 | |
svnbot6 | r9244 | fglock++ | iterator_engine - cosmetic fix | ||
r9245 | fglock++ | - iterator_engine_p6grammar.pl promoted to p6compiler.pl | 17:07 | ||
Juerd | rafl: When could you re-enable the automatic installation of Pugs on feather? | 17:14 | |
rafl: beep | |||
rafl | Juerd: Will do so. | 17:22 | |
17:31
chris2 joined
|
|||
svnbot6 | r9246 | fglock++ | - iterator_engine - p6compiler can be invoked with: | 17:37 | |
r9246 | fglock++ | perl iterator_engine_p6compiler.pl iterator_engine_p6sample.p6 | |||
17:42
putter joined,
Shabble joined
|
|||
putter | audreyt, gaal: so is it time, and still the plan, to move functionality from Prim.hs to Prelude.pm, now that its compile-duration issues have been fixed? | 17:43 | |
fglock: ping? | |||
17:44
szabgab left
17:45
macli joined
|
|||
putter | TimToady: re would a patch help, I don't think so. I'm at this moment trying to work out the design constraint space - more in a bit. | 17:46 | |
gaal | putter: we can definitely start, but there's a small matter of packaging to perform before pulling the switch | 17:54 | |
precompilation works but is not engineered yet | 17:55 | ||
that is to say, it has a good design but that isn't implemented yet | |||
17:57
calanya joined
|
|||
wolverian | typo on peek slide37, missing } | 17:59 | |
in case that's still relevant :) | |||
gaal | sure, thanks :) | ||
putter: right now, pugs looks only at src/Pugs/PreludePC.yml and ./Test.pm.yml[.gz] | 18:01 | ||
we need the per-user cache folder | |||
integral | does Test.pm.yml get created at the same time as PreludePC by the build? | ||
gaal | integral: no, only on "make smoke" or "make test" | ||
18:02
rantanplan_ joined
|
|||
gaal | this means incidentally that "make install" suckifies ./pugs :) | 18:02 | |
If I'm lucky I'll fix it over the weekend, but possibly not as there's some pizza and a family dinner both waiting to happen | 18:03 | ||
fglock | putter: pong | ||
gaal | fixed. | 18:06 | |
err, I mean the slides. :) | |||
svnbot6 | r9247 | gaal++ | r9268@sike: roo | 2006-03-02 20:02:42 +0200 | 18:07 | |
r9247 | gaal++ | * fix missing closing brace. Reported by wolverian++. | |||
gaal | nothingmuch: ping | 18:11 | |
svnbot6 | r9248 | gaal++ | r9275@sike: roo | 2006-03-02 20:08:53 +0200 | 18:13 | |
r9248 | gaal++ | * perl6.vim: hilight `rule` the same way as `method` | |||
fglock | is there a way to set the filename/line in an eval(), for warnings to behave properly ? | 18:17 | |
meeting & | 18:21 | ||
gaal | fglock: #line? | 18:29 | |
?eval eval "say 'mmm'; \n#line 44324\nwarn 42" | 18:30 | ||
evalbot_9248 | OUTPUT[mmm ] undef | ||
gaal | ?eval eval "say 'mmm'; \n#line 44324\nsay Carp::longmess" | ||
evalbot_9248 | OUTPUT[mmm ] undef | ||
gaal | oof unsafe | ||
18:31
Draconit joined
|
|||
gaal | but that oughta work | 18:33 | |
i have to go now... & | |||
18:47
OuLouFu joined
18:48
axs221 joined
|
|||
axs221 | I've been trying to decide on learning either perl or python. With Perl6 coming out, will learning Perl5 still be useful, or will 6 be too different so that I'd have to relearn most of what I would learn? | 18:51 | |
mauke | learn all three of them | 18:52 | |
axs221 | eventually i might, but i'm wanting to just learn by book right now, i bought a python book | 18:53 | |
i'm thinking about taking the python book back and getting a perl book, mostly because of the greater demand in the market for Perl, atleast in job search sites, although from what I know Python sounds easier to learn for someone relatively new to programming like me | 18:56 | ||
mauke | yes, probably | 18:58 | |
19:02
Nouk joined,
mauke joined
19:03
dduncan joined
19:12
vborja joined
19:17
beppu joined
19:21
vborja is now known as handon
19:22
nothingmuch joined
19:23
ruz joined,
Draconit joined
|
|||
putter | gaal: I don't quite understand. are you saying src/Prelude.pm still has constraints on size (maybe on install??), and thus shouldnt be non-trivially enlarged at the moment? or that it can be? | 19:24 | |
fglock: #line N "filename" which I think the next line is considered N, but I'm not sure. | 19:25 | ||
yes, now sure. ;) | |||
(used in the "I really should put a copy in common" somewhat cleaned up spike backtracking regexp engine thing - makes syntax errors in evals much clearer. ) | 19:26 | ||
svnbot6 | r9249 | bsmith++ | * Rewrote the looping logic in ruleStatementList so that the recursion is | 19:27 | |
r9249 | bsmith++ | factored out into a higher-order function. | |||
r9249 | bsmith++ | * The above allows ruleDocBlock to be moved from Pugs.Parser to its proper | |||
r9249 | bsmith++ | place in Pugs.Parser.Doc. | |||
putter | axs221: if you dont have experience coding in other languages, learning python is more likely to start you off with good habits than learning perl. | 19:28 | |
integral | *sigh* only 50 lines smaller though | ||
putter | ;) | 19:29 | |
were expecting a greater code shrinkage? | 19:30 | ||
integral | just wishing that it'd suddenly turn into one when I commited ;-) | ||
putter | lol | ||
nothingmuch | hola | 19:31 | |
putter | hola, como estas? | ||
nothingmuch | estas beseder | ||
putter goes to google language tools... | |||
nothingmuch | a friend of mine always asks me como estas | ||
she knows some spanish/portugise phrases from TV soaps | 19:32 | ||
i always try to spoil her fun | |||
19:32
handon left
19:33
Draconit joined
|
|||
putter | :) google translates to "to beseder". had to check OneLook to make sure that was a googlism, and not a nifty word which is similar in both spanish and english :) | 19:33 | |
hmm, so I still dont know what it means. | 19:34 | ||
nothingmuch | beseder is hebrew for "OK" | ||
i don't know what "estas" means | |||
she would always laugh at me and say "enough nonsense" or something of the sort | |||
19:34
Draconit joined
|
|||
nothingmuch | anyway, my sister's birthday party was a big success | 19:34 | |
and now I'm off to visit a friend | 19:35 | ||
putter | aaahhh. como=how estas=are you esta=i am etc | ||
fglock | nothingmuch: I speak portuguese in case you need :) | ||
nothingmuch | i hope i'll survive, i haven't seen her in weeks and she is touch about that kind of stuff =)' | ||
putter | yay. was surprise? | ||
nothingmuch | fglock: ah, good thing | ||
putter: yes | |||
we made her a Moomin cake house | |||
putter | win | ||
nothingmuch | thanks to elaine ashton | ||
and we bought her an ipod | |||
and she is delighted | 19:36 | ||
putter | Moomin... putter goes back to google... later... | ||
nothingmuch | en.wikipedia.org/wiki/Moomins | ||
fglock | hi putter - bye putter | ||
putter | ah, it's great when a plan comes together :) | ||
nothingmuch | www.axis-of-aevil.net/archives/2005...omins.html | ||
putter | hi fglock, bye? fglock | ||
fglock quick question | |||
ping? | 19:37 | ||
fglock | pong | ||
putter | are you doing any <expr> expression/operator parsing stuff? | ||
fglock | (I said bye because you said later...) | ||
putter | oooohh. | ||
putter goes to look at moomins :) | 19:38 | ||
fglock | mm - yes, more or less | ||
nothingmuch | putter: it's a series of children's books for adults | ||
fglock | I didn't implement operator precedence yet, but it does espressions | ||
s/expressions/ | |||
see: iterator_engine_p6sample.p6 | 19:39 | ||
putter | ah, en.wikipedia.org/wiki/Moomins | ||
19:39
vborja joined
|
|||
nothingmuch | ciao guys | 19:39 | |
putter: yes, just like i linked you =) | 19:40 | ||
fglock | putter: it compiles: '1' infix:<*> '1' infix:<+> '1'; | ||
putter | oh, duh. saw the first link, explored, ... | 19:41 | |
fglock | if you try 'print' on that it might work | ||
putter | which there was more description of... content? perspective? ie, not cast and geography, but what they do/believe/etc. | 19:42 | |
fglock: err, so where is precedence handled? | 19:45 | ||
fglock | putter: there is no precedence yet - first come, first compiled. | 19:47 | |
putter | got it. | ||
fglock | first priority was bootstrapping, which is mostly done | ||
now there are many possibilities - adding precedence is one of them | 19:48 | ||
I'm not sure what to do next - would like to hear some opinions | |||
performance is quite good | |||
there is the object system work, | 19:49 | ||
completing the rule syntax, | |||
putter | ok, so is a correct one-liner "interator is like the regexp/parser spike, but bootstrapped to self hosting, and using p6 rather than p5 syntax regexps"? other key differences? | ||
fglock | packaging to CPAN, | ||
the whole syntax is defined in p6 | 19:50 | ||
see: iterator_engine_p6prelude.p6 | |||
I could move the compiler to p6 now :) | 19:51 | ||
putter | right. parser_spike.pl cheats a bit to get parser_spike_target.p6 working. | 19:52 | |
:) | |||
hmm... what to do next... | 19:53 | ||
fglock | there is some cheating going on in making { return } blocks work before bootstrapping - but after boorstrapping it can go away - it uses a source filter | 19:54 | |
putter | I'm afraid I haven't even looked yet at the new -CParser-YAML (or somesuch) output. is it something you could derive from your parse tree, so there is a cross check? maybe a cross check. the trees may be too tied to parsing strategy to compare easily. | 19:55 | |
fglock | I could generate YAML if I knew the nodes, but I'm afraid it is too complex for now - it can be left for later | 19:56 | |
being able to read YAML would be nice, you could reuse compiled things from pugs to i_e | |||
i_e nneds a name, maybe a directory :) | 19:57 | ||
s/nneds/needs/ | |||
putter | you could start pouring Parser.hs into p6 rules... | 19:58 | |
start working through the sanity tests, eyeballing for reasonable parses... | |||
misc/IteratorEngine ? ;) | 19:59 | ||
easy enough to rename. svn++ | 20:00 | ||
fglock | Puggie - Pugs little brother/syster | ||
putter | *shudder* | ||
:) | |||
PerlParserPrototypingPlatform | 20:02 | ||
fglock | I'd like to have more opinions on the subproject, before working too hard on it | ||
putter | lol | ||
fglock | it was very successful as an experiment | 20:03 | |
putter | ooo, PerlParserPrototypingPlatformProject | ||
fglock | that's java-ish | ||
putter | makes sense. audreyt said something about attempting a pass over the t/ and ext/ code using... something. a new parser? implementing the "sandwich" parser concept to proof it? | 20:05 | |
re very successful, indeed. congrats. :) | |||
20:05
larsen joined
|
|||
putter | I seem to have backburnered my backtracking engine (still mostly p5 syntax - next step was to be an operator parser), when the spec for one of my "solid places to stand touchstones", Match, started fluxing. Think I may fork a Natch class, that I can keep stable and do whatever the engine needs for now, without worrying about spec. | 20:08 | |
Hmm, and perhaps more importantly, the operator precedence parsing turned out to be a messier proposition than I anticipated. | 20:11 | ||
In retrospect, I should have / should now hack something, to get back to a parser running, and some semblance of p6, so we could have two implementations chasing each other. maybe. or maybe that would simply be a waste. | 20:12 | ||
fglock | putter: operator precedence is easy - it just take a while to optimize (if needed) | 20:13 | |
:) not a waste, but we could have a common API such that we can interchange engines | |||
putter | not in the presence of pre-, post-, and especially circum- fix. | ||
re simple. | |||
fglock | putter: that's a grammar problem (solved) - all we need is to present options to the grammar in the proper order. it should be about 50 lines of code | 20:14 | |
putter | I hypothesize pge is not quite doing the right thing re close tokens on cirumfix ops. and there are assorted "make for extra work" bits like operators having a "no whitespace allowed before me" flag. assorted cruft. | 20:15 | |
fglock | bbiab | 20:17 | |
putter | so your parser, given ... * ,,, with * rule defined early, looks ahead through the input to match *, with two unprocessed strings ... and ,,, , and then recurses on them? | 20:19 | |
Regarding using an alternate regexp engine in perl5, I did a design space grovel - it would take something like four pages to write up - isn't going to happen unless someone _rteally_ wants it. | 20:21 | ||
Most important point is most of the difficulties lie in trying to swap engines in a way which is _transparent_ for _humans_ coding _perl5_. | 20:23 | ||
for p6 _on_ p5, rather than _in_ p5, with a compiler emitting arbitrary p5 code, the only(?) residual issue is exporting qr//'s to native modules. | 20:24 | ||
So in a p6 context, I don't think the exercise is worth the pain. Questions about "what pain?" entirely welcome. :) | 20:25 | ||
My key uncertainties/questions are: | |||
fglock | re: ... * ,,, - yes, and it backtracks if fail | ||
re: "no whitespace allowed before me" | 20:26 | ||
it can be specified in the grammar, I believe | |||
20:27
calanya left
|
|||
fglock | re: qr// - I could write an emitter for that, so we can choose between rule or regex (besides, we can use regex instead of rule when possible, which is faster) | 20:28 | |
putter | Can XS somehow set $1 to a non-string (an object)? Is there some way to create an arbitrary variable which gets scoped just like $1 does? Regards reentrancy - is it strictly capture which is broken? does everything not dependent on captures still work? I think those are my big fuzzies. | ||
fglock | re: $1 - it's good to have TimToady around :) | 20:29 | |
putter | :) and japhy. | ||
and bsb | |||
and ... :) | |||
fglock | bbiab | 20:33 | |
putter | Oh, and the tech for playing with regexp's that I know about is, well, source filters of course, bsb's "regexp which calls matcher, gets capture offsets, and correctly sets up capture vars", the use re 'debug'-ish regcompp and regexecp hooks, and... I dont know of any other tools to get leverage around here, short of playing with opcodes (p5, and regex) or patch p5. | 20:34 | |
If anyone knows of any other candidates, I would be most interested. | |||
buu | Um, Regexp::Parser? | 20:36 | |
putter | I should mention the hooks are basically providing a way to fake up regexp struct's, both as an api into the perl matchvar machinery, and as a way to do qr// which _is_ reentrant (the hooks are reentrant, its just the engine which isnt - thus the one downside of bsb's device). | 20:37 | |
buu: Yes, a good thing to mention. Thanks. (and there is a copy with some bug fixes in misc/pX/Common/Regexp-Parser, also with some additional tests, some failing...) | 20:39 | ||
20:39
SamB joined
|
|||
PerlJam | I know it's been a while since I've paid attention to pugs when I look at #perl6 and I haven't the foggiest idea what's being discussed :-) | 20:41 | |
putter | This is the p5p perl5-porters sidebar on #perl6. ;) | 20:42 | |
PerlJam | Oh. I haven't read p5p in *years*, so that makes sense. | ||
fglock | PerlJam: we are porting p6 to p5 (kind of) | 20:43 | |
buu | Yay! | ||
PerlJam | fglock: good luck! I'm of the uninformed opinion that it's Too Hard :-) | ||
fglock | PerlJam: no it's not :) | 20:44 | |
putter | Somewhat off topic. You dont need it for pugs. Nor for a pugs backend running on p5. Nor for a completely independent p6 parse-compile-emit implementation on p5. You only need these silly time-absorbing games if you attempt to give human p5 programmers p6-ish regexs they can use transparently on p5. eh. | ||
fglock | it's just that there are _too_ many ways to do it | ||
putter: right | 20:45 | ||
putter | though to be fair, some of the stuff turned up could end up being useful for the p6 on p5 stuff interoperating with native p5 modules. | ||
PerlJam | putter: twould be easyish if PGE were a library you could embed. | 20:46 | |
fglock | putter: I'll translate i_e to p6 anyway | ||
putter | I'm basically puttering. Could be working on moving Prim.hs to Prelude.pm, but it's not clear it time for that. Could getting the somewhat cleaned up bactracking stuff at least checked in, or continue work on operator parsing, but with fglock making progress, the presure is off, and it's just not -Ofun. So I've spent 10-ish hours being random. | 20:48 | |
fglock: re _too_ many ways, no. the number of possible tools certainly makes analysis harder. but I believe the real problem, at least for a full bore "use EverythingRegexyNowLooksLikeP6; ...", is that you simply cant do it. | 20:51 | ||
fglock goes read Prim.hs | 20:53 | ||
putter | PerlJam: re PGE, the engine is actually the easy part :). sort of. or at least the part we've sort of kind of already done. the long-term as-yet-unresolved puzzle is the pragmatics of integrating it with unpatched perl. | ||
fglock | putter: OT - do you know of an example of using '&' in a rule? (conjunction) | 20:54 | |
PerlJam | Hmm. unpatched perl? How incestuous must the engine be? | ||
putter | though there are some low hanging fruit, like a reentrant p5 regexp engine with rules. that one could do now as an XS module for cpan. but that's a bit off-perl6-topic. | ||
fglock: an example? any example? | 20:55 | ||
abc&\w**{3} ;) | |||
fglock | putter: what is it useful for? | ||
putter | ooooohh | ||
PerlJam | fglock: Are you asking what & is generally useful for? | 20:56 | |
putter | one sec | ||
fglock | PerlJam: in the context of p6 rules | 20:57 | |
PerlJam | The things I can think of all involve increased specificity. | ||
putter | PerlJam: the regexp engine and the perl compiler/runtime unfortunately know each other quite well. | ||
And p5's extensibility has never extended to permitting the user to, for example, create a Qr class which emulates qr//, overloading =~. | 20:58 | ||
And there are no hooks, even at the C level, for creating the $1,etc suite. | 20:59 | ||
PerlJam | putter: sounds like the goal should be to get those patches in before the next release of perl5 :-) | ||
putter | One of the key values of the hooks, and their ability to create "struct regexp"'s, is you finally have a way to twiddle some of those internals. But I'm afraid it may not go as far as "please, can my $1 be an SV?". :( | 21:01 | |
PerlJam: doing p5 guts modifications to better support p6-like stuff... is something which could be added to perltodo. ;) volunteers welcome. making the regexp engine reentrant is listed there. in the "hard" section (though I'm not clear on why it's hard exactly. but I dont see perlguts hacking in my future). | 21:04 | ||
Oh my, scary last words. | |||
man perltodo (i only discovered it the other day:) | 21:05 | ||
fglock: re conjunction, | |||
fglock | putter: other option - help me doing the i_e thing :P | 21:06 | |
putter | you know how you sometimes use lookahead to assert some property on the following characters, in addition to the regex which actually matches them? the one gotcha is you cant assure the lookahead matches exactly... (well, you can, but it takes, oh wait, I'm not sure you can) anyway, that it matches exactly what you intended. | 21:08 | |
<hiaku>&[<line>+] | 21:10 | ||
hmm, the grouping [] was unnecessary | |||
fglock | putter: thanks | 21:11 | |
putter | [<mail_header>&.*?^^From: (\N+).*] $<body>:=(.*) | 21:12 | |
PerlJam: what's an increased specificity example? both of mine were assert-spec&unpack pairs. | 21:16 | ||
fglock | putter: .* would make it fail, isn't it? | 21:18 | |
putter | you mean the .* after the (\N+) ? | 21:19 | |
fglock | yes | ||
PerlJam | putter: yes, mine are similar, just that the "unpack" part isn't necessary: [<mail_header>&^^<'From:'>] && do_something_only_with_from_lines; | 21:20 | |
putter | I don't believe so. I would expect the & to force the * to backtrack. | ||
PerlJam | putter: btw, beware the cut-colon! :-) (unless I'm mistaken that you meant for the : to be matched) | ||
putter | lol | ||
right | |||
god, both my p5 and p6 are going to be so buggy. colons and brackets and sigh, oh my. | 21:21 | ||
when writing p5 regex's i now do a double-take each time I use {, "wait, that's... no, it's p5, that's ok". ;) | 21:22 | ||
PerlJam | The conceptual and syntactic overlap is annoying if you have to do both. | 21:24 | |
(ergo, I've sworn off writing perl6 for a while) | |||
putter | I don't think that last & example actually works... | 21:25 | |
ah | |||
<mail_header> would have to match exactly the 5 chars "From:". | 21:27 | ||
putter wonders what the big-picture status and critical path of pugs currently are. | 21:28 | ||
putter goes to check audreyt's blog ;) | |||
21:35
DesreveR joined
|
|||
PerlJam | putter: Are you *sure* it would have to be that way? Must they both match the exact same characters completely? Granted, if it didn't I have no idea what state it would leave the current byte/char position pointer in. | 21:36 | |
fglock | PerlJam: it must match exactly the same substring | ||
putter | has anyone groveled over Parser.hs and created a p6 grammar? either a direct translation, or one using <statement> and <expr> modifying constructs like statement_control:<if> and infix:<+>, etc? | 21:37 | |
PerlJam | Seems like you'd have to worry about end points then rather than just "matches at this position" | ||
"foobar" ~~ /<'foo'>&<'foobar'>/ # What happens? Does the match fail? | 21:38 | ||
putter | PerlJam: just doing zero-length lookahead assertions (?=...) and <before ...> satisfies the "they both start here, and I dont care where they end" need. & exists entirely to provide the "i do care where they end". | 21:39 | |
yes, that match fails | |||
PerlJam | putter: that seems entirely reasonable. | ||
fglock | putter: re: grammar - I'll start doing that soon | ||
PerlJam | (Well, that seems reasonable as along as it's adequately documented :-) | 21:40 | |
putter | translation or self-modifying (what's a better name for that?) | ||
:) | |||
fglock | putter: I can write a grammar to parse Haskell, and use it as-is | 21:41 | |
putter | "foobar" ~~ /<before <'foobar'>><'foo'>/ succeeds | ||
any ideas on what to call a grammar which uses non-local definition of <statement> and <expr> ? | 21:42 | ||
fglock | putter: non-local? | ||
putter | ok, that was either you suggesting "non-local" was an ok name, or you being confused about what i meant by "non-local", thus eliminating as an option. i'm not sure which... | 21:43 | |
:) | 21:44 | ||
fglock | what do you mean by non-local? | ||
putter | ah, eliminated as an option. meant | ||
something which, instead of an explicit rule statement { subrule1 | subrule2 | ... }, | 21:45 | ||
PerlJam | putter: a fully qualified rule name? | 21:46 | |
fglock | putter: that's <@subrule> in i_e | ||
putter | one uses multi statement_control:<if> (...){...} multi statement_control:<while> (...){...} etc to fill it in. | 21:47 | |
fglock | putter: you mean, statement_control is represented by an array? (or namespace thing) | ||
21:48
pdcawley joined
|
|||
putter | fglock: yeah, but there are some issues... like how do (pause) | 21:48 | |
PerlJam | must not have been enough svk talk here ;-) | 21:49 | |
fglock | putter: please not that it is an array of rule - it is very flexible | ||
putter | statement_control is a grammatical category. it defines one of the <statement> subrules. | ||
(my yeah, was directed at <@subrule>, not represented by an array ;) | 21:50 | ||
fglock: yes but. when writing a grammar, in a first match wins engine (like | is), you carefully craft the order of the subrule list. when subrules get added by statement_control defs, someone other than the human has to do the crafting. either the statement_control infrastructure assures the @array has a nice order, or <statement> can't use <@array>. | 21:53 | ||
fglock | putter: you can opt to use longest-match instead of ordered-match | 21:54 | |
putter | yes | ||
fglock | that would be <%statement_control> | 21:55 | |
putter | and the real parser can play games like trying to massage the @array into a trie, so it doesnt have to repeatedly reparse the same stuff the same way. | ||
fglock | putter: it is cached | 21:56 | |
21:57
Arathorn is now known as Aragone
|
|||
putter | re statement_control, dev.perl.org/perl6/doc/design/syn/S04.html has a little bit in Statement parsing. | 21:58 | |
fglock | putter: nice | 21:59 | |
22:00
ruz joined
22:01
Limbic_Region joined
|
|||
Limbic_Region | is there a known problem with Feather and https ATM? | 22:01 | |
fglock | why is 'if' a macro? (S04) | ||
22:02
chris2 joined
22:03
pmurias joined
|
|||
putter | re hash, "An interpolated hash matches the longest possible key of the hash as a literal, or fails if no key matches.", which doesnt help you distinguish between /if <expr> <block> [else <block>]?/ and /if <expr> <block> [else <block>]? [wrap_around_both_branches <mumble>]?/. comparing "if" and "if" isnt going to help. | 22:04 | |
pmurias | Does any one think that useing Smart::Comments in iterator_engine.pl would be a good idea? | 22:05 | |
fglock | pmurias: I like Smart::Comments, but I'd like to keep it simple (that is, no unnecessary dependencies) | 22:06 | |
putter | (there shouldn't have been a ? on the <mumble> clause) | ||
pmurias | It would be a dependency only for debugging :) | ||
And casual users don't do that often :) | |||
at least they shouldn't have to :) | 22:07 | ||
fglock | pmurias: I'll check that (you mean, disable 'use Smart::Comments' when not in use?) | ||
pmurias | the use line should be comment out by default | 22:08 | |
fglock | putter: re /if.../ - I don't understand the mumble part, what would it be? | ||
pmurias | and if the debuging messages are needed you just delete the # | ||
putter | re if macro, well, you need to add a regex to <statement> so you can parse it. and we can currently hang regexs off of, well, rule, and macros macro statement_control:<if> (...) is parsed(/heres the regex/) {...} | 22:09 | |
pmurias | i'll commit it tommorow if youd don't mind | ||
fglock | pmurias: sounds good - I'll check the pod again | ||
pmurias | i have to sleep now, will be back tomorrow, bye | ||
fglock | putter: ok. so the macro is just a simplification of the rule thing I'm using | 22:12 | |
putter | re mumble, oh, maybe a block/closure which is handed the block/closure which if would normally execute itself, but it gets to do some stuff, then maybe call it, then do other stuff. but it was just a strawman to point out that with random cruft being added to the parser, some of which will conflict with existing rules, an alt-like parse is insuffient. | ||
putter goes to look again at what fglock is using... and then has to remember to search.cpan Smart::Comments... | 22:13 | ||
fglock | putter: I think there must exist just one 'if' - if you need something more complex, you define it inside the if-macro or define it with a rule, which gives you full flexibility. but there is only one entry in the statement tabl | 22:14 | |
putter: re using: only rules, no macros | 22:15 | ||
s/tabl/table/ | |||
unlike multis, which are defined in another category | 22:16 | ||
putter | yes - the push'es, and on to what, are implied by the grammatical category stuff. statement_control, infix, term, etc. | 22:17 | |
fglock | putter: yes - that would be handled by macros, if we had them | ||
fglock thinks about adding macros - it goes to the TODO list | 22:18 | ||
putter | well, the whole issue of what's a macro/rule/method/sub is still a bit unspeced (or such is my recollection) | ||
22:23
DesreveR is now known as r0nny
|
|||
putter | perhaps in this case, a macro (would have to be a string macro, yes?) could match and rewrite the input. a rule statement_control:<if> {...} could do whatever ruleish things the rest of the p6 grammar rules are doing, perhaps to build an ast. (caveat, I'm not sure I've seen a spec example of a "rule statement_control"). | 22:26 | |
svnbot6 | r9250 | fglock++ | iterator_engine - updated TODO list - putter++ | 22:28 | |
fglock | putter: a macro is just like a source filter; macro statement_control:<if> {...} is probably setting an element in the hash %statement_control in the p6 compiler namespace | 22:31 | |
%statement_control:<if> actually | 22:32 | ||
it will look like: %statement_control:<if> = rule { ... } | 22:33 | ||
putter | it has to be a is_parsed and string-returning (not code-returning) macro, yes? | 22:34 | |
fglock | in i_e, it is supposed to return AST. but a macro can return either string or AST (no code) | 22:35 | |
macros that return string will be more portable - I don't think there will be an official AST for all compilers | 22:37 | ||
so AST is for internal use only | |||
putter | ah. have to go. enjoy. | 22:40 | |
& | |||
fglock | & | ||
22:42
fglock left
|
|||
svnbot6 | r9251 | fglock++ | iterator_engine - pasted some comments | 22:42 | |
23:03
nothingmuch joined
|
|||
nothingmuch | moose | 23:04 | |
audreyt: ping | |||
beppu | stupid question perhaps, but will perl6 allow us to use chars like '!' and '?' in subroutine names? | 23:11 | |
mauke | probably yes, because perl5 does it | 23:14 | |
integral | yes, but perl5 allows "\0" in subroutine names. | 23:16 | |
23:23
frederico joined
23:29
TMTOWTDIt left
|
|||
beppu | mauke, how does perl5 allow it? I didn't think it did. | 23:31 | |
can you post an example? | |||
mauke | *{"!"} = sub {"y helo thar"}; | 23:32 | |
beppu | how do you call it afterwards? | ||
mauke | *{"!"}->() | ||
beppu | I see... what I really wanted to be able to do was say things like: if ($block->is_filled?) { ... } | 23:33 | |
with the ? being part of the method name./ | |||
I didn't want to have to use typeglobs for this. | 23:34 | ||
mauke | heh, scheme style | ||
beppu | yeah. :) | ||
mauke | wouldn't that clash with operators? | 23:35 | |
beppu | I think it would, but I figured it wouldn't hurt to ask. | ||
mauke | hmm, it shouldn't be too hard to write a lisp skin for perl 6 | 23:37 | |
or perl 5, for that matter | |||
beppu | no source filters for me. | 23:39 | |
23:39
azuroth joined,
Southen joined
|
|||
avar | integral: perl is pretty liberal about the names of everything | 23:39 | |
${'Woo, variable with spaces!'} = 5; | 23:40 | ||
beppu | but you have to turn strict refs off, right? | 23:43 | |
avar | no | 23:45 | |
mauke | yes | ||
er, wait | |||
avar | bleh, yes | ||
beppu | ;) | 23:48 | |
we should steal back from ruby and allow '?' and '!' at the end of method names. | 23:49 | ||
PS: has anyone noticed the similarity between `perl -h` and `ruby -h`. I think that's cool. | 23:50 | ||
obra | beppu: or just go hardcore and use _p (predicate) instead of ? | 23:53 | |
beppu | that's not as cool. ;) | 23:54 | |
perl and sigils belong together. | |||
23:57
samuel joined
|
|||
avar | I like ! a lot | 23:57 | |
.chomp! str | |||
eh | |||
str.chomp! | |||
what does ? do again? | 23:58 | ||
mauke | returns a bool | ||
avar | perl 6 has that | ||
if (?foo) .. | |||
IIRC | |||
along with ~ for a scalar cast.. | 23:59 |