pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | <stevan> Moose... it's the new Camel ":P | .pmc == PPI source filters! Set by Alias_ on 16 March 2006. |
|||
ruoso | making a daily build and upload (if tests passes) of parrot to debian would be a good test bed | 00:01 | |
as it would end up building in another 11+ architectures... | |||
s/daily/something more reasonable/ | |||
arcady | weekly, perhaps, though even that may be a bit much | 00:02 | |
what's actually going with parrot, anyway? | 00:03 | ||
ruoso | hm? | 00:04 | |
arcady | does anything compile to it, these days? | ||
TimToady | Oh, Perl 6 in another week or two... :) | 00:05 | |
Actually, pm already has a subset compiling to parrot. | 00:06 | ||
I think most recent work has been with Tcl though. | |||
arcady | well, there's PGE, and there's a perl 6 grammar | 00:07 | |
or at least, will soon be | |||
ruoso burning his CPU | 00:12 | ||
arcady | is there actually a the perl 6 grammar anywhere? | 00:14 | |
however incomplete | |||
ruoso | it seems to be in language/perl6 | ||
s/language/languages/ | 00:15 | ||
that's what I'm trying to play with | |||
arcady | hm. seems kinda... incomplete | 00:16 | |
00:17
zgh joined
|
|||
ruoso | yeah... there is also the PCR work by fglock... which seems to be writing it too... | 00:17 | |
I still don't know how both are interacting... | 00:18 | ||
arcady | well, yes... I think there should be one official "the perl 6 grammar" | ||
ruoso | well... that are the synopsis... :) | ||
00:18
amnesiac joined
|
|||
ruoso | there are implementation differences | 00:19 | |
that "bottom-up" "top-down" thing... | |||
arcady | or rather, the fact that you need both | ||
LeTo | TimToady: I've built and tested 0.4.3 on x86, amd64, ppc-darwin, and solaris 10 w sun-cc and gcc ;) | 00:20 | |
ruoso | arcady, yes... sure... but the choice of where to get one way or another may be different from each implementation... | 00:21 | |
arcady | still, the idea is that all the multiple implementations have the same grammar | 00:22 | |
or should be, anyway | |||
or rather, accept the same language | |||
00:22
Leandro- joined
|
|||
Leandro- | "SELECT codigo, login, id, nome, data FROM kb_clientes WHERE $por LIKE '%$string%' LIMIT 15" | 00:22 | |
$por = table | |||
whatōæ½xB4s wrong? | |||
the query is ok | 00:23 | ||
the problem is with $por | |||
ruoso | Leandro-, please join #perl.br | ||
Leandro-, there is likely to be the place for this kind of problem | |||
s/there/that/ | 00:25 | ||
BTW... the work in languages/perl6 seems really nice | 00:26 | ||
00:31
stu7 joined
|
|||
ruoso just found a way to segfault parrot | 00:31 | ||
avar | ruoso: what svn repos? | ||
stu7 - unable to decipher a proper answer from the channel topic, asks stubbornly if perl6 is done ? :) | 00:32 | ||
buu | NO | ||
stu7: It'll be done by christmas. | |||
ruoso | svn.perl.org/parrot/trunk | ||
stu7 | thx btu :) | ||
avar | buu: Will there be ponies? | 00:33 | |
00:33
stu7 left
|
|||
ruoso | heh | 00:33 | |
buu | avar: YES. | 00:34 | |
Yay ponies! | |||
avar | What can you do with languages/perl6 ? | 00:35 | |
arcady | parse some small subset of perl6 | 00:36 | |
ruoso can see pretty tree-like ascii art | |||
avar | arcady: without haskell? | ||
ruoso | avar, yes | 00:37 | |
avar | arcady: with ponies? | ||
FurnaceBoy_ | omg!!! ponies!!! | ||
avar | how does that work? | ||
subset of perl6 in C? | |||
ruoso | avar, PGE and Parrot | 00:38 | |
avar | someone handwrote a Perl 6 compiler in PGE? | ||
*subset of Perl 6 .. | 00:39 | ||
arcady | you mean, in perl 6 rules? | ||
ruoso | that's the idea | ||
arcady | nothing too tricky about that | ||
someone handwrote PGE in PIR, though | |||
ruoso | nothing too tricky until you can emit PIR from this parse | ||
ruoso plans to port lrep to parrot | 00:41 | ||
arcady | hm. PGE makes it much easier to write parsers in parrot | ||
ruoso | arcady, far easier... from what I just saw... | 00:42 | |
avar unfamiliar with all the acronyms | |||
arcady | PIR is the language that parrot compiles and runs, very low level | 00:43 | |
ruoso | yes | ||
arcady | a little bit above assembly | ||
00:43
qu1j0t3 joined
|
|||
ruoso | arcady, a bit more than you're thinking... | 00:43 | |
arcady | PGE is the Parrot Grammar Engine, an implementation of perl 6 rules written in PIR | ||
00:43
qu1j0t3 is now known as FurnaceBoy
|
|||
arcady | which compiles rules to PIR, I think | 00:43 | |
avar svn co | |||
ruoso | yes | 00:44 | |
00:48
Khisanth joined
00:49
q[uri]_ joined
|
|||
avar | that language/perl6/ stuff isn't the whole thing is it? | 00:52 | |
It's like 150 lines | |||
ruoso | avar, considering it does'nt include PGE | ||
it's all the stuff | |||
audreyt | avar: it's a beginning of the whole thing, must as lrep is also a beginning of the whole thing :) | 00:53 | |
also, it's currently just a simple parser | |||
clkao | audreyt: yo | ||
audreyt | there's no compilation involved. | ||
clkao: yo | |||
clkao | so what's with perl6-binding | ||
i don't think it could provide ro alias. but could probably steal the grammar | 00:54 | ||
audreyt | I havn't looked closely but it seems the src filtering is especially good | ||
exactly what you said. | |||
clkao | ya. you have some time for it? :P | ||
audreyt | this weekend for sure :) | ||
clkao | it's easter weekend. i will hopefully be hacking | ||
lots of svk backlog to clear | |||
audreyt | woot | 00:55 | |
my birthday is coming in 6 days | |||
clkao | ya. | ||
obra | happy almost birthday, audrey | ||
audreyt | heh :) thanks | ||
svnbot6 | r9913 | audreyt++ | * Dan Kogai reported that {my $x; $^y}.(42) is broken | 00:58 | |
r9913 | audreyt++ | because extractImplicitParameters does not look inside | |||
r9913 | audreyt++ | a Pad (or Sym) node. Fixed. | |||
01:19
lisppaste3 joined
01:32
hcchien_ is now known as hcchien
01:59
mako132_ joined
02:26
scw joined
02:49
r0nny joined
|
|||
svnbot6 | r9914 | fglock++ | PG-P6 - StatementControl.pm passes more tests | 03:14 | |
03:16
fglock joined,
cjn joined
03:28
jserv-- joined,
Soga joined
|
|||
TreyHarris | that went really well... i tried an experiment with my perl (5) class today... i taught them closures immediately after teaching them ordinary subroutines. and they actually got it, most of them | 03:29 | |
svnbot6 | r9915 | fglock++ | PG-P6 - added failing tests | 03:38 | |
03:45
mako132_ joined
03:57
cjn left
03:58
FurnaceBoy is now known as FurnaceBoy_
03:59
fglock left
|
|||
gaal | audreyt: when does the Big Pad Refactoring take place? | 04:42 | |
04:42
nirgle joined
|
|||
gaal | audreyt: alternatively, wanna work on S08? | 04:42 | |
04:43
nirgle joined
05:10
justatheory joined
06:02
nothingmuch joined
06:06
buu joined
06:21
f0rth joined
06:46
bsb joined
06:56
tifo joined
07:02
Aankhen`` joined
07:08
drrho joined
|
|||
azuroth | g'day, drrho | 07:27 | |
drrho | hiho azuroth! | 07:28 | |
08:16
dakkar joined
08:18
xinming joined
08:25
Frances joined
08:39
marmic joined
08:53
q[uri] joined
08:56
wilx joined
09:02
pdcawley joined
09:09
chris2 joined
09:36
marcus_ joined
|
|||
marcus_ | seen audreyt | 09:36 | |
wolverian | ENOBOT | 09:37 | |
marcus_ | :'( | ||
09:43
bsb_ joined
09:56
avarab_ joined
09:58
cognominal joined
10:01
cognominal joined
10:03
b_jonas joined
|
|||
rafl | Does anyone know who `ruoso', who were here yesterday and complained about the Debian packages of parrot, is? | 10:07 | |
10:07
cognominal joined
|
|||
ayrnieu | his nick is registered. | 10:09 | |
10:09
Grrrr joined
|
|||
ayrnieu | the nick, rather. | 10:09 | |
10:12
avar joined
|
|||
rafl | ayrnieu: How does that help? :-) I'd like to have a email address or something :-) | 10:13 | |
10:13
broquaint joined
10:14
wolverian joined,
colares joined,
PerlJam joined,
weinig|sleep joined,
kattana_ joined,
ko1_away joined,
evalbot_9900 joined,
chip joined,
webmind joined,
xX[ReP]Xx joined,
chihchun joined,
merlyn joined,
pasteling joined,
revdiablo joined,
webmind_ joined,
oozy joined,
PerlJam joined
|
|||
ayrnieu | rafl - ruoso has MemoNotify and Memosignon active, so you can send a message to him through memoserv, and he'll see it the next he logs in. | 10:15 | |
10:17
ko1_away joined
|
|||
rafl | Ah, thank you. :-) | 10:21 | |
10:49
broquaint joined
|
|||
audreyt | gaal: pong | 10:53 | |
I'll have full cycles for S08 at 36 hours from now | 10:54 | ||
we can do that before BPR | |||
since I think both involves P.A.Internals change | |||
clkao | bpr? | ||
audreyt | Big Pad Refactoring | ||
switching from runtime pad allocation to compile time | |||
as well as nail down all the storage classes | 10:55 | ||
clkao | whoot | ||
audreyt | (state, my, let) | ||
dakkar | how will 'temporary' and 'hypothetical' be implemented? | 10:57 | |
'temp' is not a storage class, is it? | 10:58 | ||
audreyt | no... it's installing a POST callback to someone's .TEMP | 11:01 | |
ditto "let" vs UNDO | |||
let and temp are not declarators at all | |||
sub f { let $x = 3 } | 11:02 | ||
this is illegal | |||
unless $x is visible | |||
sub f { let my $x = 3 } | |||
dakkar | 'let' is the 'hypothetical' assigner? (I'm getting lost again...) | ||
audreyt | yeah... "let" means temporize but only revert in UNDO, not POST | ||
s/POST/LEAVE/ | 11:03 | ||
wolverian | s,let,maybe, # :) | ||
ayrnieu | (what? perl6 has backtracking? Nevermind! Carry on!) | ||
dakkar | and UNDO is called on fail... | ||
11:03
TimToady joined
|
|||
dakkar is away: pranzo | 11:06 | ||
11:07
SamB joined,
bsb_ is now known as bsb
|
|||
bsb | audreyt, ingy: I'll be in Taipei 21-26 of April | 11:13 | |
for coffee debt settlement | |||
audreyt | bsb: ooooh | 11:15 | |
excellent | |||
gaal | audreyt: ACK, cool | 11:16 | |
11:18
colares joined,
weinig|sleep joined,
kattana_ joined,
evalbot_9900 joined,
chip joined,
xX[ReP]Xx joined,
chihchun joined,
merlyn joined,
pasteling joined
11:20
elmex joined
11:27
Southen joined
11:29
azuroth joined
11:32
nirgle left
|
|||
azuroth | bye bye! | 11:33 | |
11:35
azuroth joined,
Southen joined
11:53
kanru joined
11:55
Khisanth joined
12:07
ruoso joined
12:08
marmic joined
12:28
kolibrie joined
|
|||
dakkar is back (gone 01:32:14) | 12:38 | ||
12:44
Limbic_Region joined
12:49
weinig|sleep is now known as weinig
|
|||
ruoso playing with parrot/trunk/languages/perl6 | 12:51 | ||
azuroth | ruoso: I think rafl was looking for you, for bad mouthing his debian packaging skills ;-) | 12:56 | |
ingy | bsb: awesome | 12:57 | |
ruoso | azuroth, people is in a bad mood this days... | 13:01 | |
bsb | ingy: yep, tickets booked | ||
ruoso | azuroth, I just asked him a question and made a suggestion... | 13:02 | |
azuroth | well, only half of what I said was true | 13:03 | |
I'm assuming he'll be able to fix it up all good | |||
good night, all | 13:04 | ||
rafl | ruoso: Hi there! | 13:05 | |
ruoso | rafl, hi | ||
rafl | ruoso: You said some points I want to comment on: 1. I don't think a parrot-svn package make sense. Debian has its experimental branch for that. | 13:07 | |
ruoso: I just don't have the time to keep that up to date very often, so help is appreciated. | |||
ruoso: 2. parrot-0.4.3 is packaged and uploaded. | |||
ruoso | thanks | 13:08 | |
rafl | ruoso: That happened on the day it was released. Since then it's waiting in the Debian NEW Queue: ftp-master.debian.org/new.html | ||
That's because parrot changes its binary interface and therefor the SONAME of libparrot on every release and the package names in Debian need to reflect that. | |||
And as soon as you introduce a new package name, your package will be put into NEW for ftp-master approval. | 13:09 | ||
ruoso | rafl, oh... | ||
rafl, ok | |||
rafl | There is no possibility to fix this inside Debian. Parrot needs to get a stable API and someone who watches out for changes. | ||
You also said that automatic daily builds should be in Debian and they should be autobuilded on all archs to check parrots quality. | 13:10 | ||
That's a bad idea as well. Even if it's called "unstable" it's not the place to upload random snapshots of any given software. That's what experimental is for. | 13:11 | ||
Also the Debian buildds are already stressed enough. | |||
ruoso | ok... thanks... | 13:12 | |
rafl | I think, as I said already, experimental is a good place for parrot svn snapshots. | ||
Experimental gets autobuilded on some archs, so that could help to improve quality as well. | |||
ruoso: So if you have some spare time and want to improve the situation I'd be really glad if you could prepare some svn snapshots from time to time. | 13:13 | ||
ruoso | rafl, ok... sorry if what I said seemed as a complain... it was not my intention... | ||
integral | of course, someone could build their own .debs and put them on their own host, if they want to provide very unstable svn snapshots | 13:14 | |
13:14
Qiang joined
|
|||
rafl | integral: Of course. I've done that on feather, but I didn't had time to set the autobuilder up again. | 13:15 | |
13:16
kakos joined
|
|||
rafl | ruoso: I'm fine with that. I just wanted to comment on some things. | 13:18 | |
13:19
kanru joined
13:24
ardder joined,
snowstalker joined,
SamB joined
13:44
fglock joined,
snowstalker joined
|
|||
svnbot6 | r9917 | fglock++ | PG-P6 - moved Pugs-Compiler-Tokenizer into Pugs-Grammar-Perl6 | 13:59 | |
ruoso needs help with pge... | 14:01 | ||
14:01
snowstalker joined
|
|||
ruoso | I can match "my $a = (1,2,3)" but can't match "my $a = ()".... | 14:02 | |
14:02
vel joined
|
|||
fglock | ruoso: hi | 14:03 | |
ruoso | fglock, hi | 14:06 | |
fglock, I'm playing with parrot+pge+languages/perl6 | |||
I think the problem is with 'circumfix:( )' | 14:07 | ||
which only works if there is actually something inside the ( ) | |||
fglock | you can see if there are already tests for this | 14:10 | |
14:11
justatheory joined
14:14
vytautas joined
14:17
vytautas joined
14:20
nothingmuch joined
14:28
hexmode joined
14:32
webmind_ is now known as webmind
14:33
wilx joined
|
|||
fglock | are there docs on how to parse '$a<2' vs '$a<2>' and division vs. match? | 14:42 | |
wolverian | afaik infix < needs whitespace | 14:43 | |
ayrnieu | fare thee well, terse maths. With FORTRAN you came, and you've since always been leaving. Fare the well. | 14:45 | |
fglock | ?eval 1<2 | ||
14:45
evalbot_9900 is now known as evalbot_9917
|
|||
evalbot_9917 | bool::true | 14:45 | |
integral | ayrnieu: don't dispair! redefine the grammar to be more like haskell! | ||
15:18
pmurias joined
|
|||
pmurias | hi all | 15:18 | |
fglock | pmurias: hi | 15:23 | |
15:28
fglock left
15:32
pmurias joined,
chris2 joined
|
|||
pmurias | fglock: i get an error from perl6.pl: Pugs::Grammar::List is missing | 15:33 | |
15:41
KingDiamond joined
15:59
KingDiamond joined
16:03
justatheory joined
16:19
xinming joined,
FurnaceBoy joined
16:20
fglock joined
|
|||
fglock | pmurias: fixing | 16:25 | |
svnbot6 | r9918 | fglock++ | PG-P6 - added List.pm | 16:27 | |
16:36
ghenry joined
16:51
FurnaceBoy is now known as FurnaceBoy_
16:58
bsb left
|
|||
kolibrie | fglock: do you have an example written out like you propose for your lrep Talk: source text, grammar, compiled grammar, grammar generates AST | 17:00 | |
I wrote a small grammar file, now I want to compile it and use it to generate an AST from my source text | 17:02 | ||
fglock | kolibrie: svn.openfoundry.org/pugs/misc/pX/Co...le/Rule.pm | 17:08 | |
this is the grammar file used to parse rules in PCR | |||
the AST is generated by the return blocks | 17:09 | ||
kolibrie | fglock: What command do I run to process a source file with a grammar? | 17:10 | |
fglock | $match = $rule->match( $source ); - the ast tree is in $match->() | 17:11 | |
or $match = Grammar::rule( $source ); | 17:12 | ||
kolibrie | fglock: I'm sitting on the command-line with a grammar in p6, and a text file. How do I run the grammar over the text file? | 17:13 | |
17:14
zgh joined
|
|||
kolibrie | fglock: do I write a small p6 script that requires the grammar, reads the text file, and runs the match? | 17:15 | |
fglock | you need to compile the grammar to a p5 package, and then require/use it in a program; then read the source file; apply your main parse rule and get a match object; then get the capture from it ... | 17:16 | |
exactly | |||
kolibrie | so, to compile the grammar to a p5 package, what do I run? | ||
fglock | or, you can split the grammar into rules and compile each one directly in the p5 program | 17:17 | |
you can use lrep to compile the grammar | |||
kolibrie | I ran 'perl p6compiler.pl grammar_test.p6' | 17:18 | |
I can't see that it did anything | |||
fglock | if you choose to write in pure p5: $rule = P::C::R->compile( ' <rule><rule> ' ); | ||
you may need to supply some command line switches | 17:20 | ||
p6compiler.pl --print-program xx.pl > xx.pmc | 17:23 | ||
kolibrie tries | |||
17:24
xinming joined
|
|||
kolibrie | fglock: yeah! I got something | 17:25 | |
fglock: now, to use that in my main program, I need to require my generated p5 module | 17:26 | ||
then how do I call it? | |||
fglock | if you compiled a .pmc, you can just 'use' it - perl will load the .pmc | 17:27 | |
then: my $match = Grammar::rule( $source ); - use you grammar and rule names | |||
17:28
ruoso joined
|
|||
kolibrie | fglock: and $source is a string from my text file | 17:28 | |
fglock | sorry: my $match = Grammar->rule( $source ); - rule is a method | 17:29 | |
kolibrie begins to get excited | |||
fglock | yes | ||
prepare to have Data::Dumper around :) | 17:30 | ||
kolibrie | fglock: no problem | ||
17:31
colares joined
|
|||
ruoso | kolibrie, if everything goes fine, you should be able to recompile the grammar with the generated p5 code | 17:34 | |
kolibrie | ruoso: that sounds like an adventure for another day | 17:36 | |
ruoso | :) | 17:37 | |
kolibrie | fglock: perl parse_text.pl text_file.txt | 17:45 | |
Undefined subroutine &ruleop::constant called at grammar_test.pm line 8. | |||
how do I make it require/use the correct lrep files? | 17:46 | ||
fglock: I added the lines from the p6compiler.pl header subroutine to my parse_text.pl file | 17:56 | ||
now my errors are gone, and Data::Dumper gets pulled into use | 17:57 | ||
18:00
lichtkind joined
|
|||
lichtkind | the ! is for things like : if not ....{} ? | 18:01 | |
18:06
dduncan joined
|
|||
lichtkind | in the s3 table stands only symbolic unary for the ! but where can i get more info? | 18:07 | |
kolibrie | fglock: hmm, all my matches seem to be $VAR1 = undef; | 18:09 | |
TimToady | lichtkind: if anything is undocumented in a synopsis the assumption is that it is handled like Perl 5 does. So yes, unary ! is just a very tight "not". | 18:19 | |
lichtkind | thanks mr toady | ||
TimToady | if !$x == $y is if (!$x) == $y | 18:20 | |
lichtkind | tim toady and thanks for answering my mail | ||
TimToady | so it's often tighter than you like. | ||
you're very welcome | |||
lichtkind | tim toady i currently write an tutorial about perl6 and once i wrote you a mail with some questions about beginnings of perl because i maintain nearly all perl related articlres in german wikipedia | 18:21 | |
TimToady | ah | 18:22 | |
lichtkind | tim toady but you nearly answered it with your last talk in isreal | ||
TimToady | I'll be a little less conferencey for the next month or so, so I should be available to answer any remaining questions. | ||
lichtkind | its just a small one :) | 18:23 | |
TimToady | by Christmas. | ||
:) | |||
lichtkind | :) | ||
we had hard disputes about that because i said that you cant seperate an christian attitude from the rest of pearl, some had problems with it , i think i understand that even if im not christian | 18:24 | ||
dduncan | so, did any of you submit proposals to talk at OSCON 2006, and get word back as to whether they were accepted or not? | 18:26 | |
18:26
KingDiamond joined
|
|||
TimToady | one cannot help but be who one is (at least without some kind of divine assistance.:) | 18:26 | |
dduncan | I made a proposal and found out a half hour ago that I won't be giving it ... too many good submissions or something | ||
TimToady | or too few good time slots... :-) | 18:28 | |
lichtkind | TimToady sorry im no nativw speaker | 18:29 | |
TimToady | sorry | ||
you have to be who you are | |||
unless you get outside assistance | |||
miyagawa | dduncan: I made a submission of my talk to OSCON 2006 and I got a reply from them, a couple of weeks ago | 18:30 | |
saying the talk was accepted | |||
dduncan | hm, makes sense | 18:32 | |
they probably would confirm all the yesses first | |||
TimToady | me, I have to give a talk whether I want to or not... | 18:33 | |
miyagawa | that was 2 weeks ago, to be more accurate | ||
dduncan | yes, you're spe-shul | ||
miyagawa | TimToady: seen this? japan.cnet.com/interview/story/0,20...857,00.htm | ||
18:33
weinig_ joined
|
|||
Limbic_Region | TimToady - did you see the short exhange I had with audreyt concerning the change in the "nature of the list" over say the last 6 months | 18:34 | |
TimToady | yes, I did. I bl more assiduously than even Audrey. :) | 18:35 | |
miyagawa: no, I hadn't. thanks. | 18:36 | ||
miyagawa | doitashimashite. | ||
dduncan | anyway, I have a few questions or discussion points that I'm not sure whether I should bring up here or on p6l | ||
maybe here first | |||
to setup a context, this has to do with my Rosetta relational DBMS project ... | 18:39 | ||
18:40
weinig_ joined
|
|||
dduncan | my current plan is to have its native interface language look like or be Perl 6, since in large part Perl 6 seems to include all the relational algebra operators or close analogs to them | 18:41 | |
18:41
FurnaceBoy_ is now known as FurnaceBoy,
weinig_ joined
|
|||
Limbic_Region | TimToady - at the risk of opening up a can of worms - what is the current process for marrying Parrot with Perl6 (IOW - what is being done to ensure Parrot supports the language) | 18:42 | |
lichtkind | TimToady i even read english books but some native phrases are still new to me, would you say that the way perl springs directly from your christian attitude or was it just christian to release it so does everybody else could use it too? | 18:43 | |
Limbic_Region seldom sees the VM camp agreeing with the language camp | |||
ayrnieu | you don't have to preface wormcan-opening with "at the risk of". If worms are freed, you can just say "I *knew* that this would happen!" | ||
dduncan | or initially, I will have the language be a very small subset of Perl 6 grammar and would parse it myself, so I have something which can be implementable in multiple languages and/or translatable/mappable to multiple languages | ||
eg, all operators would simply be prefix format with parens around their arguments | 18:44 | ||
TimToady | Limbic_Region: I think once we get Perl running on top of Parrot in *any* form, there will be plenty of pressure to reduce any impedance mismatch between Perl and Parrot. | 18:45 | |
dduncan | a very simple grammar is easy to make a simple parser for | ||
TimToady | so I'm not too worried about "Parrot supporting the language". | ||
Limbic_Region | ok - fair enough | ||
I am just concerned about the number of things that have been relegated to the VM - coroutines, threads, async io, etc | 18:46 | ||
well, concerned is probably not appropriate there | |||
ayrnieu | (audreyt seemed keen in her perlcast about multiple implementations, however, so 'parrot supporting the language' may also have the pressure of 'this specced thing works /over there/'.) | 18:47 | |
Limbic_Region decides to shut up | |||
TimToady | lichtkind: I'd say both of those are true, for some definition of "christian". certainly there are a lot of people who would claim to be christian who behave differently, but to me, I see a God who simultaneously can have a central plan but also likes a lot of diversity around the edges. | 18:48 | |
Limbic_Region takes refuge in the fact that smarter people then him are handling it | |||
dduncan | but I also wanted to make it such that one could essentially code things in plain native perl 6 such that it looks and works about the same | ||
er, I'll come back to this another day, when I actually have documents to show | |||
TimToady | dduncan: okay | 18:49 | |
dduncan | or maybe I'll still ask a few questions | ||
1. part of the perl 6 design is that one can make custom grammars for the language itself ... | 18:50 | ||
if I wanted to restrict things in some way, such as say that one can only code using strong data types, can I do that? | |||
I prefer to push some kinds of checking to compile time, so I don't have to check at run time that pieces are giving each other valid formatted data | 18:51 | ||
TimToady | you can do anything you like with a given lexical scope. | ||
dduncan | 2. to clarify, it is now possible to have multi-member hash keys, so I can look things up by, say, 2 or 3 distinct values rather than one? | 18:52 | |
I thought I saw something like that in S9 | |||
TimToady | it's just that, the more you diverge from the expectations of the naive programmer, the less they'll understand your code without studying up for it. | ||
%foo{slice1; slice2; slice3} is allowed, where each slice is a lazy list. | 18:53 | ||
dduncan | eg, %foo{'bar','baz'} = 17; | ||
TimToady | You'd have to use >>=<< to set them all. | 18:54 | |
dduncan | and $quux = %foo{'bar','baz'}; # contains 17 | ||
TimToady | or have a pragma that turns all binops into hypers. | ||
you're confusing , with ; | |||
dduncan | yes | 18:55 | |
TimToady | ; separates dimensions, comma only separates list items. | ||
dduncan | sorry, I wrote that before seeing your previous line | ||
TimToady | but yes, with ; that should work. | ||
dduncan | for context, I want to have a data type that is like a Relation | ||
TimToady | it might be naively implemented as %foo<bar><baz> | 18:56 | |
but you can declare multidimensional containers. | |||
dduncan | now, the nature of a Relation is that you can have multiple keys over the same data | 18:57 | |
lichtkind | tim toady mille gracie (1000 thanks) thats exactly how i felt about it but you know, i cant write it if i cant quote you on that. personally i also believe in god and agree with you in most things, maybe thats why i like perl but i always have problems with christians when it comes to the interesting questions :) | ||
TimToady | lichtkind: yes, well, the interesting questions are of the form "what's really at the center?" | 18:58 | |
dduncan | eg, for a person relation, one attribute social security num could be a key, and in limited senses, a name could also be a key; those don't overlap | ||
TimToady | dduncan: go on | 18:59 | |
dduncan | if a hash is like a key, its like multiple hashes that have common values, and adding a value to one adds it to the other too; this hash multiplicity being encapsulated in the one relation container | ||
TimToady | or like a single hash that the first dimension selects the "real" key underneath. | 19:00 | |
dduncan | a proper relation definition is a set of distinct tuples that all have the same set of attributes | ||
everything is addressed by name, not ordinal position, like a hash | |||
the name being a key value when selecting tuples from a hash | 19:01 | ||
the name being the attribute names when selecting what people call columns in sql | |||
TimToady | right. so you'd kind of like %hash{index; key} to let you have multiple entries be the same entry under different indexes. | 19:02 | |
dduncan | in a way, yes | ||
except that you first specify which index set, and then which values in it | |||
and each index may have different numbers of values in it than others | 19:03 | ||
TimToady | right, the type of the subsequent dimensions varies depending on the index | ||
dduncan | and the values are each like hashes themselves | ||
lichtkind | tim toady thats easy in the center is loving consciousness i ment more the intelectual interesting questions like was abraham visited by aliens and like that, but i wont be here too OT | ||
dduncan | aka, each value is a tuple | ||
I don't know whether it would be easiest for me to just define a perl 6 class which provides the functionality I'm thinking of, then show it to p6l for consideration of something analagous being in the language itself | 19:04 | ||
19:04
_bernhard joined
|
|||
dduncan | fundamentally, relations and tuples are basic and very commonly useful types of containers, and something akin to them deserves to be in a full language | 19:05 | |
TimToady | it's usually easier to discuss a concrete proposal that is certainly wrong than an abstract proposal that is of uncertain merit. :) | ||
dduncan | and if so, you could have a lot of people using Perl 6 itself for things they might otherwise use a separate database for | 19:06 | |
TimToady | I agree. | ||
xinming | TimToady: I have a question on accessing kv pair in hash, in perl 5, eg: my %h = (abc => 1, xyz => 2); $h{abc}; <--- here , abc in $h{abc} is acted as a string, will this be changed in perl 6? eg, abc will become a method call instead of a string | ||
TimToady | the definitions in S09 are currently biased toward PDL-think, but if there are places where relational-think are more appropriate, I'm all ears. | ||
dduncan | so I think I will try making a concrete Perl 6 package soon that does what I'm thinking of, and then we could use that as a point of departure | 19:07 | |
TimToady | dduncan++ | ||
dduncan | incidentally, this is meant to be as fundamental as a Set type | ||
and Set is currently a separate package in the Pugs tree | |||
xinming | This isn't discussed in Synopsis. And if it is the same as perl 5, what's the difference between %h{abc} and %h<abc> ? | ||
dduncan | Relation theory is essentially Set theory | 19:08 | |
TimToady | if abc isn't a function that can take 0 args, the first is a syntax error. | ||
or perhaps a semantic error detected when the end of the current compilation unit is reached without a valid definition of sub abc. | 19:09 | ||
xinming | ok, so, abc will be a method call. | ||
oops. function call. | |||
TimToady | abc is abc() | ||
19:10
justatheory joined
|
|||
TimToady | the only remaining autoquoter from Perl 5 is the left side of =>. | 19:10 | |
dduncan | fyi, I don't know if you've heard of thethirdmanifesto.com , but I currently subscribe/incorporate their definitions of what the relational data model is, and not SQL's definition | ||
just to put things in context | |||
TimToady | haven't had a chance to look at it yet, though I've seen your refs to it. | 19:11 | |
xinming | TimToady: Is there a way to make variable name contains space? | ||
or, did you ever consider it. :-) | |||
TimToady | ::<$I am a variable name> = 1; | 19:12 | |
Maybe require a MY on the front... | |||
dduncan | would the $ best go inside the <> or outside it? | ||
cognominal | TimToady, in your postcasted conference, you said that French are reluctant to borrow word. This is half true, this not because the academy sneer at it, or that a minister pass a law that we don't do it. | 19:13 | |
TimToady | depends on whether you're interrogating the symbol table hash or trying to do a symbolic name. | ||
xinming | dduncan: It should be inside IMHO. and $<abc> === $/<abc> | ||
cognominal | you should not confuse the institution and the people :) | ||
TimToady | for the latter, you can do $::("I am a variable name") | ||
cognominal | s/borrow word/borrow words/ | ||
TimToady | cognominal: I think everyone understands that it's just a stereotype. :) | 19:14 | |
dduncan | regarding my concrete example, it may be 1-2 weeks before I produce it, since I have to devote a lot of time to unrelated $job | ||
cognominal | :) | ||
dduncan | but it will come | ||
but I'll keep this example simple, try to | 19:15 | ||
TimToady | dduncan: I don't doubt it. You have the gift of persistence, and I mean that in a positive way. | ||
dduncan | thanks | ||
fyi, I'm actually relieved my OSCON talk wasn't approved, as I would have preferred more time than I would have had for preparation | 19:16 | ||
lichtkind | why is there no ?! | ||
TimToady | um, what is ?! supposed to do? | 19:18 | |
ayrnieu | the ternary operator is now named ?? !! , if you mean that. | 19:19 | |
lichtkind | i know i mean as oposite of ? | ||
xinming | hmm, could we make @array ordered hash? Since, in @a[1], 1 here is something like a key in %a<1> :-P | 19:20 | |
ayrnieu | lichtkind - you mean 'where did the zero-width negative lookahead assertion go?', in regex? | 19:21 | |
lichtkind | nono | ||
TimToady | xinming: certainly. there's no reason you can't have a container that does both Hash and Array roles. | ||
xinming doesn't think that is a good idea for now... :-P | |||
lichtkind | i mean boolean context operator | ||
TimToady | ?eval ?"yes" | 19:22 | |
ayrnieu | you don't like !?"yes" ? | ||
19:22
evalbot_9917 is now known as evalbot_9918
|
|||
evalbot_9918 | bool::true | 19:22 | |
TimToady | ?eval !"yes" | ||
evalbot_9918 | bool::false | ||
xinming | bool:false | ||
s/:/::/ | 19:23 | ||
TimToady | :) | ||
er, ::) | |||
lichtkind | thank again # getting this tut completed | ||
TimToady | ?eval true "You're welcome" | 19:24 | |
evalbot_9918 | bool::true | ||
xinming | ayrnieu: ? means it is bool context, and ! means "not", so, normally ! is enough, If you wish to know which is the same as force a bool context, you can use !! IMHO. :-P | ||
lichtkind | maybe i shoul translate it in english when im done | ||
ayrnieu | xinming - I would hesitate to do that, with ternary syntax. | 19:25 | |
xinming | ?eval !! "yes?" | ||
TimToady | well, Perl won't get confused, it being a term rather than an operator, but a human might. | ||
evalbot_9918 | bool::true | ||
TimToady | but why would you use !! when ? does exactly the same thing? | ||
xinming | TimToady: for your moto, TIMTOWTDI :-) | 19:26 | |
TimToady | TMTOWTDI is how I spell it. :-) | ||
cuz i always write there's | 19:27 | ||
xinming | TimToady: audreyt ever mentioned, that in perl 6, block is not an expression, do you ever considered to changed this? eg: my $a = do if ?right { "right" } else { "nonono" }; | 19:28 | |
19:28
pawel joined
|
|||
xinming | hmm, though, I think, we should declare $a before we use that form. | 19:31 | |
lichtkind | does ~~ impose sting kontext? | 19:32 | |
xinming also doesn't like the parenthesis in method call, as method in xinming's opinion is a kind of sub call. | |||
lichtkind: no, It's smart match operator | |||
lichtkind: ~ is string context. | |||
lichtkind | k thx | ||
xinming | lichtkind: yw | 19:33 | |
TimToady | xinming: how would you want to write a method call then? | ||
19:34
q[uri]_ joined
|
|||
lichtkind | if anybody here can read german, thats the tutorial im writing on: wiki.perl-community.de/bin/view/Wis...l6Tutorial | 19:34 | |
xinming | TimToady: $obj.meth "p1", p2, p3; | 19:35 | |
TimToady | what should $obj.meth + 1 do? | ||
or $obj.meth +1 | |||
or $obj.meth / foo | |||
that's why we put in the disambiguating : (like Haskell $) | 19:36 | ||
so you can say $obj.meth: "p1", p2, p3 | |||
and Perl knows to expect a term after the : rather than an operator. | |||
xinming | ah | ||
thanks | 19:37 | ||
TimToady | yw | ||
q[uri]_ | anyone seen allison around? | ||
TimToady | doesn't generally hang out here. | ||
q[uri]_ | TimToady: thanx. | 19:38 | |
19:38
q[uri]_ left
|
|||
Limbic_Region wonders if allison has a stalker | 19:38 | ||
TimToady | if that was the uri I know, i'd say, no... :) | 19:39 | |
xinming | hmm, what about the my $a; $a = do if ?test { "true" } else { "false" } example? | 19:40 | |
TimToady | should work now if you want $a to end up with a string rather than a closure. | 19:41 | |
dduncan | okay, I have another question | ||
Limbic_Region | oh - I didn't even see the uri in the <q[uri]_> | 19:42 | |
dduncan | is there a defined generic equality operator that takes values as they are and doesn't impose a string or numeric context? | ||
TimToady | presuming ?test really means one thing. | ||
and isn't trying to slurp arguments | |||
19:42
david_ joined
|
|||
xinming | TimToady: hmm, I just mean the test statement. sorry for my poor English. :-) | 19:42 | |
dduncan | eg, where you can say "Any comp Any", and it would return true if the 2 are of the same actual type and are equal within that type? | 19:43 | |
TimToady | but <space>{ at the statement level is forced to be a block regardless of expectations. | ||
yes, that's what === is supposed to do. | |||
dduncan | okay | 19:44 | |
xinming | hmm, what I want to say might be... my $a; $a = loop(;test_statement;) { more_statements; $a }; | 19:45 | |
oops. | |||
my $a; $a = loop(;test_statement;) { more_statements; $b }; | |||
then, $a will be $b when the loop finished | 19:46 | ||
cognominal | For those who read French, in the French GnuLinuxMagazine of April I wrote about the next Sun processor called Mehari that runs MiniPerl6 . rafb.net/paste/results/Bq6ToS88.html | ||
TimToady | we require "do" in front of any statement_control that is to be used within another expr for its value. | ||
otherwise we get ambiguities with statement modifiers like "if" and "unless" and "for" | 19:47 | ||
so you want my $a; $a = do loop(;test_statement;) { more_statements; $b }; | |||
except for the fact that loop is probably going to return the last value of the test statement by default, if it's like Perl 5. You'd need to leave() with an explicit value. | 19:48 | ||
so by current definition that'd have to be | 19:50 | ||
my $a; $a = do loop(;test_statement;) { more_statements; leave <== $b } | |||
but I'm not entirely happy with leave's definition yet. | |||
xinming | hmm, does "if else" needs "leave" for returning a value? | 19:51 | |
TimToady | no | 19:52 | |
doesn't test the expr again at the end of the loop | |||
loops return conditional by "last expression evaluated" rule, but it might be possible to exempt the conditional expr, I suppose. Still, it's ambiguous, and I'd rather have an explicit loop exit if that's what is meant. | 19:53 | ||
maybe "last <== $b" is possible. | |||
or "last :value($b)" | 19:54 | ||
19:57
bsb joined
|
|||
xinming still has 2 questions about perl 6, but hesitate to ask... :-P | 19:57 | ||
FurnaceBoy senses deadlock | |||
xinming | It's about class, I really like the word "is" used in the language... | 19:59 | |
eg: class Foo { has $.a is rw }; so, I like class Foo { method private_one is mine { ... } } instead of class Foo { submethod private_one } :-) | 20:00 | ||
class Foo { submethod private_one { ... } }; | 20:01 | ||
20:08
KingDiamond joined
|
|||
TimToady | xinming: different storage classes work better with different declarators out front. We could do "my $foo is constant", and in fact we used to, but we pulled out "constant" as a declarator when we realized the variable was scoped to the compiler. | 20:11 | |
similarly, "submethod" is something with scoping rules that are both like subs and like methods. | |||
so it's better to pull that out front where it's obvious. | 20:12 | ||
xinming | thanks for your clearly description. :-) | 20:16 | |
my English sucks. :'( | 20:18 | ||
s/clearly/clear/ | |||
lichtkind | thanks for all | 20:19 | |
Limbic_Region | does the bit in S5 about rule matching against non strings (streams and arrays) currently work in Pugs? | 20:22 | |
TimToady | none("clue") | 20:23 | |
xinming | perl is the worst language to learn, and best language to use. :-) | ||
20:23
fglock joined
|
|||
xinming | I don't know if I'm right, But for reading Synopsis, I've learnt a lot. | 20:23 | |
TimToady | I suspect English is worse to learn. I'm still working on it... | 20:24 | |
mugwump | xinming: you mean "hardest", presumably | ||
xinming | mugwump: No, I mean worst | ||
20:24
weinig_ is now known as weinig
|
|||
mugwump | Well, I found it the most fun when I first picked up the Camel book about 8 years ago | 20:26 | |
xinming | It's also a fun when learn perl 5. | ||
dduncan | I also first was introduced to Perl 8 years ago | 20:27 | |
mugwump | must have been "OO nut learns Perl" season | 20:28 | |
dduncan | so the 2nd ed Camel book was my first, gotten then ... it was a course text book | ||
Limbic_Region | dduncan - you can't have been introduced to perl8 years ago | ||
unless of course you are a time traveler | |||
we are still working on p6 | |||
Limbic_Region intentionally misparsed | |||
fglock | kolibrie: ping - sorry, I lost the connection | ||
dduncan | it was January of 1998 to be specific | ||
kolibrie | fglock: pong (I saw it) | 20:29 | |
Limbic_Region | 2002-07-11 for me | ||
yep, I know the exact date | |||
dduncan | I am also fortunate to have started straight with version 5, and not have to deal with <= 4 | ||
Limbic_Region wanders off homewards | |||
kolibrie | fglock: not getting errors any more, but every $match comes back as undef | ||
any ideas? | |||
dduncan | I know the exact date too, more or less ... it was around January 5th, whenever the winter quarter at college began | 20:30 | |
if I look up my course time table, I could know the exact hour too | |||
fglock | kolibrie: can you try a very simple match, like '.'? you can also try using PCR directly (see the pod) | 20:31 | |
pawel | xinming: perl5 was the first programming language i learned | ||
20:31
pawel is now known as pmurias
|
|||
dduncan | it was the computer science program's 1st year networking course (called 'comp 170' locally) | 20:31 | |
kolibrie | fglock: so 'rule anything { . }' | 20:32 | |
20:32
kanru2 joined
|
|||
dduncan | our first homework assignment was to download and install perl 5, so that 'print "hello world\n";' executed | 20:32 | |
fglock | yes | ||
dduncan | in my case, being on a classic mac, it was MacPerl 5.20 or so, embedding Perl 5.004 | ||
so 5.004 was my first version | 20:33 | ||
xinming | I love perl 5, because It has built-in hash, And It is the first language I learnt which contains built-in hash. :-P | ||
pmurias | using perl5 was a pain on Windows, so i always went to my fathers office to program on the NetBSD they used as a server | 20:34 | |
20:34
KingDiamond joined,
claudio_ joined
|
|||
dduncan | while Perl is my favorite language now, and since 1999, ironically I started out strongly disliking it on first introduction because it was so un-strict (I was previously used to Pascal and Java) ... I was surprised that a program containing just a print statement would actually work | 20:34 | |
I ended up failing that course through neglect | 20:35 | ||
then in summer of 1998, I decided to try using Perl to solve a practical problem of text processing, first by rewriting a Pascal program, and from that point I actually started to like it, and then in retaking the course in january of 1999, got an A+ | |||
Perl's been my favorite language since | 20:36 | ||
kolibrie | fglock: hmm, the match on 'anything' returns a match object containing the first letter of the package name | 20:37 | |
fglock: switching to Grammar::rule( $source ) gets the first character | 20:38 | ||
dduncan | er, when I say 'strict', I meant that I was used to programs having all their statements inside functions/ subroutines ... | ||
I couldn't understand how a bare statement outside a procedure could execute | |||
but that quickly became water under the bridge | |||
kolibrie | fglock: now I just will have to take baby steps to build up my grammar | 20:39 | |
fglock: can P::C::R take a whole grammar at a time, or only one rule at a time | |||
fglock | kolibrie: right - the 'old lrep' grammars were not OO | 20:40 | |
PCR only works on single rules, which belong to a grammar (p5 package) | |||
dduncan | and there was that we could just use variables without declaring them | ||
those 2 things | 20:41 | ||
but in my modern Perl coding, I put everything reasonably possible in subroutines and use strict | |||
kolibrie | fglock: so I could read my p6 grammar file rule-by-rule and spoon-feed it to PCR | ||
fglock | sure | 20:43 | |
xinming | dduncan: Most script you see which are written in perl without use strict IMHO is all modified after use strict; debugging is done. :-P | ||
pmurias | i used to write my programs on paper at when first learning, and only type them in after the were complete | ||
fglock | you can easily write a grammar compiler this way - PCR can emit perl5 code | 20:44 | |
svnbot6 | r9919 | fglock++ | PCR - fixed hash ordering | ||
r9919 | fglock++ | PG-P6 - added a failing test - there is a bug related to expression-parser reentrance | |||
kolibrie | fglock: ok, I'll look at those docs | ||
(probably tomorrow) | 20:45 | ||
20:47
justatheory joined
|
|||
fglock | in the p6 parser - is the bottom-up parser supposed to be used for expressions only? | 20:49 | |
ruoso | fglock, in parrot? | 20:51 | |
fglock, parrot/languages/perl6, i mean... | 20:52 | ||
fglock | in the parser 'as-specced' | ||
ruoso | I always thought it was more implementation-oriented than spec-oriented... | 20:53 | |
fglock | I mean, which parts actually 'need' to be parsed with rec-descent | 20:54 | |
bsb | I thought the parsers overlapped, bottom up for speed, rec-descent for sane error messages | 20:58 | |
21:01
blb30346 joined
|
|||
fglock | bsb: I was thinking about trying to use bottom-up in more places, but I wonder what things it would break (error messages may be one of them) | 21:02 | |
bsb | I don't think there's any limits defined | 21:07 | |
so use it if it works | |||
ruoso | I think the best combination will be the one that is written first... | 21:13 | |
avar | fglock: go crazy with it;) | 21:14 | |
21:15
feng joined
21:16
Limbic_Region joined
21:19
nirgle joined
21:25
david__ joined
21:35
lichtkind joined
21:37
KingDiamond joined
21:38
lumi joined
21:44
frederico joined
21:51
nicbrown joined
21:55
weinig is now known as weinig|out,
bsb left
21:56
fglock left
|
|||
avar | will objects methods in Perl 6 be fairly complete? | 22:06 | |
I.e. | |||
In Perl 5 you didn't have them, and hence you'd pollute the core too much | |||
you you can have lots of object methods which make sense, like they're in their own namespace | |||
one for lists, one for ints, etc. | 22:07 | ||
But Perl 6 should be able to have (2,3,1).max 5.hex, 10.bin(ary) (or something), i.e. a fairly complete set of object methods | 22:08 | ||
@list.uniq @list.top (the "biggest" element, or something) | |||
Has there been some discussion or spec on this? | |||
$cont = $file.read/slurp | 22:09 | ||
TimToady | avar: that's what MMD is all about. You can have a slurp method without requiring the Str class to know about files. | 22:14 | |
avar | TimToady: Exactly, I was wondering if the direction for std Perl 6 would be a fairly minmal set of methods for str, int, num etc (5-10) or "go crazy" in the knowledge that it wouldn't pollute the rest of the knowledge | 22:15 | |
I.e. be about ruby's level in methods per type | 22:16 | ||
or, perhaps a bit higher;) | |||
ruoso | I think this is a point where OO starts getting weird... | 22:17 | |
what if I want to implement a new operation with files | |||
and I dont want to mess with the standard types | |||
open() returns the type that doesn't know about my new operation | 22:18 | ||
and then I have to "decorate" the object | |||
(java does this a lot... every time... it sucks...) | |||
avar | why wouldn't they be compatable? | 22:19 | |
-5.abs => 5, and everyone understands five | |||
Or am I misunderstanding you? | |||
ruoso | maybe | ||
TimToady | -5.abs yields -5, actually... | ||
avar | TimToady: What do you know about Perl, just some random yahoo on IRC | 22:20 | |
ruoso | what if you want a new operation 5.foo | ||
avar | >;) | ||
TimToady | multi foo (5) {...} | ||
avar | ah, because methods call are so high up the presidence table, I was reading about that the other day | 22:21 | |
yes of course | |||
ruoso | so... foo is not part of 5 interface... | 22:22 | |
you just add this feature to it... | |||
TimToady | I seriously doubt the 5 type knows about foo... | ||
ruoso | $foo = 5; $foo.foo; | 22:23 | |
TimToady | the surprising precedence thing right now is that, if we make non-variable $ a unary, $$foo.bar is $($foo.bar). | ||
ruoso: still works, because SMD will fail over to MMD. | 22:24 | ||
ruoso needs to study more on Perl 6 method resolving... | 22:25 | ||
avar | If I want to help with Perl 6 now without it taking up all my life what's my best bet? | ||
writing Perl 6 testcases? | |||
ruoso | avar, the one you have more fun :) | 22:26 | |
nah... actually, that will end taking up all your life.. | |||
22:26
nirgle left
|
|||
avar | writing test cases would be fun;) | 22:27 | |
LeTo | $ perl -le 'print (-5)->abs' | 22:31 | |
-5 | |||
Can't call method "abs" without a package or object reference at -e line 1. | |||
$ ./pugs -e'say (-5).abs' | |||
5 | |||
what's the problem ;) | 22:32 | ||
avar | -> is not the method dispatches anymore | 22:33 | |
It make some kind of anon sub (IIRC), e.g. for (%hash.kv) -> $k, $v { ... } | |||
LeTo | err $ perl -le ... | ||
that was perl5 of course | 22:34 | ||
avar | fleh, failed to see that,) | ||
LeTo | and the second pugs example certainly did work | 22:35 | |
22:35
larsen joined
22:37
broquaint joined
|
|||
LeTo | avar: writing tests is the best start to dig into things | 22:41 | |
avar | What project should I do it for? | ||
aren't there three seperate projs. or something, parrot, pugs ... | |||
LeTo | whatever you prefer | 22:42 | |
projects are distinct now still, and have common parts, increasingliy so (I hope) | 22:43 | ||
avar | no I was hoping for a list of projects and which one was best suted ;) | ||
suited for what I'd want to do;) | |||
and a pony | 22:44 | ||
LeTo | sure but compiler and runtime are separate parts in the perl 6 worldd | 22:45 | |
s/dd/d/ | |||
22:45
Qiang joined
|
|||
LeTo | re pony: this is still seeking a new rider | 22:46 | |
avar | you mean parrot / perl ? | ||
LeTo | the ponie, yes | 22:47 | |
ruoso | there is work going on on languages/perl6 too... | 22:48 | |
and it looks good.. | |||
avar | languages/perl6 is like 300 lines of code | ||
ruoso | avar, that means it will be easier to start playing with it... | 22:49 | |
LeTo | use.perl.org/article.pl?sid=05/12/21/2026205 | ||
use.perl.org/article.pl?sid=05/12/1...amp;tid=33 | |||
avar | They're just switching backends, not programming the whole thing again, right? | 22:50 | |
ruoso | BTW... is it possible to say: Int does MyRoleFoo; 5.foo; ? | 22:51 | |
LeTo | if MyRoleFoo has a method 'foo' that takes an Int invocant, sure | 22:52 | |
ruoso | is it scoped? | 22:53 | |
or just *can be* scoped? | |||
LeTo | it's scoped to the rules of P6 scoping, i.e. whatever you want to achieve | 22:54 | |
ruoso constantly gets even more impressed with all this stuff.. | 22:55 | ||
LeTo | that is - you can scope it to any(global,file,lexical) | ||
and class | 22:56 | ||
ruoso | that's a really smart way of re-implementing the "decorator" pattern... | 22:57 | |
ruoso just hates this in the java api... | |||
new LineReader(new Reader(new FileInputStream(new File(name)))) | 22:58 | ||
this is the java way | |||
LeTo | python seems to go that direction recently | ||
ruoso | which one? | ||
LeTo | decorators | 22:59 | |
ruoso | gah | ||
this is a PITA for the programmer... | |||
ruoso is working with Java(arg..) in the last 3 years... he really hates the ultra-verbosity of the java API | 23:01 | ||
LeTo | well, "there's no way to do it" - find some extra syntax ;-) | ||
that was of course py* related | 23:02 | ||
ruoso | heh | ||
fits very well for java | |||
Iterator i = v.iterator(); while(i.hasNext()) { Hashtable h = (Hashtable)i.next(); } | 23:03 | ||
I keep writing this all day. | |||
LeTo dunno java - I like to drink *good* coffee though | |||
above code contains a cast, isn't it | 23:04 | ||
Hashtable h = (Hashtable)i.next(); | |||
that one | |||
ruoso | yes | ||
I just hate it | 23:05 | ||
LeTo | that's just b0rked | ||
ruoso realizes he will use "does" a lot... | 23:06 | ||
LeTo | what does the runtime, when you code '(String)i.next();' for that? # and s/String/*/ - any other dunno type | 23:08 | |
23:09
chovy left
|
|||
ruoso | you mean: "Hashtable h = (String)i.next()"? that's a compile-time error... | 23:10 | |
LeTo | ok - and when (xxx) is user defined? | ||
ruoso | (OtherClass)object just checks... | 23:11 | |
the object doesn't need to change... | |||
it does not change | |||
LeTo | e.g. 'xxx' isa 'Hashtable' | ||
23:11
kanru2 is now known as kanru
|
|||
ruoso | it works... | 23:11 | |
but You can't access any methods defined by xxx | |||
wait... | |||
arcady | btw, the new java lets you get rid of the most common use of iterators | 23:12 | |
ruoso | you mean in "Hashtable h = (xxx)i.next()" | ||
arcady | for(Hashtable h : v) { ... } | ||
ruoso keeps with java 1.4.2 until java is free... | |||
arcady | 1.5 actually is better | ||
fewer casts too | |||
and... it will never be free | |||
ruoso | and what about claspath and kaffe and gcj | 23:13 | |
avar | ruoso: does gcj implement 1.4.2 ? | ||
ruoso | almost... | ||
avar | Cool | ||
does gcj use classpath? | |||
ruoso | yes and no... | 23:14 | |
they're brother-projects | |||
avar | But gcj can't compile normal code without classpath right? | ||
since it's the stdlib | |||
kind of like gcc / libc | |||
... | |||
ruoso | www.kaffe.org/~stuart/japi/htmlout/...spath.html | ||
ruoso is going home^Wto the pub | 23:23 | ||
23:29
lichtkind joined
|
|||
lichtkind | ?eval my $a := my $b := my $c; | 23:34 | |
23:34
evalbot_9918 is now known as evalbot_9920
|
|||
evalbot_9920 | \undef | 23:34 | |
lichtkind | ?eval my $a := my $b; | ||
evalbot_9920 | \undef | ||
lichtkind | ?eval my $a := my $b := my $c; $a = 2; $c; | 23:35 | |
evalbot_9920 | Error: Can't modify constant item: VUndef | ||
lichtkind | ?eval my $a := my $c; $a = 2; $c; | ||
evalbot_9920 | Error: Can't modify constant item: VUndef | ||
lichtkind | ?eval {my $a := my $c; $a = 2; $c;} | ||
evalbot_9920 | Error: Can't modify constant item: VUndef | 23:36 | |
lichtkind | do anybody here know if i can $a := $b := $c ? | ||
arcady | ?eval my ($a, $b, $c); $a := $b := $c; $a = 2; $c | 23:38 | |
evalbot_9920 | \2 | ||
lichtkind | ahh thanks | ||
arcady | you were binding $a not to $b but to the value of (my $b), which is undef | ||
23:39
Khisanth joined
|
|||
lichtkind | arcady why is my $b only a value ? | 23:41 | |
audreyt | because it's a bug, that's why | 23:45 | |
this weekend's GPR (Great Pad Refactoring) should fix that | 23:46 | ||
clkao | hola audreyt | ||
arcady | excellent... now that I think about it it does seem wrong | ||
lichtkind | hello audrey | ||
audreyt | yo | 23:47 | |
final day of $job this week | 23:48 | ||
audreyt is _so_ looking forward to weekend | |||
obra | aw. sad. | ||
clkao | me too, om | ||
obra | <- greedy | ||
clkao | one more day to easter weekend | ||
audreyt | heh | ||
obra: yeah, each $job day so far results in multiple jifty commits and LML releases and whatnot :) | 23:49 | ||
mugwump looks at clock | |||
avar | Maybe you guys will know this (of all people), I'm building a an application at wrk that consists of pure perl modules and (well, will) consist of some XS code as well. Now, my main namespace is Wrk::, I want Wrk.pm to be pure-perl, Wrk/Some/C to be xs etc. Problem is, I can't convince ExtUtil::MakeMaker to properly make my xs stuff if I put it anywhere other than in /Wrk.xs and /lib/Wrk.pm | ||
mugwump | about 4 hours until end-of-week here | ||
obra is optimizing Jifty | |||
avar | I tried putting my XS stuff deeper in the tree and create a Makefile.PL there like perl the interpeter and its stdlib do, but the main makefile didn't pick up on it | ||
audreyt | avar: /Wrk.xs and /Wkr.pm works too. | ||
TimToady | ?eval system q/perl -le '(my $a) = 42; print $a'/; | ||
avar | I know it's possible somehow, but I can't find anything in the docs | ||
evalbot_9920 | Error: No such method in class Str: "&system" | 23:50 | |
lichtkind | audreyt i was that guy at gpw in bochum with the editor in perl i wanted aboriginal to ask you if you have special needs for features because your known to have some extreme programming style :) | ||
TimToady | heh. | ||
avar | audreyt: yeah of course, the point is that I want it in /ext/Wrk/XSStuff.pm/xt etc. | ||
I was trying to poke the perl build process to find out how it was done;) | |||
audreyt | TimToady: you expect otherwise? :) | ||
avar: WriteMakefile(XS => { '/ext/Wrk/XSStuff.xs' => 'XSStuff.c' }) | 23:51 | ||
arguably there should be a cc_xs_files() or xs_files() command in Module::Install to do that for you | |||
TimToady | works in my pugs, and prints 42. | ||
audreyt | TimToady: right, it's just the bot has safe mode on. | 23:52 | |
TimToady | I just find it odd that system doesn't exist at all. | ||
avar | audreyt: That'll work for doing that? | ||
audreyt | avar: I think so. it's even documented in EU::MM | ||
TimToady: *nod* maybe bind it to something that throws an exception? | |||
TimToady | always in favor of more accurate error messages... | 23:53 | |
avar | audreyt: I read about it before actually, but it doesn't explain what it's for which didn't make me relate it to the problem I was having. | ||
TimToady | and even more precise error messages, as long as they're accurate... :) | ||
avar | audreyt: so that'll find stuff in ext/..., xsubpp it to XSStuff.c which'll then get picked up in the compilation | 23:54 | |
cool;) | 23:55 | ||
mugwump | avar: you'll probably need to set the 'C' and maybe 'OBJECT' key, too. I could never get .xs compilation in a sub-directory working, though. best perhaps to use a whole sub-module (ie, dir with its own Makefile.PL) | ||
avar | I tried using a seperate Makefile.PL, but the main file didn't pick it up and I'm not sure how to make it.. | ||
audreyt | TimToady: implemented. testing... | 23:56 | |
avar | ah, there it is;) | ||
DIR => | |||
audreyt | lichtkind: extreme programming has some good ideas... | ||
avar | audreyt: Like testcases;) | ||
audreyt | I'm not sure how/why my style is considered extreme though :) | ||
lichtkind | audreyt i thought more in that way that you handle lot of stuff at once, i dont ment xp literally :) | 23:57 | |
avar | Extreme Programming sounds scary | ||
lichtkind | ok if you have crazy ideas let me know :) | 23:58 | |
avar defenitly so | |||
avar | I always imagine some guy typing after having had 1 litres of coffee when I read it | ||
TimToady | a liter here, a liter there, pretty soon you're talking Real Coffee... | ||
avar is reminded of a Bill Hicks quote | 23:59 | ||
audreyt | or Double Espresso... | ||
avar | "2 packs a day? You pussy! I go through two lighters a day" | ||
stevan | heya audreyt :) | ||
audreyt | with Floating Creams |