Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by stevan on 15 August 2005.
renormalist who writes currently into the journal entries in pugs/docs/journal? Everyone who did sth? I want to mention some progress in emacs cperl6-mode ... 00:08
rafl renormalist: Yes, just journal what you did. 00:09
renormalist k, thx 00:10
stevan renormalist: the journal is written by @autrijus 00:14
which is.. the collective #perl6
if you have a commiter bit, you are a member,.. if you dont have a committer bit, just ask for one :) 00:15
nothingmuch ponders whether to detabify and commit Blondie to pugs, or to keep it tabified and separate 00:16
having tried to edit with spaces today i'm surer than ever that I will never be happy with them =/
stevan intersperse tabs and spaces 00:17
mix it up...
go crazy
nothingmuch dduncan might tell me off
stevan I think you can hold your own,........ stand tall nothingmuch !!! 00:19
defend your right to use a whitespace character(s) of your choosing
stevan is bored and just stirring up trouble
luqui today's conference call meeting notes are online: use.perl.org/~luqui/journal 00:27
I should be doing this every week. If they don't come out some wednesday, pester me 00:28
nothingmuch luqui++ # thanks 00:31
stevan Yuval gets the nod from larry :)
nothingmuch where?
oh! woot!
stevan read the summary
nothingmuch what was it that I was saying?
stevan your like famous and shit
luqui: who is Jesse? 00:32
obra?
luqui yes 00:33
nothingmuch, some of your optimization stuff
nothingmuch under perl -ne what is the name of the current file? 00:34
ah
luqui nothingmuch, $ARGV?
nothingmuch yes, that's it
duh 00:35
dduncan since I was mentioned ... if your text editor is any good, it is easy to configure it so using spaces is equal to or more easy than using tab characters 00:40
nothing wrong with hitting the tab key ... it should just insert spaces
unless your file type actually cares about the difference ... most don't
the point with the spaces thing isn't to force a coding style on someone 00:41
rather, its that when anyone writes something, it appears the same to other people as to them
and its easy to ensure that if it prints or copies into an email without wrapping for you, it will for other people as well 00:42
luqui except that some people like 8-space (or 2-space) tabs
but I can't stand them
dduncan well, do you like 4 then?
luqui yeah 00:43
but those other people don't
dduncan a lot of people do, and for the rest, its a happy medium
nothingmuch dduncan: my only grudge with spaces is that in a tabbed file when I click in the whitespace to the left of some text and type a tab i get one more indent level, and if i type delete I get one less
with spaces I have chaos
luqui anyway... I guess I kinda wanted to say this to damian...
dduncan easy enough for people with bad eyesight to see that there exist indents, and room enough to have many indent levels 00:44
luqui the "correct" tab setting is "it doesn't matter"
what matters is getting code in there, and writing it well
nothingmuch people who can't see 4 spaces sure as hell can't tell apart one bit of perl from another
if 4 is not enough white perl is probably just a dodgy mess of black
luqui (or rainbow if you use vim :-)
nothingmuch yes 00:45
nothingmuch does
dduncan 4 spaces is relatively easy to see, its the 2 spaces that is hard to see
nothingmuch 2 spaces is such a silly indentation
luqui 2 spaces works for languages where you have to indent really deep often
dduncan 4 is a happy medium that is easy enough to see and has space for many indent levels
luqui which is none of them...
(Java sometimes makes you go pretty deep)
renormalist 2 spaces is useful, when u try to keep within 80cols limit 00:46
luqui 4 spaces is fine in an 80 column limit
dduncan I've found I haven't had to indent more than 6-7 levels inside any function; usually I don't go beyond 3-4 levels
luqui you just need to abstract to the left of your screen more
I consider it a feature :-)
rafl Is the built process currently broken? (r7009)
nothingmuch 5 is the silliest i've seen though
dduncan as it is, 4 spaces is the recommended size
coral once i ran into a 2MB file at 8 spaces that shrunk to 400K at 1 space
luqui dduncan, recommended by who?
coral numbers estimates
stevan if you are indenting more than 2-3 levels, you need to refactor, IMHO that is 00:47
dduncan recommended by Damian, and recorded in the Pugs documentation
luqui stevan, right, agreed :-)_
stevan so left side should really never be an issue
luqui ahh. screw Damian. Have you seen his code?
anyway...
stevan luqui is still bitter over the "MMD thing"
dduncan that book is a compilation of many people; Damian is just the compiler
luqui like I was saying, style isn't important; it's the code itself. So I'm going to shut up.
stevan, no, I'm still bitter after finding bugs in Parse::RecDescent and trying to fix them 00:48
stevan luqui: style does become important with multiple developers
dduncan my main point is that, within each file, one should be consistent
stevan dduncan: consistency is hard in a project like pugs
luqui stevan, hmm, I guess I can see that. Can you give me a good "because" though?
stevan I give you credit for trying to bring it here
nothingmuch stevan: i'm also bitter.. Class::Delegation was *NOT* readable 00:49
stevan luqui: it is more important in non-OSS situations
at $work
luqui stevan, how so? (/me has never worked in a strict non-OSS situation)
dduncan if you want to judge someone by their code, you should mainly look at their newest code, not stuff from 10 years ago etc
nothingmuch how would one detabify a source tree in place?
dduncan people improve over time, including me 00:50
luqui except for that Java job I had over the summer with the project manager who didn't trust version control so had very strict policies on bug free code and I ended up doing basically nothing as a result
stevan if you hire someone new,.. they should be able to read the code and "get" it without having to figure out which developer wrote which bit, etc
dduncan nothingmuch, "search and replace"
nothingmuch hah
stevan consistent style helps that
nothingmuch dduncan: eech
find | xargs perl -pi.bak -MText::Tabs -e '...'
dduncan or, perltidy
stevan *cough* unix snob *cough*
Command-Shift-F 00:51
search and repleace over a project
dduncan "search and replace" does the grunt work, but I look at it while doing so in case there are any funny things for manual correction
stevan then click the "use regexp' checkbox
luqui dduncan, newest code, like Getopt::Euclid?
go take a look :-)
dduncan that function also has a "replace all", where you can do it file-wide in one click ... or with some editors, source tree wide in one click
use regexp is useful for non trivial things 00:52
I've used it many times
luqui stevan, I don't really get it. I can read code whether they use cuddled ifs or not... 00:53
dduncan the point is, detabbing or entabbing can be a mostly automated task, just one or two commands to redo the whole file
nothingmuch damian's fuinctions are too big
luqui (I should rephrase, I *can't* read code whether or not they use cuddled ifs, because I'm not a very good reader)
stevan luqui: but you are luqui
nothingmuch my guess at Getopt::Euclid::import is around 150 lines
luqui look at convert_to_regex
stevan luqui: it's all about saving the $$ for the boss
luqui I guess so
luqui doesn't want to be a commercial programmer :-( 00:54
nothingmuch dduncan: i don't trust perl tidy
dduncan I have to go outside and gather fruit while its still daylight, so will backtrack IRC then
stevan luqui: its not so bad when you get to set the rules ;)
dduncan nothingmuch, I've never used perltidy, but will be doing so tonight
luqui dduncan, be careful
and watch your aligned assignments begone
dduncan of course, I'll go over the result very closely to confirm all's still right with the world
nothingmuch was happy with expand... only problem is that i forgot to set tabstop to 8
so i retabbed, and then detabbed at 4 00:55
dduncan now, how easy was that?
nothingmuch find . -type f | xargs perl -pi.bak -MText::Tabs -e '$tabstops = 4; $_ = expand($_)'
luqui nothingmuch, there's also stuff you can do with vim to make it delete over four spaces at a time like tabs do
nothingmuch easy
luqui (only on alignments)
nothingmuch but it's annoying to edit
dduncan luqui, I've little used aligned assignments until now, but I'll be doing more of that after I perltidy
stevan has just fallen in love with "local" 00:56
nothingmuch luqui: i can't have that mess
luqui stevan, how come?
nothingmuch it makes me confused about what's really in the file
stevan: what local?
luqui nothingmuch, come to think of it, I don't like it much either
it's never correct about how much I want to indent...
stevan luqui: I just realized I can use it to rebind $?SELF and $?CLASS
luqui yumck
:-)
stevan and remove a bunch of code
and other not-so-nice bits in the metamodel
nothingmuch stevan++; # yes, local is very nice if used correctly
stevan shaved a couple seconds off the test run already 00:57
luqui has only used it once, to override a predefined data structure in PPI
stevan local++
pasteling "nothingmuch" at 82.81.247.180 pasted "i need to teach svk about boring files" (6 lines, 175B) at sial.org/pbot/13111
nothingmuch hah
stevan luqui: this is probably the first time I have ever used it in 3 1/2 years of perl programming
nothingmuch uses it quite often to do evil stuff
luqui :-p
nothingmuch how would I make svk forget all those files really quickly? 00:58
stevan revert?
nothingmuch yup
stevan thats svn talk ,... but I assume it works in svk
nothingmuch thanks
stevan just started using svk himself
nothingmuch okay, checking in 00:59
stevan what?
nothingmuch Blondie 01:00
blammo 01:01
svk is working really hard =/ 01:02
rafl can't get svnbot to join #perl6 again. :-( 01:03
stevan happily removed ~75 LOC and praises local once more
nothingmuch que es head rev?
oh nevermind, it finished
rafl No, the revision that worked for the last weeks. I don't know the exact revision.. 01:04
It connects, but it doesn't receive commands.
nothingmuch actually meant "what is the current head revision" ;-)
svn.openfoundry.org/pugs/perl5/Blondie/ 01:05
rafl Oh :-)
nothingmuch it's even slightly documented
as for tomorrow: search.cpan.org/~ingy/Inline-0.44/C...#Evaling_C
i will have a go at compiling down to C
01:37 sleepster is now known as typester
rafl Is there something like Data::Dumper available for pugs/perl6 now? 01:44
luqui .perl 01:45
rafl Yes, of course. duh.. 01:46
Someone should work on an XML::SAX implementation. That would be cool.. 01:47
luqui doesn't know what XML::SAX is 02:02
rafl luqui: search.cpan.org/~msergeant/XML-SAX-0.12/SAX.pm 02:08
xinming_BeiJing hmm, anyone here can help me figuring out a problem related on network please? Or just give me a clue on where to ask... 03:57
buu I WILL MOCK YOU WITH EXCESSIVE SCORN AND DERISIION
Supaplex and I'll just fill in the balance
xinming_BeiJing ... 03:58
buu SPELLED CORRECTLY.
Supaplex problem solved! 04:06
buu Excellent.
xinming_BeiJing hmm, so, anyone here can give me a suggestion on how to "test" the NIC is ok??? 04:10
This is Laptop I bought about 3 days ago... I want to know if the problem is caused by the bad "NIC"... 04:11
Please help. :'(
buu No.
chriskk how do you install a CPAN module such as CSV without terminal access? 04:12
buu Pray to jesus.
chriskk I'm trying to set something up on a shared hosting provider
buu: did that already 04:13
buu Sacrifice a goat?
chriskk hehe, not yet
dudley chriskk: you might want to ask in #perl 04:14
chriskk doh
thanks
spinclad ?eval my $x; undefine(\$x); $x.perl 05:44
evalbot_7016 Error: Can't modify constant item: VRef <Scalar>
spinclad ?eval my $x; undefine($x); $x.perl
evalbot_7016 '\\undef'
spinclad ?eval my Int $x; undefine($x); $x.perl 05:45
evalbot_7016 '\\undef'
05:45 davidra is now known as jp-autark
spinclad ?eval my Int $x = 0; undefine($x); $x.perl 05:45
evalbot_7016 '\\undef'
luqui goes to bed 06:13
nothingmuch ciao luqui 06:18
brentdax Is it reasonable to say that Perl 6 has (or "might have") the richest object system since CLOS? 06:21
Detonite Ah. There we are. 06:41
nothingmuch hi! 06:47
welcome aboard
Detonite Hey [nothingmuch] :)
Oops, used to the brackets. 06:48
nothingmuch first step is '$svn_client = "svk" || "svn"; system($svn_client, "co", "svn.openfoundry.org/pugs");'
Detonite I will probably be lurking here a lot to see what's going on
07:07 Lopo_ is now known as Lopo
Detonite thinks he gets it (finally) 07:16
Gah, I hope I didn't break anything. 07:32
integral @eval "hope so" 07:36
?eval "hope so" 07:37
evalbot_7017 'hope so'
Detonite hides
07:39 Aankh|Clone is now known as Aankhen``
Detonite Can someone verify that? 07:42
GeJ Detonite: what was the r7017 about?
Detonite GeJ : I don't know, I didn't invoke it. 07:43
GeJ seems like you added a bunch of files 07:44
Detonite Yeah, that's what I was afraid of. 07:45
I don't know how they got there, my attempt was to get a copy of what was there.
I must've misunderstood the user manual.
GeJ Maybe someone can revert your commit if you don't feel like removing the files yourself 07:46
Detonite Let's see, I created a folder, made it into a repository, authenticated and imported.
GeJ : I'd love to remove them, but at this point I'm not so sure as to how, I might break something else ;) 07:47
GeJ I ain't no svn expert but from what I can see it's only about new files and directories
for your information : rt.openfoundry.org/Foundry/Project/.../?rev=7017
those are all the files and dirs you created in the repo 07:48
Detonite Yes, I see them.
They should be gone now. 07:49
Right. I'm staying the heck out. 07:50
GeJ looks good. Anyway, I think it's a pretty lame way to get "Detonite++"'s if you ask me ;) 07:51
gaal morning!
GeJ morning gaal!
Detonite GeJ : Can you elaborate? I'm not following. 07:52
gaal how do I get at the current parser state from a Prim?
GeJ Well, after each commit in the repo, there's a bot claiming: "commiter++ | commit message.... ". 07:53
gaal ie what's the pugs equivalent to perl5's PL_compiling?
Detonite Ah. Well, it wasn't intended. Apologies for the trouble.
GeJ I can understand that you want the girls and the money from the fame of being part of pugs, but creating bogus files and then removing them just to get two "++" in the commit list. Well, you won't get any girls like this, son! ;) 07:54
Detonite Rats.
I'll just get coffee then and figure out what I did wrong. 07:55
Thanks for the help.
brentdax Detonite: If it makes you feel any better, when I first switched to SVK I accidentally checked in a copy of the entire source tree in a new subdirectory of the repo. autrijus deleted it for me. 08:03
Detonite Eek 08:04
I didn't even expect to have the ability to modify anything. 08:05
brentdax It looks like you checked in the files making up your SVN repo...
Detonite I thought so, yeah. 08:06
brentdax If you gave it a login, you would be able to add stuff.
(So that's what an FSFS repo looks like...interesting.)
Detonite I thought I removed them?
brentdax You did, but if I ask to look at revision 7017 specifically I can still see them. Nothing's ever really deleted from a Subversion repository. 08:07
Detonite I figured. Okay.
I am going to try to checkout now. 08:08
gaal any lambdaheads about? 08:09
integral hmm? 08:12
gaal hey. i'm implementing lexical pragmas, and there's a nice interaction i need between perl code and the parser for it to work. 08:13
from a Prim (that only ever gets called in a BEGIN block), how do i influence something in the praser? 08:14
*parser
integral hmm, I have no idea. You probably need to look at how BEGIN blocks, and sub's themselves are implemented 08:15
Detonite Um, I'd like to make sure of something...
According to the manual (TortoiseSVN) it says that, if I want to obtain a local copy, I should check out. Ok. So I created a folder, and checked out. Now I am unsure if anyone would experience negative sideeffects because of that? I don't trust this one bit. 08:16
integral people shouldn't :-/ A checkout just writes the current versions of the files into a directory 08:17
gaal code in BEGIN doesn't influence the parser state much, although it can somehow communicate with it: if you do BEGIN { exit } the parser knows it oughta terminate.
hmm, maybe i indeed should do something like that - 08:18
Detonite integral : Ok. What would be the preferenced way of browsing around?
integral gaal: I think it uses unsafePerformIO to lift the Eval monad into the parser
Detonite: umm, checking out should be no problem
gaal integral, can you help me understand how the VControl thing works?
Detonite Ok. Load off my mind. I was afraid I had accidentally locked the current version repository or something.
integral gaal: I don't know anything about VControl, sorry 08:19
gaal seen autrijus
seen iblech
bots are out? :(
thanks, integral!
okay maybe you can help me just figure this thing out: 08:20
Parser.hs, line ~921
possiblyExit
how come its argument is (Val (VControl (ControlExit exit))) in the case you want to exit? 08:21
integral the unsafeEvalExp is the key
gaal oh, i get *that* bit: from the parser TO Eval
it's the other direction i don't understand :)
because this:
integral (Val (VControl (ControlExit exit))) must be the syntax tree produced by a parse for exit
gaal BEGIN { 2+4; exit }
also works
but possiblyExit isn't run on every node, is it? 08:22
integral hmm, no, and it's not recursive either
gaal it doesn't look like it is - it looks like it's runon the result of the BEGIN block
whihc of course would be wrong
integral I think it's put whereever something might exit, per statement, maybe
gaal but pugs does behave correctly. 08:23
the only caller of that function is ruleClosureTrait, and i don't see where it iterates over statements 08:24
integral hmm, well it's run on the result of checkForIOLeak 08:26
hrm
gaal oh i think i maybe sorta understand. it's run on the whole block 08:27
and op1Exit stops the execution and returns a VControl . ControlExit 08:28
integral ah
gaal with some continuation voodoo :)
so the signalling is with a return value that's out of band for regular perl returns
which is clever, but not useful to me, because i don't need to be signalled, i need to be called immediately i think. 08:29
this is a transgressive feature! 08:31
it'd be easier to write if "use" were separated into "apply pragma" and "load module" keywords; and "apply pragma" could only install one value at a time. 08:41
because then the rule for pragma could just install the reduction of the value returned by the pragma init hook. 08:42
nothingmuch can anyone translate the latest mail from openfoundry? 09:42
Detonite_ Heh, yeah, I wondered what it meant too. It looks like some kind of contest.
gaal does anyone have a link to brentdax's email about lessons learned from Kontent? I've misplaced it 11:25
nothingmuch ingy: ping 11:29
www.vidarholen.net/contents/wordcount/ 11:40
gaal "A word is counted if it appears in any context, even if part of another word": lame. didn't they hear of \b? 11:44
wolverian BTW, MS's .NET regexes are apparently really close to Perl's. that's pretty nice. I haven't seen any difference yet, in fact, except for named captures. 11:45
anyway, have to go now to get some coffee. :)
gaal no doubt they adapted PCRE? 11:55
Limbic_Region cool luqui started a journal and has put like - stuff in it 12:06
Juerd gaal: PCRE is GPL, is it not? 12:48
Oh, it has its own license 12:49
gaal it's BSDish. 12:50
Juerd Yea
gaal oh, interesting: Google contributed c++ wrapper code to it. 12:51
Yay, no more compilation errors on my machine. Replacing the CPU helped :-)
Detonite_ That's some drastic measures :)
gaal Yeah, GHC was really harsh :) 12:52
Detonite_ Dunked in a heavier CPU while you were at it?
gaal How warm is it okay for a cpu to be? Maybe the fan sucks. 12:53
Juerd Depends on the cpu type
gaal Nope, it was under warranty. It's not a bad CPU
Detonite_ Eh, 60 degrees centegrade is acceptable AFAIK... I wouldn't make it much higher.
gaal Pentium 4 Prescott 3GHz
Detonite_ But that's personal pref.
gaal it's under 50 now.
Juerd gaal: Should easily be able to go up to 70 or even 80.
Detonite_ You should be fine. 12:54
gaal good, next time i make clean i'll see if it rises :)
does windows call HLT?
wow, with ghc working it goes to 62. 12:55
I'm giving a talk about p6 today intended for p5 programmers. what's your favorite "this code looks better in p6" example? 12:58
nothingmuch makes some lame attempts at statically tyyping a Blondie AST for the PIR and C runtimes 12:59
Detonite_ Eh, I dunno, I just got here :S but any chance that talk can be read or streamed somewhere?
nothingmuch i intend to make the thunk side of each app return the context it enforces (This trickles all the way down to the prims - everything else is pass through)
Juerd gaal: 62 should still work well 13:00
nothingmuch when the rvalue type of an app param is != the lvalue type of the thunk it applies to, an App( Coerce(... ), RValue ) is put instead of the RValue
Juerd gaal: Do note that CPU temperature isn't the only important thing. Very often, chipsets get overheated
gaal: They're active at the same moments, so it often looks like a CPU problem.
nothingmuch higher order functions are not yet taken into account though 13:01
gaal ACK.
Detonite_ SYN
gaal Detonite_, don't think so. Also the talk isn't going to be in English :) 13:02
sorry :)
Detonite_ What language will it be given in?
Juerd gaal: But you know both languages, *hint*
gaal Hebrew, as this is for our local Israel.pm meeting
Detonite_ Ah, that would be difficult.
Detonite_ inquires for translation possibilities 13:03
gaal heh :) well, the talk isn't advanced: it's targeted at coders who might be scared of learning a new language
also i tend not to put the brunt of my stuff in the slides 13:04
Detonite_ waves. Exactly! over here :)
gaal but we'll see
Detonite: come to YAPC::Israel :)
Detonite_ I hope to make it to YAPC::EU , Israel will be somewhat more complicated to attend to :) But good luck with that talk. 13:05
gaal I haven't decided what I'll be talking about there yet, but this kind of thing is one possibility
also, P6 for managers (we're looking into inviting "the industry"
)
Detonite_ Heck, Haskell tried to fry my poor brain as it is :)
nothingmuch oh, i see how it can work
type object does Eq 13:06
if it's != a coercion node is inserted
coercion can only happen if the type is naive
naive types are for data
complex types are for functions
gaal ?eval my %h = <1 2 3 4>; for %h.kv -> $k, $v is rw { $v *= 1.11 } 13:14
evalbot_7018 Error: Can't modify constant item: VStr "2"
gaal can't i alias into the hash?
that looks like a bug to me. 13:16
Juerd Sure does 13:25
?eval my %h = 1..4; for %h { .value *= 1.11 } %h.perl 13:26
evalbot_7018 Error: Cannot cast into Array: VRef <Hash>
Juerd ?eval my %h = 1..4; for %h { .value *= 1.11 }
evalbot_7018 Error: Cannot cast into Array: VRef <Hash>
Juerd Array?
What array.
There's no array there.
?eval my %h = 1..4; %h.perl 13:27
evalbot_7018 '{(\'1\' => 2), (\'3\' => 4)}'
Juerd ?eval my %h = 1..4; %h.pairs
evalbot_7018 (\('1', 2), \('3', 4))
Juerd ?eval my %h = 1..4; list %h 13:28
evalbot_7018 {('1' => 2), ('3' => 4)}
Juerd Weird inconsistenc representation of pairs, but otherwise it looks sane enough
?eval my %h = 1..4; for %h.pairs { .value *= 1.11 }
evalbot_7018 Error: Can't modify constant item: VInt 2
Juerd ?eval my %h = 1..4; for list %h { .value *= 1.11 }
evalbot_7018 Error: unexpected "f" expecting ";", statements or end of input reserved word
Juerd Anyway
It's not just .kv that doesn't return aliases 13:29
?eval my %h = 1..4; for %h.values { $_ *= 1.11 }
evalbot_7018 Error: Can't modify constant item: VInt 2
Detonite_ ?eval print "1"; 13:32
evalbot_7018 1bool::true
gaal so, bug, yes? 13:34
pugsbugsing. 13:35
?eval my %h = 1..4; for %h.values -> $v is rw { $v += 1 } 13:38
evalbot_7018 Error: Can't modify constant item: VInt 2
Juerd gaal: The default is "-> $_ is rw" 13:50
(Unfortunately.)
gaal out of compatibility concerns no doubt. 13:52
Juerd Sort of
It should be "<-> $_", which would be the same
But much easier to explain
It's easier to explain that <-> is the default and that $_ is the default, than to explain that -> is the default, and that $_ is the default, and that the default is "is rw", but only when applied on the default as default, and not even on the default when explicitly mentioned. 13:53
gaal heh 13:54
Detonite_ Aieee
Juerd Besides, for @foo -> $foo is rw, $bar is rw, $baz is rw, $quux is rw { ... } sucks
When compared to for @foo <-> $foo, $bar, $baz, $quux { ... }
gaal hmm, that's special syntax just for 'is rw'. why not an "areall" trait-applier? 13:55
but: i must finish my talk :)
Juerd "is rw" is so common that it deserves special syntax. 13:59
In this specific form
gaal if I have submethod BUILD { $class_data++ }, the usual instance initialization isn't hurt, right? 14:12
metaperl Juerd: ping? 14:35
dudley Is the perl.org Pugs repo down? 14:38
I just noticed that I haven't gotten RSS updates for the last few commits
The repo is up, but it's about 5 revisions behind 14:41
I miss svnbot, too. I'm way too lazy to do an 'svk log' every 15 minutes. 14:44
Khisanth your irc client does not have scripting capabilities? :) 14:46
dudley Khisanth: Well, it does, but I try to avoid AppleScript if I can. :-) 14:51
Juerd metaperl: pong 14:52
Khisanth hrm I could probably directly use the SVN bindings in the script
dudley It's based on irssi, so I'm sure there's a way to use Perl, too. 14:58
Juerd metaperl: ping :) 15:04
fglock what's the right syntax for (1...).map:( $x, $y ){ $x+$y } 16:11
svnbot6 r7018 | Detonite++ | Removed file/folder 16:13
r7018 | Detonite++ | Accidental add
r7019 | gaal++ | pugsbug test for hash value being readonly even in aliases
r7020 | fglock++ | * journal update - added "Blondie" and an explanation of cperl6-mode
r7021 | iblech++ | * Usual svn props. 16:18
r7021 | iblech++ | * t/operators/filetest.t: Extremely minor cosmetical fixes.
r7022 | iblech++ | * t/pugsbugs/value_alias_readonly.t: Added more tests. 17:06
r7022 | iblech++ | * t/builtins/arrays_and_hashes/{pairs,kv}.t: Added tests that .pairs and .kv
r7022 | iblech++ | returns aliases, similar to what gaal has done with .values.
r7022 | iblech++ | * PIL2JS: Prelude::JS::Keyed: Fixed .values and .kv to return aliases.
r7022 | iblech++ | * docs/journal/2005-09-15.kwid: Noted this in the journal.
r7023 | iblech++ | * t/builtins/arrays/slice.t: Added tests for binding array slices 17:18
r7023 | iblech++ | (@array[1,2] := ($foo, $bar)).
r7023 | iblech++ | * t/builtins/hashes/slice.t: Added tests for binding hash slices
r7023 | iblech++ | (%hash<a b> := ($foo, $bar)).
Aankh|Clone goes to sleep. 19:02
G'night.
20:59 maaaa is now known as TheMaaaa
gaal evening 21:00
fglock hi gaal 21:01
gaal hey fglock!
maybe you have an idea about my parser backdoor? 21:02
fglock ? 21:03
gaal what i need is in the backlog, but to summarize: i need to influence the AST as I am building it, from Perl code that runs effectively in BEGIN -- that is, in an init hook of a moduel
module
fglock I'm looking in the backlog 21:04
gaal i know how it can be done in the c implementation of perl5 (effectively, a global pointer to the parser's data), but not here. 21:05
fglock gaal: I'm probably not the right person to answer this - but I think BEGIN { 2+4; exit } will not be executed during the parsing stage - is this what you mean? 21:08
gaal i eventually figured out the BEGIN { exit } case 21:09
it isn't what i want
do you know how "use" works in perl5? (not meant to offend if this is obvious to you - many lambdaheads here) 21:10
fglock ok
gaal so think of a module that isn't just a module with import hooks: it's a pragma 21:11
code1; use pragma; code2
mindsuck_ Anyone knows where to get kwid2pod? I would like to compile this documentation: perlcabal.org/~nothingmuch/harrorth/
gaal code2 might behave differently than code1, because the pragma influences the interpreter
the feature i'm working on is to make the effect of this lexical, not dynamic or global 21:12
the parser parses code1 (but doesn't execute it), then loads and parses the content of pragma, *and then runs its &import*, and then parses code2, and finally runs code1 and code2 21:13
the idea is to change something in the parser from within &pragma::import, so that when it goes back to parse code2, it knows something it didn't previously know. 21:14
(and to make the scope of this lexical, so that code1; { use SomePragma } code2 is *effectively* a noop --- but i know how to do that already) 21:15
fglock gaal: it would be possible to influence the behaviour after the AST - there will be the optimizer, and the runtime
gaal well, that isn't necessarily enough: consider use strict 21:16
you might conceivably want to generate different AST
or throw a compile error just because a pragma was in effect. 21:17
so i want to implement a Pugs::Internals::install_pragma_value (that may be called only at compile time), that tells the parser something about the pragma's data. 21:18
fglock you would be able to implement "use strict" in Prelude (for example) 21:19
gaal (btw the design for this is all MJD's: www.xray.mpe.mpg.de/mailing-lists/p...00112.html )
integral my only thought was to have a global mutable cell, and during execution of BEGIN you add all the activated pragmas to it, and then once you've run the BEGIN, you get the contents of the cell, and those are used to build the Pragma node in the AST 21:20
gaal integral: okay, how do i do that? :) 21:21
integral s/global mutable cell/TVar/. No idea, but...
during a BEGIN have access to some $?INTERPRETER object with methods to do stuff like add a pragma to the context that the BEGIN itself is in
that interpreter could also give you access to the lexical pad that's being built, and things 21:22
gaal how? 21:23
i mean, sure, i want that
how do i make it?
integral hmm, add some state into the Eval monad to hold the stuff, and then just modify BEGIN to collect it I guess 21:24
hmm, but Eval hides STM I think, so a TVar would work
gaal so it's just add a member to Eval, and add a Prim that asks it? 21:27
integral should be I think
gaal and the code that runs BEGIN, after the actual run 21:28
possiblyExit =<< unsafeEvalExp (checkForIOLeak fun)
does, err, getRuleEnv ? 21:29
integral hmm, not sure, I think unsafeEvalExp might need another variant which returns what the Eval has collected as the pragmas
gaal oh, can it be as simple as returning a list rather than just "Val val"? 21:30
(Pugs.Parser.Unsafe:47) 21:31
integral pair? (Val val, [Pragma]) maybe 21:32
gaal okay, cool. i'll also grep around for how to use TVars. thanks
mindsuck_ Anyone knows where to get kwid2pod? I would like to compile this documentation: perlcabal.org/~nothingmuch/harrorth/ 21:33
fglock mindsuck_: sorry, no 21:36
mindsuck_ :(
fglock wonders if 'state $?STRICT is begin(1)' makes sense or is even valid syntax 21:45
time to leave 21:46
GoCooL i've a quick question - perl6 is the next version of perl, parrot is the virtual machine that produces the perl byte code, pugs - i'm not sure what it is and the perl6 compiler is written in haskel, right?, please correct me if i'm wrong 22:09
gaal parrot *runs* the bytecode produced by perl, but other than that, all correct. 22:10
GoCooL the perl6 compiler produces the perl byte code then i guess and what is pugs?
integral and pugs isn't "the" perl6 compiler at the moment. It's just "a" perl6 compiler (the only one, but...) 22:11
GoCooL so if pugs is a perl6 compiler that produces the byte code, do i always have to convert the byte/object code to an executable (like C, C++) before running them? in other words would i not be able to run a perl6 script directly like so - './perl6_script.pl' 22:16
? 22:18
dduncan I'm now using perltidy for the first time; however, given certain issues with it, I'm thinking of using it mainly in advisory mode ... it is run as usual, creating a copy of the input file with a .tdy extension; I then diff the files and manually make (or copy and paste) the changes that I like ... but in the process, I also figure out how to configure perltidy or tweak my file so that running perltidy produces the result I want 22:19
this all refers to my own programs of course ... I'm not doing this with other peoples' 22:22
integral GoCooL: it's very similar to the Java and python and haskell models. You can of course just have the bytecode in memory and interpret directly from that 22:23
and all the parts can be compiled into one binary
GoCooL thanks, that sort of makes sense, any links that maybe explains this entire process in detail? 22:27
integral hmm, I think there's a pretty picture... 22:30
hmm, can't find it though
integral & 22:31
dudley GoCooL: www.pugscode.org/images/simple-compilation.png 22:32
There's the pretty picture
GoCooL sweet, thanks, i'll mess with it before i get more questions! 22:34
dudley GoCooL: I had to lurk for about a month before I started to get an idea of what was going on :) 22:35
GoCooL makes me feel a little better because the picture apart from being pretty, to be honest does not make much sense as of now, but i'll investigate more 22:38
dudley GoCooL: I had a hard time until I realized that Pugs, Perl 6, and Parrot are not really different faces of the same, but three entirely different projects. 22:43
GoCooL so is Pugs a Perl6 compiler or interpreter?, godddd my head is reeling with confusion! 22:48
dudley GoCooL: both.
Pugs compiles Perl 6 code to an intermediate form called PIL 22:50
which can then be interpreted by one of the various backends. 22:51
I tend to think the distinction between compiler and interpreter is pretty artificial anyway, but that's a different conversation altogether. 22:52
:)
But one of the backends is the Pugs backend, which (like the compiler) is written in haskell. 22:54
gaal are you familiar with how java does it? 22:55
think of perl as a jre that's actually a jdk
so that you can compile more code as you go
this is actually true for perl5 as well - you can do "eval" after all 22:56
but you can see that the jre and the javac don't have to be the same OS process, and there's no immediate reason why they should be written in the same language 22:57
a compiler, purely, is just a function from one string (source code) to another (object code, in x86, bytecode, whatever)
though in dynamic languages you can access the compiler from the runtime. 22:58
bbl
GoCooL 'access the compiler from the runtime' - that is achieved, as u mentioned, by eval, right? 22:59
so from what is said here and also the docs, i gather that 23:00
PIL is the intermediate code produced by the parser called the Abstract Sytax Tree 23:02
is that right or am i wayyyyyy off?
and the AST is then processed by the compiler into the object/byte code 23:05
so if that were true, pugs does the equivalent of the parser and the compiler 23:06
i wonder i'm making any sense at all
dudley You've pretty much got the idea. 23:11
GoCooL ok
dudley pugs does the whole thing, parser, compiler, and interpreter 23:12
luqui is willing to work on MetaModel.hs and MetaModel.scala now (more the former than the latter; I have to learn Scala better) 23:43
dudley cool! 23:44
I'm learning Scala better by playing with the metamodel :) 23:45
but it's a lot more fun to port Haskell->Scala than Perl5->Scala
luqui really? 23:46
is the metamodel really that perl5ey?
dudley I'm just not a perl5 programmer
luqui ahh
where is the most recent metamodel? 23:47
dudley perl5/Perl6-Metamodel2.0 23:48
That's the one stevan's working on right now
luqui it's... um... teeny
no it's not
it's just in a bunch of .pl files. wtf? 23:49
dudley You kind of have to look through it to get it.
It's a sequential bootstrapping process, and at the end you get a metamodel 23:50
luqui likes the .pl names
dudley Yeah, me too. Guess who came up with that...
luqui you? autrijus? 23:51
dudley autrijus sketched it out in src/PIL/MetaModel.hs
luqui ahh
dudley Causing a run on the gnosticism page on wikipedia, I'm sure
(I know I had to look them up) 23:52