Run Perl6 Now! | pugscode.org ('Overview', 'Journal') | pugs.kwiki.org | chan now logged: xrl.us/e98m
Set by theorbtwo on 28 February 2005.
ingy you can embed other formats in Kwid 00:00
buu_ I see.
I'm going to break your kneecaps if you don't start putting documentation in a single directory 00:01
Oh. I see.
You have .verbatim and .list 00:02
ingy and .comment 00:03
buu_ Right
.anything
ingy hmmm 00:04
.list is really special though...
buu_ What is up with just using .list to indent text paragraphs?
That doesn't sound good
ingy where?
buu_ ".list" 00:05
starts a region specifically for the generation of a list
or for indenting (groups of) normal paragraphs
markup defining presentation -- 00:06
Add .Formatted to your example so I understand it =/ 00:08
ingy .list should only be used for lists 00:11
buu_ Well fix the documentation
ingy .indent could be used for general indenting
?
buu_ perlkwid.kwid
I was quoting from it.
"or for indenting.." 00:12
Beyond that the bytecode looks pretty simple. 00:13
Why does * Check out perl.org. 00:15
Generate
=Check out
>h
-perl.org
<h
=.
Specifically, the two urls
ingy the hyper link is a (text, url) tuple 00:16
buu_ It is? 00:17
Oh. Hyperlinks get automatically turned in to that.
Ok
ingy foo.org is short for [foo.org|http://foo.org] 00:18
buu_ I see.
Ok, I think I'm good.
ingy the Kwid link is a (text, resource, section) tuple
buu_ Yeah I got that one. 00:19
ingy [That Thing] is short for [That Thing|/That Thing]
buu_ I see. 00:20
Is that supposed to be a relative link inside the document?
ingy but [thing] is short for [thing|thing/]
buu_ !
ingy it's an optimization!!! 00:21
buu_ hahah
Yeah, but .. .. yeah
Is that based off capitals or spaces?
ingy spaces
buu_ ah
ingy [perlre] vs [Formatting Codes] 00:22
buu_ I'm still unconvinced of the usefulness, but I think I understnad it.
ingy it's what makes sense
buu_ Yeah
ingy to link to an internal section called Codes: [/Codes]
buu_ Right 00:23
And that is the same as [Codes|/Codes] ?
ingy yep
buu_ L33t.
ingy \/3ry 00:24
buu_ heh
ingy I don't get into that detail in perlkwid
that would be in perlkwidspec
buu_ Oh great. 00:25
More complications
ingy which I have no time to write
i don't think perlkwidspec.kwid is warranted
the tests will be the spec for now
buu_ Sure it's not, I'll just ask you every time I have a question
ingy well, umm... 00:26
ingy hides
buu_ ahah
ingy perlkwid fixed
buu_ Hurray. 00:27
svpa I got only 1 question, but its probably a very frequent one asked in here; after all reading i still don't know if its worth learning perl 5 when perl 6 is coming, I mean, will it be easy to adjust to perl 6 when you know perl 5? 00:46
crysflame well 00:51
he left already
hi
your question should be in the FAQ
never seen it asked before
svpa well, I just ordered 'Learning Perl' and 'Programming Perl' from o'reilly 00:52
hope it wasnt a bad decission
crysflame lots of perl5 people are having a hard time adjusting to perl6, but compared to the hell that C programmers will have to go through, perl5 people will have a much better *chance*
after learning javascript i have a much better *chance* at learning java 00:53
it'll still be hell
svpa is there really such a difference?
crysflame but at least i understand a bit of the precursor knowledge and strict typing and so forth
perl6 is a syntax rewrite from scratch
it happens to resemble perl5
svpa heeh :|
crysflame but it's written with perl5 in mind
have you read any perl6 code?
svpa no, but this is my first experience with real programming language (I know PHP thats it :) 00:54
crysflame damian conway wrote a series of Exegesis articles, that show perl6 code and go through it line by line, explaining it.
ingy hi crysflame
crysflame similar articles by randal schwartz for perl5 exist as well
svpa so, its gonna be just a syntax adept, or a code structured adept to perl 6?
crysflame as a perl person, they're much closer in syntax to each other than they are to any language not named perl
well
i dunno 00:55
svpa cause some say perl 6 is still far away....
crysflame you can write things in perl6 that are (Damn Near) Impossible in perl5
ingy svpa: honestly, it will be a good while before you can get a job writing perl6
crysflame perl6 is still far away, for some purposes
for the purpose of running short, useful scripts, it seems to be semifunctional already
pugs is a perl6 interpreter built on a language called haskell
ingy so learning perl5 is probably what you should be doing now
crysflame you don't need to know haskell to use perl6, though.
learning perl5 will make learning perl6 much, much easier
svpa ok ingy like I said ordered 2 books like 10 minutes ago from o'reilly 00:56
crysflame (esp. if you're from a language with strict typing and so forth)
hi ingy
svpa I always wonder, this might be quite off topic but
ingy crysflame: I'm writing t/kwid/parser.t now
crysflame ingy: neat
svpa how do such program languages are born?
ingy I don't know Perl6 yet
crysflame svpa: the RFC process, in this case
svpa cause, you must build it on top of some other language?
ingy so I'm writing it in the syntax I wish perl6 were 00:57
and seeing how close I am
crysflame svpa: basically the perl6 braintrust said "ask for anything you want implemented" 00:59
and then rifled through it, said what they liked and disliked, and so forth
they're still in the rifling process
each Apocalypse from larry wall is precisely the result
ingy can y'all compile src/Context.hs ? 01:12
nnunley What revision? 01:13
ingy head
nnunley I just checked out.
r350 on my side.
It compiled.
ingy I only have r342! 01:14
nnunley Slowpoke. ;)
ingy what is your repos?
I did svn up
I even deleted the file and svn up
and svn log only shows r342 01:15
nnunley svn.openfoundry.org/pugs
ingy wait
do a svn st -uv src/ 01:16
it says 350 342
nnunley Yeap. 01:17
350 342 autrijus src/Context.hs
obra hello
nnunley obra: Hello.
ingy so src/Context.hs is at 342 :P
sucka
nnunley :P
But the tree is at 350. Same deal, different numbers. :) 01:18
Compiles just fine for me.
ingy anyway!, why ENOCOMPILESHITFUCKPISSCUNTTIT
ghc --version ?? 01:19
nnunley The Glorious Glasgow Haskell Compilation System, version 6.2
Riceboy^hGentoo linux.
ingy The Glorious Glasgow Haskell Compilation System, version 6.2.1 01:20
OS X
nopaste.snit.ch:8001/1963 01:21
I fixed it 01:24
I think
committed 01:27
buu Hrm 01:51
my @x=(0..10); my @y=(0..10); print @x<<+@y ? 01:52
hrm 01:53
print @x>>+<<@y; 01:54
Not working =[
Make it worky! 02:11
wolverian hmm, 'my @foo -> $x, $y { ... }' doesn't work yet. 03:12
er, s/my/for/ 03:13
buu Tragic =[ 03:22
ingy hola 03:30
Steve_p hello 03:31
ingy hi Steve_p
Steve_p verizon-- # five hour DSL outage :(
ingy bummer
wolverian buu, agreed. 03:32
buu Hey 03:33
Why doesn't print @x>>+<<@y; work?
wolverian hyper ops aren't implemented yet, afaik. 03:43
buu =[ 03:44
wolverian apparently I have broken my ATI drivers by dropping a book on my stereo amp.
the universe works in mysterious ways.
buu hahahah
ingy :) 03:45
wolverian well, the computer *did* reboot when I dropped that book. now, I have no idea why it did that, since the two machines aren't even connected.
buu Power? 03:46
wolverian well, yes, they both use electricity.
I've been having problems with the lighting in this apartment. I'm going to call in someone to check how flaky the wiring is.
buu IT WAS AN ELECTRICTY EXPLOITY
wolverian a bathroom light is just not supposed to go out. they never did when I was young, I swear. 03:47
anyway, this is somewhat offtopic and my DRI is still broken. sorry, all. :)
ingy makes 2 commits in 10 seconds
buu ingy: Fix hyperops?
wolverian I'd like to fix the for loop problem I showed above. my haskell is not up to the task, yet, though. 03:48
(just thinking aloud. I'm learning.)
ingy buu: ha! 04:12
I wish
buu =[ 04:14
When the hell does aujitrus get up?
obra he's still at a conference in .cn, no? 04:15
ingy buu, that gives you plenty of time to read and fix it yourdamnself :p
buu: what tz are you in? 04:16
buu ingy: Naw, I wanted aujitrus to bitch about p6-doc
CST
ingy Taiwan is 14 hours ahead of you iicc 04:17
buu Great =[
mugwump 5 hours behind me
ingy autrijus normal working hours are ~ 2pm - 5am
Taiwan time
but that varies 04:18
buu Freak
ingy and sometimes she takes trips to Saturn
iykwim
buu She? 04:19
ingy raises her eyebrow at buu...
obra "on the internet, gender is malleable" 04:20
ingy smooochies obra
buu ,,,
I hate you all.
obra: Wrong. On the internet, you are mail. 04:21
ingy ouch
buu heh
I blame that typo on something other than me.
obra *laugh* 04:22
mugwump www.masonhq.com/?AutrijusTang # look at the wrist
buu mugwump: You are so right. 04:27
mugwump for sure, it's my worst problem 04:29
I inherited it from my father :-)
he was always right too
buu No he wasn't. 04:30
mugwump that's not an argument! I want my Ā£5 back
buu snickers
autrijus greetings lambdacamels. 04:32
ingy I love using Kwid in commit msgs
hi autrijus
autrijus hey. I see you have a test, a plan, and a spec
ingy hack,hack,patch,patch 04:33
I need to convert my psuedo code into perl6
autrijus niiice.
so I'll commit ruleKwidBlock now.
ingy ok
obra hi, autrijus. how's .cn?
autrijus where is your pseudocode? 04:34
parse.t?
ingy I wrote the test code as a comment using the syntax I wish I had
t/kwid/parse.t
autrijus obra: food is excellent
ingy I invented a Kwid bytecode, as you will see
autrijus whoa. wow. ugh. 04:35
autrijus is reminded of the invocant clash
ingy it could just as easily be a Pod bytecode
autrijus the modules there are nonexistent?
Kwid::Formatter::bytecode; I mean
buu QUTITITRISUS
autrijus greetings buu.
ingy autrijus: yeah
buu autrijus: I grepped p6-doc, found shit 04:36
autrijus: More specifically, I found like 4 actual documents. Am I missing stuff or did you think they produced more? 04:37
ingy fears autrijus is rewriting parser.t for her 04:41
buu Pssh, girls don't exist on the internet 04:43
ingy farts on buu
buu Thus proving my point!
04:44 metaperl_ is now known as metaperl
ingy hi metaperl 04:45
metaperl hi ingy
autrijus_ hey. 04:52
metaperl6: you should be a committer now.
buu: 4 docs sounds about right.
I'm not even sure of its usefulness. 04:53
hence, "salvage".
buu: put them to somewhere or post the 4 link urls?
metaperl autrijus, ok I will try... where is VJunc coded to be a data constructor?
autrijus_ all basic data structures are in AST 04:54
line 274
the pugs code convention is to use the sane name for the constructor and the type it takes
so "VBool VBool"
metaperl yes but the constructor def is commented out
autrijus_ "VJunc VJunc"
etc
where? 04:55
AST.hs line 274 looks sane
metaperl I see it as a type constructor but not data constructor
data VJunc = Junc { juncType :: JuncType
, juncDup :: Set Val
, juncSet :: Set Val
} deriving (Show, Eq, Ord)
04:55 autrijus_ is now known as autrijus
autrijus line 274! :) 04:55
metaperl ok. 04:57
autrijus so, as I said, pugs uses constructor/type punning
when used as a type, VJunc means a junction value
when used as a constructor, VJunc turns a junction value into the algebraic type "Val". 04:58
metaperl the first one is the data constructor. the second one is saying the type of value that the data constructor takes
autrijus yup.
it will take some used to at first
but the context will make it clear
cool with it?
juncSet is used for all junctions 04:59
metaperl yes
autrijus juncDup is only used for none()
the reason is that none() cannot be represent as one set
must use two sets.
so, chromatic wants to do an interview for perl.com 05:01
I think I'll just invite him here for an irc interview session
if that's okay with #perl6ers
obra that works, as long as he's ok with the raw being archived in the public logs 05:03
autrijus okay, will tell him that.
abstraction it'll keep him honest :)
obra I wouldn't worry about that with chromatic, absinthe 05:04
er abstraction
abstraction i know, hence the ':)' 05:05
'is' doesn't work. 05:08
autrijus add a test. :)
abstraction mmmkay 05:09
autrijus I'll walk thru all the todo_*
and those has priority :)
buu Oh 05:12
urls, right
I was losing in starcraft =[
autrijus enjoy :)
buu Not really
autrijus: erxz.com/pd 05:13
Only ones I could find
autrijus that's 3? 05:14
buu Yeah
autrijus indeed doesn't sound too happy :-/
buu Nope 05:15
autrijus buu++ # dived into piles of ancient scrolls
buu heh
I didn't do much
We really need perlbot any here, maybe we'd get some decent karma
er, I'd*
autrijus one can write a script to grep the log and calculate karma ;)
buu Well yeah 05:16
But in #perl I've got like -7
autrijus aww. what did you do to them?
buu Trolled a lot
autrijus strange, you look very sane here :) 05:17
buu It's all an act 05:18
autrijus :)
tmoertel is the darcs repo up to date now? 05:20
buu Theres only about 48,000 lines of email in the archive
I'm sure half of that is headers 05:21
On another note, is anyone pondering a better CPAN for p6? 05:22
ingy autrijus: he settled down after you joined 05:23
buu: I am pondering a different CPAN
FreePAN
buu ingy: Different in what sense?
ingy all author directories are svn repos 05:24
buu Iiinteresting.
ingy but they are mirrored like cpan
buu Well, I was thinking more of a "better" cpan.pm
ingy and you can get tagged release tarballs on demand
autrijus oh, it's back!
tmoertel: I'll restart syncing
tmoertel thansk 05:25
ingy can pugs read a file from disk? 05:26
I can't find an example
buu Is there anyway to get a list of ops pugs supports? 05:27
autrijus buu: builtins.pod will be that place
ingy hcchien: ping
buu But.. it .. doesn't.. exist?
autrijus buu: the end of Prim.hs is currently what works
buu Do you have any format for builtins.pod? 05:28
ingy builtins.kwid hopefully :P
autrijus hmm? src/builtins.pod
buu Oh, it exists?
autrijus sure, converters welcome
sure it does.
buu Yay!
ingy autrijus: did my psuedocode make sense?
autrijus ingy: it makes most sense. the file reading was not there simply because Syns say * and p6l says = 05:29
luqui clarified that = is the way to go
it's just not in synopses
so I guess we should yell at p6team
buu builtins.pod scares me =[
"is equiv(&*infix:<*>)" what the hell? 05:30
autrijus it means, it has precedence equivalent to the * binary operator. 05:31
buu Oh.
But you don't list what it does?
autrijus and builtins.pod is only till Prim.hs line 498 05:32
so if you can help finish the rest of conversion to builtins.pod I'd be happy
no, it does not currently list what it does. a one-line desc will also be appreciated
buu Tolkien--
ingy troll-- 05:33
buu autrijus: Well, I was just about to start something like that, then I remember my kwid parser
autrijus you can pick whichever makes you most happy :)
buu heh 05:34
ingy autrijus: can i convert the pods to kwids or do you want formatters first?
autrijus ingy: converters == fine
even if manually
buu Theres another place you don't use a list =]
line 65 in perlkwid.kwid 05:35
ingy buu: it is transcribed from perlpod.pod 05:36
buu =]
ingy which also does not use a list :P
buu Well, yeah, I guessed. I'm just mentioning it..
autrijus tmoertel: darcs repo should again be uptodate. plesae test
ingy you should read these things :)
tmoertel does a darcs pull 05:37
buu ingy: Why do text paragraphs need whitespace before and after.. and command paragraphs do.. but .list doesn't?
tmoertel gak! "Fail: bug in darcs!" 05:38
buu s/command/heading/
tmoertel I'll try a fresh get...
autrijus is nonimpressed by darcs' fragility :-/
ingy buu: empty lines are only needed where ambiguity exists
autrijus shapr threatened to remodel darcs using Arrows 05:39
which should increase its robustness.
ingy but extra empty lines make better reading
buu So
= foo
bar
Is valid?
tmoertel the darcs get worked fine... must have had conflicts in local changes
autrijus ahh. 05:40
tmoertel still, that is no excuse for darcs failing
autrijus bombing out is just bad style.
metaperl i'm amazed the same repository can be manipulated by 2 difference VCSes 05:41
ingy buu: yes 05:42
buu ingy: Right o.
metaperl is it persnickety of me to say the type signature of opJunc can be a little more precise? opJunc (in Junc.hs) must return a value of type VJunc 05:43
buu wants a switch =[
autrijus metaperl: there's no way in haskell to specify a subtype signature. 05:44
it returns Val 05:45
metaperl oh, I didn't know that
ingy builtins.pod is no more :D
autrijus which, as you noticed, must be of the (VJunc _) constructor
but there's no way to do that.
in GHC 6.4 we have GADTs, which may or may not help
buu ingy: You say "sequence of spaces or tabs at beginning of all lines", that means one space is valid, yes? And what about:
metaperl yes you can just look at the fact that the function starts with VJunc $ ....
buu bar
metaperl and know that
autrijus but I'm not going to depend on 6.4 :)
buu baz
foo
autrijus metaperl: yeah but the type language does not support that
you can't say 05:46
metaperl right. I understand
autrijus opJunc :: JuncType -> [Val] -> Val@(VJunc _)
although I agree it will be helpful.
ingy buu: baz is verbatim
buu ingy: And the other two are text blocks? No new lines required?
ingy right, but I would consider it bad style
buu Well, yeah 05:47
Hmph
ingy under .list all the rules change slightly
buu Oh goody!
ingy :)
buu Is it really necessary to have a documentation format that requires a recursive descent parser to actually interpret?
ingy: Er, so if I'm typing a plaintext paragraph, and it wraps me, and I hit space at the beginning of the line, that's going to be a verbatim paragraph? 05:49
ingy yes
yeah sure 05:50
buu Great
ingy you can always fix your mistake
buu True enough I suppose.
ingy It would be cool if Kwid parsing never failed, but just warned on errors 05:51
I'm not sure on that yet
buu explodes
ingy Kwiki must not fail
buu haha 05:52
ingy but I think Kwid can fail
it's a different environment
autrijus ingy: ok 05:53
when I see =kwid
buu autrijus: Die();
autrijus I just grab everything between it and the next =cut
buu #stupid impossible to parse kwid
autrijus and let Parser.Kwid handle it
sounds ok?
buu autrijus: Handle it? Shouldn't you just ignore it?
autrijus: And what aboutr stuff like: 05:54
my $foo
autrijus buu: Perl6 uses all POD/Kwid as data sections.
buu =kwid
;
autrijus and all comments, for that matter.
buu I see.
autrijus as @=COMMENT
you may scream now.
buu Yeah no crap
What about the $foo = kwid; thing?
autrijus you can try that with perl5.
buu I did
metaperl Adding src 05:55
Adding src/Junc.pod
Transmitting file data .
Committed revision 358.
autrijus metaperl++
metaperl just an intermediate commit of my docs for Junc.pod
:)
buu Is it really necessary to have pod files in every single directory of pugs?
autrijus buu: so, you'll see that =pod can only start at statement level.
buu: it's in docs/.
metaperl I had a file with Haskell data to serve as sample data for playing with Junc.hs
autrijus docs/src/Junc.pod
note the "Adding src" line :)
metaperl it is under src/t/Junc/Test.hs
i have another file outside of source control at the moment 05:56
buu Oh yay!
Proper orginziation++
metaperl it is a "play" file with data for playing with Junc.hs
autrijus metaperl: nice
metaperl it is at src/t/Junc/Test.hs
but I dont know if I should add it there
autrijus prolly not.
metaperl the plan is for the files in src to have a play file so you can see what they do 05:57
autrijus prolly keep it with you or as docs/src/Junc.hs
metaperl oh ok I think that is a good idea
autrijus :)
metaperl but I think docs/src/Junc/doc.pod and code.hs are good
autrijus has a definite feeling that the project is still accellerating :) 05:58
metaperl docs/src/Junc/doc.pod docs/src/Junc/code.hs
how is that?
autrijus I don't like lots of doc.pod.
or lots of code.hs.
metaperl too generic...
autrijus docs/src/Junc.pod and docs/src/JuncTest.hs
or, docs/src/Junc.pod and docs/src/Junc.hs
sounds about right.
btw, nicely written 05:59
buu I think we need a few more /src/doc/'s in there
autrijus I totally agree.
buu docs/src/Junc/src/doc/src/pod/Junc.pod
autrijus ;)
ingy autrijus: shouldn't pugs ignore =kwid\n...\n=cut\n 06:00
autrijus ingy: no it must convert it into a value
and stub them into %=KWID (or %=POD)
and @=POD and $=POD
ingy: part of p6 spec.
sadly.
so it must contain a parser.
the parser must be part of pugs. 06:01
buu Horrifying.
ingy but surely @=KWID is an array of kwid strings 06:02
autrijus but surely %=KWID is the parse tree.
ingy not necessarily
they should surely be parsed lazily 06:03
autrijus not neccessarily.
oh. we're using haskell
whatever we write won't be executed until looked at.
the lazy is by default.
takes some used to :)
ingy that's fine, but... 06:04
I'm sure there can be a way that @=FOO does not require a Parser.Foo be included in pugs 06:05
autrijus sure, I think the solution is to glob it into a string
and tie the hash into a module
say Kwid.pm
with the string as tying arguments. 06:06
similar to how File::Glob is autoused.
I think, anyway
ingy it would be sad if I couldn't access @=DATA for all interleaved pod and kwid sections 06:07
autrijus %=POD{'DATA'} you mean.
I think I'll just throw everything to %=POD and $=POD and @=POD. 06:08
ingy autrijus: where is this written on? 06:09
autrijus ingy: S02 Names 06:10
ingy thanks, I'll look into it
did you see: svn.openfoundry.org/pugs/t/kwid/parser/00sample
autrijus yup, I did.
ingy :)
autrijus so let me get this straight 06:12
of the 99.9% compat
what is lossy on the .1%?
pod => kwid
or kwid => pod?
which side is lossy?
r360 landed 06:17
arbitary podlike blocks are skipped by parser
Kwid.pm is now not a syntax error
clkao hi autrijus 06:19
autrijus hey. 06:21
ingy back 06:35
autrijus_ cool.
so here's my plan
ingy autrijus++
autrijus_ I think what I'll do is to first populate %=POD
ingy the %=POD thing looks not well thought out 06:36
autrijus_ err I mean @=POD
with the kwid parse tree
hmm. how else would you like your tree?
a native data structure?
that sounds good
because we can base our Obj implementation on it
ingy hold on... 06:37
I think putting pods and kwids together in @=POD is fine
because the =kwid line will have to be a part of it
autrijus_ right. 06:38
so all pods can be represented as kwids?
ingy since =head1 can start a block
autrijus_ I mean, they share a common data structure
ingy the bytecode is the common data structure
well
one representation of it
autrijus_ the bytecode is a freezing thing
in memory I need a tree 06:39
ingy yeah
autrijus_ or do you think we can use an array of bytecode thruout?
ingy but listen, i think you are going too far
autrijus_ I'm okay with that too if you think it makes most sense
@=POD then will be an array of commands
autrijus_ listens
ingy I think @=POD is just an array of the P =pod section strings, and nothing more
what says that it is more? 06:40
I personally think the whole thing is not clearly thought out by Larry yet
but maybe I'm wrong 06:41
autrijus_ it says that each @=POD element is a chunk
ingy ok, a chunk of text right
autrijus_ a chunk of "pod stream"
ingy yeah
autrijus_ it can be read as simple string
it can be read as something more that happens to stringify as simple string
06:41 autrijus_ is now known as autrijus
autrijus but ok. suppose we want to split on chunks. 06:42
and keep it as simple string.
ingy %=POD makes no sense at all to me
autrijus what is a chunk anyway?
a paragraph?
let's ignore %=POD for now.
(or post to p6l)
ingy what would the keys/values possibly be?
autrijus the keys are =begin 06:43
blocks
like END and DATA
for =head1
I imagine it will be in %=POD{''}
for =kwid too
or we can rule that =kwid means =begin KWID
but! I'm not particularly interested in %=POD now.
ingy right
ok fine 06:44
autrijus I just want to teach your parsec :)
so suppose we populate @=POD
with a list of strings
ingy including =cut lines?
or strip them?
autrijus strip them I think 06:45
ingy I think so too
it's all a little unclean, but continue...
autrijus ok... 06:47
ingy my $doc = join '', map { s/\A=(pod|kwid)\n//; $_ } @=POD;
more or less
autrijus yup.
ingy great. that's pretty much what I'd expect 06:48
autrijus so is a verbatim chunk a chunk?
is any chunk that anything happens to be split using \n\n+?
- `* unordered list item`
- `+ ordered list item`
ingy no, that's a paragraph
autrijus is that one chunk or two?
ok so what is a chunk?
any bytecode entity?
any block-level entity? 06:49
ingy a chunk would be from =foo -> =cut
autrijus okay.
so that's easy.
ingy it really was no semantic meaning
autrijus yup.
ingy s/was/has/
autrijus so semantics can wait till later :)
ingy yes, thank you!
cls_bsd autrijus: do we need Perl6-Pugs in ports? 06:50
autrijus hmm what about my plan of teaching you parsec via kwid? :)
cls_bsd: yes. if so, please call lang/pugs/
ingy please start now!!
I am ready to begin
cls_bsd autrijus: ok, try to do :p
autrijus ingy: alright. first go to AST.hs 06:51
ingy but I think we have a disconnect
autrijus to parse anything you want a data structure.
that you can parse that thing into.
hmm?
ingy I am imagining a separate program than pugs for my parsec rules to live in 06:52
autrijus ah.
that means a separate tree
and carry a lot of code over 06:53
ingy just like pod2foo uses Pod::Parser
kwid2foo does uses Kwid::Parser etc
autrijus well, I'd much rather we put Kwid parser as src/Parser/Kwid.hs 06:54
ingy to convert .p6 or .kwid files into foo files
autrijus it's okay if you want a clean tree, to call it src/Kwid/Parser.hs
so we can start from scratch
using src/Kwid/AST.hs
src/Kwid/Parser.hs
but still reuse Internals and other code.
ingy sounds right
autrijus cool. let me do that. 06:55
ingy they could link to a `kwid` executable
but they should also be loadable into perl6 space 06:56
autrijus what will that executable do?
ingy kwid --to_html Test.pm > Test.html 06:57
or
kwid perlre
etc
(acting as both pod2html and perldoc) 06:58
autrijus nod
ok, I'll leave Kwid/Main.hs for you
I'll just help you do the parser/emitter place
and link them into pugs 06:59
ingy but hopefully Kwid/Parser.hs is available as Kwid::Parser
autrijus yup
ingy perfect then
autrijus that will also be a good use case for XS modules
XS = haskell
ingy yes
maybe it goes in lib/Perl6/lib/ ? 07:00
ingy shuts up now. waits for autrijus to hack some
autrijus maybe it goes in ext/ 07:01
but it's too much bikeshedding at this point
just src/ for now
glue code can live elsewhere.
like ext/.
sfink__: hey
sfink__: didn't notice you're here!
(are you?) 07:02
ingy ok, we should have a good talk about source tree layout in taiwan
autrijus sure
ingy too much fun in Taiwan this year
svk pugs kwiki freepan kwid yaml 07:03
autrijus r361 is skeleton.
ingy cog maybe
autrijus we'll start from Kwid's AST.
ingy kool, thanks 07:04
autrijus I'll bbiab.
you think SEE helps?
or keep irc?
ingy I'll read up
I can host SEE
autrijus I'll go back to room now to hack more freely
see you a a couple mins
&
ok, set up a host bah
rehi. 07:24
ingy: still there? 07:25
ingy autrijus: yes
autrijus cool.
so let's start from AST.
I'll have SEEaccess in a few mins.
have you set up a host?
ingy yes 07:26
autrijus cool
AST.hs is currently empty. 07:27
ingy right
;)
autrijus to use it, you need to declare a module.
module Kwid.AST where
import Internals
that's all.
Internals pulls all the utility modules in.
ingy ok 07:28
autrijus now comes the fun part: you need to ame the toplevel data structure of a kwid doc.
ingy is Internals pugs?
autrijus yeah.
ingy ok...
autrijus you can have your own Internals when you want to factor the kwid tree out. 07:29
for now it's just convenience.
(if you look at Internals.hs you'll see it fdoesn't have anything of its own; it's just instance and reexport other ubiltins)
builtin modules, even
ingy paragraph/verbatim/list/comment/header/format
buu The horrors! 07:30
buu goes insane from too much kwid
autrijus so those 6 are all Kwid nodes
toplevel nodes I mean
or do you want to tcall them kwid chunks? blocks?
ingy they are Kwid blocks 07:31
so top level is a sequence of blocks
autrijus in haskell, it reaeds:
type KwidDocument = [KwidBlock]
buu ingy: Are .html - .html.; format blocks?
autrijus data KwidBlock = Para | Verbatim | List | Comment | Header | Format 07:32
you just need those 2 lines.
that's all.
ingy buu: yes
autrijus "type" is a type synonym.
data is a data type declaration.
the RHS of = are constructors.
looks reasonable?
ingy autrijus: looks familiar
autrijus ok. let's start with Para. 07:33
what content does a Para have?
buu Text! 07:34
buu waves to autark-jp
ingy a paragraph is a sequence of text fragments and Kwid phrases
buu Phrases = the funky [], **, // and so forth 07:35
?
ingy yes
buu Right-o. 07:36
ingy autrijus has vanished 07:39
buu Yeah
He has been kidnapped by the perl cabal!
ingy slippery that one
buu We must launch a rescue mission 07:40
clkao rescued
autrijus horrible network :-/
ingy he's back
buu clkao: =]
autrijus were were us?
where were we?
ingy a paragraph is a sequence of text fragments and Kwid phrases
autrijus: you on the mac yet? 07:41
autrijus ingy: /msg me the ip again, I lost it 07:42
ingy hcchien: ping 07:44
ll 07:45
Khisanth hmm 08:00
scw autrijus: Hello, I've make two patches under www.csie.ntu.edu.tw/~b92103/pugs/ 08:30
autrijus: junction-values.patch makes function values work on junction
autrijus: and tail-recursion-length.patch patches fp and caculate list length by tail recursion 08:31
autrijus: Which should have better performance in functional programming language :) 08:32
clkao scw: you are not using svk! 08:33
scw clkao: Err, no. 08:34
clkao: svk needs so many perl modules that I haven't installed zzz 08:35
clkao your patch will not be applicable if the file is changed intensively. use svk patch to avoid so :)
scw: packaged software is less hateful
scw clkao: I have to install 25 more packages using apt-get install... 08:36
clkao just cover your eyes 08:38
theorbtwo Is svk better then svn for pugs devel? 08:39
clkao ya, if you are not committer, or if you want to work offline, or you want to work on a bigger change while keep in sync with trunk 08:40
scw clkao: cover my eyes and let df awake me? :p (Keeping Windows in hard disk took me so many space) 08:42
clkao it doesn't take much disk space. they are all small modules
theorbtwo On my system, it installed 16 modules, for a hair over 4MB. Perl module packages tend to be numerous, but small. 08:43
clkao see, it's harmless :) 08:44
scw clkao: Oh... ok, it's my evasion :p 08:45
theorbtwo Is there a one-line way to move from svn to svk? 08:47
autrijus done. 08:48
clkao yes. just use svk as svn. like co, it will ask you where you want to mirror
autrijus we have a Kwid AST, a Kwid parser, and a Kwid compiler (that compiles to html)
all in 1 hr!
ingy autrijus++
autrijus ingy++ 08:49
theorbtwo (autrijus+ingy)++
autrijus writing this kind of thing in haskell is really unlike what I'm used to :)
autrijus now has a bit more confidence in writing Pugs's own compiler. 08:50
autrijus looks at scw's patches. sec 08:51
Khisanth does Kwid handle table like things? 08:52
ingy no
Khisanth d'oh!
ingy kwid does no more than pod
by design 08:53
well a teeny tad more
it allows named hyperlinks
scw autrijus: 'op1Values v' should be 'op1Values (VHash h)', but I cannot have it work :/ 08:54
Khisanth doesn't pod already allow that?
ingy no
for reasons unknown
to me anyway
theorbtwo Because there's no nice way to write them that preserves POD's human-readability. 08:55
autrijus uh. kwid can do table like things by using plugins. but then, so can pod.
ingy [A link to google|google.com] ?? 08:56
autrijus kwid is mostly a better notation for pod.
ingy true and true
.table
theorbtwo [google.com/|A link to google], I thought...
ingy | foo | bar |
.table.
perhaps
autrijus yeah, I happen to think link first is better because it allows you to use | int ext
without ambiguity
s/int ext/in text/
ingy not true 08:57
text is first
autrijus scw: you want listToHash and/or MkHash
oh right, just look for rightmost |
ingy [text|link/section]
autrijus sorry, stupid me
Khisanth ah I didn't realize linking to sections of the same page and linking to different pages were handled differently
theorbtwo Both do with equal ambiguity, it's just a matter of being greedy vs non-greedy.
autrijus theorbtwo: exactly.
ingy Khisanth: they aren't really 08:58
Khisanth I mean with L<>
theorbtwo (And I prefer having the text be able to hold a | to the URL, since pipes aren't a legal URL character, presentation of file URLs by a certian popular closed-source web browser nonwithstanding.)
ingy for the most part [...] == L<...>
autrijus [This|Text|Has|Pipes|www.foo.com] 08:59
not a problem.
parsec can do that.
ingy [This Section] == [This Section|/This Section] 09:00
[link] == [link|link]
autrijus brackets [ do { frags <- ruleText `sepBy1` (char '|'); HyperLink (last frags) (join '|' $ init frags) } ] 09:01
that's all, I think
ingy nice
viirya_ autrijus: translation finished, you could check.
autrijus oh, maybe a case analysis for defaulting
viirya_: I'm checking. nice job!
I've pointed perlchina guy to that url 09:02
scw: you have a cpan id?
"Shu-Chun Weng" in AUTHORS file?
i.e. that's how you prefer to be known?
scw autrijus: "Shu-Chun Weng" looks fine :) 09:03
autrijus cool
scw autrijus: No, I don't have a CPAN id :)
cls_bsd go for one? :p 09:06
scw clkao: ok, I'm now using svk :D 09:07
autrijus scw:
op1Values v@(VHash _) = VList $ map snd $ (vCast :: Val -> [VPair]) v
is how you do case analysis.
clkao ok. i must warn you 0.29 has some bugs. 0.30 is coming out soon.
autrijus: (hint!)
scw autrijus: Hmm... v@, I haven't read it...
autrijus yeah, I've finally downloaded 1.1.3 libs 09:08
testing
scw: it's commonly used as like
list@(x:xs)
scw autrijus: Oh! Yes! (VHash h) make h the MkHash instead of VHash! 09:09
autrijus yup.
whoa, nested subs even works.
(in fp.p6)
scw Ya! I was suprised, too.
autrijus scw: so, got time to work on pugs more? :) 09:11
(i.e. I'd like to make you a committer.)
if that's ok for you, give me your email :)
ingy scw: IT'S A CULT!!! 09:12
scw ingy: You scared me... :p
autrijus harry pugshina harry pugshina
ingy hehe
scw autrijus: Ok, [email@hidden.address] :) 09:13
autrijus scw++ # welcome aboard
ingy cheers!
scw Studied Haskell two days ago and becomes committer...
scw haven't even finished YAHT.
cls_bsd scw
autrijus that description seems to be true for lots of other committers as well... 09:14
note that I also only studied haskell for less than 2 months :)
scw: invitation sent 09:18
oh wait, you're already registred.
ok, you're a committer now.
mm we have 16 pokemons.
I mean, committers
scw Oh, OSSF, yes 09:19
autrijus the commit url is svn.openfoundry.org/pugs
regression++ # woot. found regression caused by scw's hash patch
you need to case analyze list of pairs too
since a list of pair may work as a hash under hash context.
I need to run soon. be back after dinner 09:21
scw: both of your patches are now in the repo.
r364. enjoy
& 09:22
Juerd foto.juerd.nl/autostuk/Motor%20closeup%2004.jpg 09:25
scw autrijus: thanks :) 09:26
09:58 buu is now known as buu_sleeping
autrijus viirya_: svn.openfoundry.org/pugs/docs/zh-tw...rview.html 11:47
zh-cn too 11:48
viirya++
scw++
&
cls_bsd cool 12:50
theorbtwo Heh, all I can tell from that is that half of it is in English anyway. (Because it's full of technical terms and proper nouns.) 12:53
autrijus rehi lambdacamels 15:10
I got broadband!
clkao whoot! how come 15:11
autrijus they upgraded me to $luxury_large_room with broadband for free
after ^W^W^Wcomplaints++
clkao see, complain, don't thank!
autrijus I think the morale is to deal out complaints and receive thanks 15:12
EVERYSELFISH 15:13
uh, I mean, E_VERY_SELFISH
the broadband isn't very broad though :-/ 15:14
Khisanth autrijus: what encoding is the zh-cn version of overview in?
autrijus Khisanth: utf-8; it was broken, should be now fixed
Khisanth heh I guess mozilla was correct afterall
autrijus pugscode.org now has linnks to zh-* translations of PA01. 15:36
viirya++
scw++
Steve_p looks forward to the end of the week and being off from work 15:39
autrijus :)
Coke_ just started work today!
Steve_p (time to play with Perl and pugs)++
autrijus Coke_: having fun?
autrijus is finally picking up todo_ tests 15:45
bandwidth++
nnunley Is anyone able to get the Kwid code to compile? 15:46
PerlJam nnunley: not I (I just "svn up" and tried making it a mere moment ago) 15:47
nnunley: It appears unfinished (fancy that! :) 15:48
nnunley PerlJam: Yeap.
I was debating trying to finish it up enough to make it compile. But perhaps Ingy was in flow.
ingy-- # breaking the build. 15:49
PerlJam nnunley: go for it. There's only 3 things missing.
autrijus ^Wuhm
I'm just cleaning it
will commit in a bit
nnunley Ok...
I'll leave it to you.
Want my morning pugs fix. 15:50
autrijus committing.
with broadband this should take just a few secs 15:51
ingy nnunley: ?
autrijus indeed, it is done
r369
nnunley ingy: ;) You checked in code that didn't compile.
autrijus ingy: it's my fault. I forgot that Parser.hs will slurp in Kwid
ingy aha
autrijus surprisingly our code basically all works
it's just one type error
^H^H^H^H^H^H^Hwhich I just fixed.
ingy you++ 15:52
autrijus :)
ingy I should have tested anyway
integral should fix Makefile.PL to automatically pick up subdirs in src
autrijus ^H^H^H^H^H^H^H^H^H^H^H^H^Hintego ahead :)
ingy integral: I was thinking the same thing
i would like a separate Makefile.PL for building the kwid binary 15:53
maybe
integral it's getting rather hackish
autrijus nah. just "make kwid"
not seeing the gain of another makefile.pl 15:54
the d^W^W^Wit's not like pugs has some other dependencies
ingy autrijus: maybe... ok
btw I did svn mv t/kwid/readme t/kwid/README 15:56
which I had to do on a linux box instead of OS X
and when I svn up on OS X
it errored
so needed to rm t/kwid/readme 15:57
and re svn up
fyi
integral keeps a separate UFS partition for working on projects
ingy integral: heh
autrijus sounds prudent, actually 15:59
integral ouch, I've just been bitter by the low precedence of , in p5, oops 16:01
autrijus I've also been bitten by p6isms :-/
in particular function prototypes
I guess when I make the parens optional on contron structures in pugs my p5 code will be even more in disarray 16:02
nnunley grins.
integral ok, clean_dirs, and the pugs dep modified, anything I forgot? 16:04
autrijus seems the monad reader will be out today :)
I'm as excited as I first watched the perl review :)^H^Happear :)
integral: that sounds about right. we can add manifest later
PerlJam Is there some problem with binding or recursion or something? 16:06
autrijus PerlJam: mm?
integral r370: Now automatically finds subdirs (1 level deep) in src.
PerlJam autrijus: I just added another example hanoi.p6 (in r371) It doesn't appear to output the proper sequence. Perhaps I've done something wrong. 16:08
autrijus ok, will look at it in a bit 16:10
I'll reinstall freebsd now :)
now that I finally got the network. 16:11
autrijus is reading TMR 16:13
mmm TPJ is also out.
# www.elis.ugent.be/~ageorges/full.pdf
Coke_ why the # ? 16:15
autrijus just a habit 16:16
16:33 metaperl_ is now known as metaperl
nnunley Bah. 16:38
nnunley looks at Pretty and tries to figure the metasteps to strap on the Text.PrettyPrint stuff. 16:39
Text.PrettyPrint returns [Doc]... and should thread through all the pretty calls. But it needs to also render with `show` 16:40
integral was looking at that too 16:44
I was going to move pretty out of the Pretty class, and keep it's type as Pretty a => a -> String 16:45
But then add something to the Pretty class which did a -> Doc, instead, with an instance for Show a => a, which does text $ show
nnunley Makes sense. 16:46
ingy linking errors on OS X
nopaste.snit.ch:8001/1967
integral hasn't started hacking, so feel free to work on it, nnunley
autrijus ingy: some warnings do not an error make :) 16:49
ingy oh
I thought the linking was failing
my bad 16:50
stevan autrijus: I got a werid error when trying to return a hash from a sub 16:52
pugs -e 'sub foo returns Hash { my %h = ("one", 1); return %h }; my %hash = foo(); say ref(%hash)'
it seems to only want to return List types 16:53
am I doing something wrong? or is something not implemented yet?
ingy autrijus: why does Parser import Kwid.Parser ? 16:55
stevan ingy: it actually doesnt, its a cover,.. Kwid.Parser is actually filled with cocaine 16:56
ingy hehe
Coke_ autrijus - how are you tracking issues at the moment? 16:57
ingy rtrtrtrtrt
nnunley Kwid.Parser is a mule? 16:58
ingy Kwid.Parser makes the big $$$
stevan Kwid.Parser wouldn't make it through customs
nnunley Only if the condoms don't rupture.
Coke_ It doesn't look like rt.perl.org/rt3/Search/Listing.html...ewSearch=1 has any pugs issues, which is why I asked.
stevan Kwid.Parser's eyes are totally red,.. it will get pulled aside for sure 16:59
integral there's also issue tracking stuff on openfoundry afaik, but p6c seems to get used :-) 17:00
Coke_ I wonder if adding a pugs queue to rt would confuse or help. 17:01
integral oops, I read that as rt.cpan.org, since there's that too 17:02
Coke_ I was referring to rt.perl.org/rt3/
Coke_ ers, rt.perl.org/rt3/, as robrt keeps reminding him. 17:03
rgs There's already a pugs queue in the CPAN rt
and it's managed by obra iirc.
Steve_p Is there? 17:04
mmmm....tickets
rgs Steve_p :)
Coke_ I am continually disturbed by the lack of resource sharing. =-)
rt.cpan.org/NoAuth/Bugs.html?Dist=...;ShowAll=1 appears to be empty, btw. 17:05
xerox Coke_, www.cpushare.com ?
;))
integral The only bugs I've seen reported so far have gone via p6c, or here 17:06
Steve_p has to work on Perl 5 bugs first this weekend to help prevent the "code slush" of the previous release
cls_bsd well, hanoi.p6's bin path can be rewrited to #!env pugs , instead of #!/usr/bin/pugs 17:25
PerlJam cls_bsd: no, it should probably be #!perl6 to match the rest of the examples. 17:28
In any case, something is wrong there (that I haven't the time to track down) because hanoi.p6 gives the wrong output 17:30
autrijus #!perl6 is cor5rect. 17:31
PerlJam autrijus: that's good because I just changed it :-)
clkao dear pugs'ers, svk 0.30 released.
ingy clkao++ 17:32
stevan autrijus: a lot of the tests say !#/usr/bin/pugs,.. should I change them to #!per6?
autrijus woot.
nnunley clkao: Burn the diskpacks. Full speed ahead.
autrijus clkao++
stevan: no, tests can remain whatever they like
stevan ok
nnunley clkao++
autrijus /usr/bin/pugs is better because "prove" will use it.
integral you'll find me to blame for spreading #!/usr/bin/pugs about the tests so widely
stevan integral: me too 17:33
PerlJam me three :)
stevan (although I was probably copying you)
PerlJam It's only in Dialects/perlego that you'll find tests that don't start with #!/usr/bin/pugs
autrijus and perlego is something we pretend to not exist. 17:35
(it's not even listed in test files.)
cls_bsd PerlJam: yap, perl6 is better 17:36
ingy is anyone currently hacking on Makefile.PL 17:40
I am trying slightly different setup
autrijus prolly not. go ahead :) 17:41
ingy conjures up her legendary Makefile fu
autrijus oooooh
rgs what's perlego ? 17:47
nnunley rgs: related to perlid and perlsuperego 17:48
autrijus rgs: juerd's dialect
rgs hmm 17:49
ingy autrijus: can we talk about layout for a bit? 17:56
I think Kwid in src is the wrong place 17:57
autrijus ingy: sure, type ahead
ingy it is a module
and an XS exxtension
autrijus ok... ext/ ? 17:58
ingy and a binary
autrijus ext/Kwid/
ingy and needs its own Makefile, etc
sounds good
autrijus ok, please do the moving 17:59
ingy I want it to get triggered by the main `make`
autrijus ext/Kwid/src
the idea is that each extension has its own
src/ (hs libs)
lib/ (p6 libs)
t/ ( tests)
ingy right
autrijus the src/ thing is a haskell world convention.
ingy I'll work on it 18:00
src/ is fine
autrijus you can trigger sub makefiles using the usual p^Hcore perl trick.
core perl, even
ingy yep
autrijus I think schwern has worked on recent makemakers to make recursive makefiles work even better
but my memory is fuzzy
clkao multiple makefiles at least
ingy I just tried putting a dummy Makefile.PL in src
it wasn't triggered by `perl Makefile.PL` 18:01
I wonder if M::I is mucking something
pugs build fails on OS2 and VMS!! 18:13
autrijus ... 18:14
ingy FULL DETAILS AT 6!
autrijus where?
Juerd rgs: support for sigilless scalars, support for parenless method calls, support for <-> (bidirectional ->, i.e. "is rw" implied), support for stacked statement modifiers, support for an include()
rgs: That is Perlego.
rgs ok, the include() is a cpp-like feature ?
Juerd No
It's runtime
It's do FILE, but in the caller's scope 18:15
rgs ok
eval `cat file`
Juerd Yes, that
But with a proper #line
rgs :)
Juerd See tnx.nl/include 18:16
The "should not want to include" thing should change IMHO
It can be very practical
And it's not Perl's job to limit possibilities
ingy Juerd: add indentation based scope! 18:17
Juerd No
That's not something I want
ingy wimp
webmind is it correct that svn update doesn't work on the pugs repository ?
Juerd ingy: It's easy to implement with a custom grammar.
ingy: Building it for Perl 5 with a source filter took me a few minutes only.
ingy =) 18:18
Juerd perlmonks.org/?node=Mandatory%20indenting
ihb Juerd: not that it matters, and not that you seem to care (judging from the numerous comments about you not caring in the post :-)) but should "foo\n\t\tbar\n\t" reasonably translate to "foo { { bar } baz }" instead of "foo { bar } baz"? 18:24
err, missed the 'baz': "foo\n\t\tbar\n\tbaz\n" 18:26
webmind Juerd, flamy replies :)
Juerd ihb: :)
ihb i like the reply at perlmonks.org/?node_id=267096 :-)
nnunley webmind: You might have problems updating pugs if you're using windows or hfs under OSX. 18:31
ihb Juerd: i will not flame nor argue with you, i'm just curious: do you hate the mandatory indenting in haskell as well? 18:32
Juerd I don't know haskell
From what I've seen of it, it appears not to have the typical problems attached to mandatory indenting because it's an entirely different language
nnunley webmind: A file (t/kwid/readme) changed case to (t/kwid/README)
ihb mah, my memory is so crappy. i've even written a reply in that thread, yet i didn't remember it. 18:33
Juerd Long lines, named arguments, and sequential structured code appear to be things Haskell doesn't have :)
ihb juerd: it has both long lines and named arguments.
Juerd Then are those not used? :) 18:34
ihb foo x y = x + y # named arguments.
used all the time.
Juerd Or is indenting used for continuation? For that, it can be very useful
ihb: arguments, not parameters
autrijus hmm, in hanoi.p6 it can probably use string interpolation 18:35
no need to do "~str"~$var now :)
Juerd ihb: In open(file => $fn), $fn is a named argument, "file" is its name
ihb in my world arguments and parameters when talking about functions are the same thing.
Juerd That "file" happens to also be the name of the parameter is irrelevant
ihb: Arguments are passed, parameters are expected. 18:36
ihb Juerd: i use the directly opposite convention. :-)
autrijus sleeps. g'nite! :) &
Juerd Arguments are values, parameters are part of the sub's signature
19:38 < ihb> in my world arguments and parameters when talking about functions are the same thing.
19:38 < ihb> Juerd: i use the directly opposite convention. :-)
Inconsistency within one minute. Well done.
ihb Juerd: yeah, but i use "named" only with parameters.
Juerd New to Perl 6 are named parameters, named arguments already existed. 18:37
Also new is the *link* between named parameters and named arguments, in that a parameter's name can also be used to name an argument.
ihb in my Perl 5 world @_ holds args/parameters, when you do foo(bar => $baz) i refer to that as the "named parameter bar", but i don't really care and could go the other way if i wanted to.
Juerd Perl 5 has no parameters except @_ 18:38
It's named argument.
autrijus 2~ :)
Juerd 2~?
autrijus use.perl.org/~autrijus/journal/23446
bad network-caused random char.
now the journal's up, I need to really sleep. 18:39
see you in ... 5 hours ;)
metaperl_ autrijus, having 2 modules named Junc.hs is something of a prob
ingy autrijus: ext/Kwid lives
ihb Juerd: you know that this is all about what you call it, right? we just have different definitions of world. afaik, there's no general definition. perhaps perl 6 has introduces a def for perl 6.
Juerd Sleep more, autrijus. Good night!
metaperl_ terry@Abulafia:~/hacks/hs/pugs/pugs/docs/src$ ghci -i../../src ./Junc.hs
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.2.2, for Haskell 98.
/ /_\\/ __ / /___| | www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Juerd ihb: Yes, I do. My opinion is singular and simple: let's use *Perl's* jargon in this channel.
metaperl_ Loading package base ... linking ... done.
./Junc.hs: file name does not match module name `Junc'
Prelude> Leaving GHCi.
Juerd ihb: And where there is any ambiguity between 5 and 6, Perl 6's jargon should be assumed 18:40
metaperl_ I can't name the module for playing with Junc.hs Junc.hs and I cant give it the module name Junc
ihb Juerd: i didn't know there was a perl5 jargon on this issue, and we were talking *haskell* which increase ambiguity even more...
Juerd ihb: I'm not making up the jargon, the words are used consistently in Perl 5's documentation and in books.
ihb anyway, useless discussion really. we know what we mean.
Juerd See also juerd.nl/perladvice for a small list of jargon
Speaking the same "language" is very important when trying to communicate 18:41
ihb yeah, i mostly reacted to "arguments, not parameters" and made you aware of that i didn't use those terms like you, precisely to make us speak the same language (or know the other person's language to reduce confusion). 18:43
anyway, seems i learned something new about the perl5 conventions. 18:46
webmind nnunley, running GNU/Linux here
Juerd You've used Perl 5 for a long time. It amazes me that you weren't already aware of this 18:47
webmind nnunley, "svn: 'svn.openfoundry.org' is not a working copy" is the error I get
ingy webmind: for what command?
svn checkout svn.openfoundry.org/pugs/ src/pugs 18:48
ihb Juerd: i've never made nor noticed anyone else make a strict distiction between parameters and arguments. 18:49
Juerd And that is amazing 18:53
webmind ingy, svn update svn.openfoundry.org/pugs/ 18:54
clkao webmind: you can't do that. 18:55
webmind why not ?
clkao up takes a wc, you want to checkout or up the localpath 18:56
webmind ah
ihb Juerd: Learning Perl doesn't seem to follow that convention consistantly.
webmind silly me
Juerd Learning Perl is an old book
ihb err, i mean Beginning Perl. 18:57
Juerd 2nd edition?
webmind Juerd, why the subs before the code ?
ihb Juerd: learn.perl.org/library/beginning_pe...Chap08.pdf
Juerd webmind: Predeclaration
ihb: That's the 1st ed.
ihb Juerd: when was the second released? 18:58
Juerd webmind: When I teach you about a subject you know nothing of, do you want me to first talk to you for an hour and then explain the technical terms I couldn't avoid, or do you want me to explain the building blocks first, so you can actually understand what I'm saying? :) 18:59
ihb: I don't know
ihb Juerd: it seems like back in spring of 2000.
metaperl_ Juerd, let people learn without you talking at all
put in the words later 19:00
webmind Juerd, I prefer to read a document and loop up terms I don't know a long the way ?
s/loop/look/
Juerd webmind: That's not an easy option for a compiler.
webmind: And for me, when I'm reading your code 19:01
Why do you have your "use" statements before your main code?
webmind a compiler can first check for subs and then parse everything else ?
Juerd Why do you declare variables *before* using them?
Why would you do things differently for subs?
webmind because subs take up space 19:02
Juerd webmind: How does it know it's a sub?
webmind: That's why you should put them in a module :)
webmind Juerd, that makes sense..
the module thing
Juerd And then load that module BEFORE using its subs, with "use"
Post-declaration doesn't work well 19:03
webmind but if I have a simple sub.. I rather put it below my code.. then to make a different file
Juerd If it's simple, it's small enough to not disturb the reading flow.
If it's not simple, it's important enough to let the reader know what the hell it does.
webmind well if I have 2 simple subs.. and I put them at the beginning.. that takes about one page 19:04
Juerd What's the problem?
webmind and every time I open the file.. I have to scroll atleast one page down 19:05
because I don't care about the sub
Juerd You only update the main code, never the subs? That's very unlikely.
webmind yes
Juerd If your code is good, everything is in subs anyway, and your main code only contains some flow logic
Now, if you're limiting the discussion to small throwaway/sysadmin scripts, then I'd say: declare subs just before you use them. 19:06
Because you then probably have no documentation either
And this keeps things that belong together, together.
webmind no.. no docs :)
Juerd But, to put everything in a very narrow Perl 5 context: 19:07
webmind well if you want to hurt your eyes.. you might wanna look at the source code of my page.. that's what I kinda was referring to..
Juerd Declare subs before using them because otherwise you need ugly parens. You need the parens, because the parser has no indication otherwise that you're calling a sub. The parens do indicate this because this is a weird and annoying exception in how the parser works.
webmind parens == () ? 19:08
Juerd With exceptions removed, parens are only for precedence, and you MUST predeclare subs 19:09
I expect Perl 6 to behave in this different, more sane way. But I'm not sure, as Larry klings to some other weird behaviours as well.
parens are parentheses are ()
webmind :)
ah k
well I kinda like using them anyway :) 19:10
and then pugs didn't compile anymore :))
Juerd I'm forgetting something, but I'm not sure what it is exactly. It boils down to not being able to remove the special case for a (LHS)whitespaceless () postfixoperator. 19:11
But then, it's a postfix operator instead of a grammar hack, and it's fair because it was also predeclared.
webmind ok 19:12
ihb Juerd: back. considering i learned about Perl subroutines in 1999/2000, and it doesn't seem to be any widely agreed upon convention about params/arguments at that time, i don't find it amazing that i don't do your distinction between params and arguments in Perl. 19:13
Juerd Perl has indeed only recently become a more exact science. 19:15
Limbic_Region has anyone noticed Larry responding to the Perl oddities thread at the Monastery with p6 answers like a mad man? 19:16
Juerd Probably because with the advent of Perl 6, having clear what we mean is now more important.
Limbic_Region: No, but I don't read most of PM anymore.
Limbic_Region hmmm - perhaps that won't parse as intended s/like a mad man/abundently/
Juerd I have noticed that timtoady is very active in providing perl 6 answers in PM 19:17
But that isn't new
ihb Juerd: How would i say "Having several ..... types can be written as e.g. sub foo (\[$@%);". params or arguments?
Juerd ihb: Hard to say :)
ihb: Probably argument 19:18
Because the type is a property of the value, not of the name or signature.
(It's *part of* the signature, though) 19:19
ihb what about prototype "($;$)", does the semi-colon seperate required from optional argument or parameter?
Juerd argument, but it's part of the parameter specification 19:20
It's optional from the caller's point of view
ihb how do you define parameter again? 19:21
Juerd Something that is expected (or even optionally expected)
ihb so you could equally well say "optional parameter".
Juerd No, the parameter is there
Even if it's optional
Parameters are part of the sub's declaration. 19:22
This becomes more apparent and more important with multis
ihb so you can't say "foo has one optional parameter"?
Juerd It has the parameter anyway.
If you don't pass an argument for it, that doesn't take the parameter away.
ihb i don't see a conflict with that. 19:23
Juerd Parameters enable arguments. 19:24
They are their declaration.
parameter <-> variable
argument <-> value
ihb so "optional parameter" is nonsense? 19:25
Juerd Or, in more internationally accepted notation: parameter : variable :: argument : value
ihb: It might not be, but I, for one, have no idea what it could mean.
Every parameter is optional during hacking time, they're all there during runtime :)
Perhaps you could say that if a parameter is not used, it is redundant and thus optional 19:26
But that's probably not even worth thinking about :)
ihb that's what i'm getting at.
Juerd Note that "used" refers to the code block of the sub the parameter is of
Not to the sub's call 19:27
ihb so what does "optionally expected" mean?
Juerd As with sub double ($value, ?$optional_parameter) { ... } # You could leave $optional_parameter out of the code and it won't behave any differently, given sane calling code.
ihb: It can be there, but it's not required 19:28
ihb didn't you just say that you have no idea what "optional parameter" would mean, but you have it in that signature? i'm confused. 19:29
Juerd "expected" is not the right word anyway, but English lacks a word for "made able to exist", afaik
20:28 < Juerd> Perhaps you could say that if a parameter is not used, it is redundant and thus optional
rgs Juerd: evocate ?
Juerd "Perhaps"
qmole enabled?
Juerd I was just thinking of possible meanings
qmole: I've used that word in one definition, but it's too broad. 19:30
ihb Juerd: i think a clearer way of saying what you try to say would be "parameters are declared, arguments are passed".
Juerd ihb: Parameters declare arguments
qmole okay. i can't believe there isn't one :)
Juerd Or rather, the variables for the arguments
ihb Juerd: yeah, they can't declare arguments, that wouldn't make sense. 19:31
Juerd ihb: If you s/declared/declaration/, then it's a correct definition, but there is no longer a clear *distinction*
ihb: You could say that with .assuming, you're declaring arguments. 19:32
ihb Juerd: .assuming is currying?
Juerd Yes 19:33
ihb Juerd: anyway, perlsub needs to be fixed if this actually is an agreed-upon convention/definition in Perl 5.
Juerd &bar = &foo.assuming(quux => 5) declares that the argument named quux be 5 for &bar
ihb: Where there's no confusion possible, being relaxed about strict meanings of words can actually improve readability 19:34
ihb would it be wrong to say s/declares/defines/ 19:35
Juerd I was just defining something and thus tried hard not to introduce an inconsistency, but if outside the scope of this discussion I had to communicate the same, I'd probably say "the named argument 'quux'" instead of "the argument named quux"
ihb Juerd: ... except it makes you end up in useless discussions on irc.
Juerd ihb: my $foo is a declaration 19:36
$foo = 5 is definition
my $foo = 5 is declaration combined with definition.
sub foo; is declaration
sub foo { ... } is definition
(and declaration)
(after sub foo;, &foo is still not defined()) 19:37
ihb imho, perlsub is the authorative document on perl's subs, so it should be as correct as possible. it's hard to say that it's the Perl convention is perlsub doesn't support it.
Juerd: i know the different between declaring and defining subs.
s/t /ce / 19:38
Juerd ihb: There are loads of people who have a very strong opinion about doing the wrong thing. One of the wrong things that have a lot of supporters is writing something that isn't strictly correct, because it looks more "natural".
I do agree that perlsub needs to be fixed, but in that light I have a very big wishlist for the perldocs.
coaster "data is" vs "data are" 19:39
Juerd I'm glad the array/list thing is finally sorted out, but I wouldn't want to be the one who has to convince people who hate definition that using the right words is important.
coaster: Your sentence no verb, only subject. I don't know what you mean. 19:40
Possibly object.
ihb Juerd: datum = singularis, data = pluralis.
coaster most people write "...data is..." even though data is plural and should be written with are
Juerd That's not entirely true in today's meaning of the word. 19:41
Data is like array
ihb Juerd: i think it's OK to do the wrong thing, if you first state what's right and say you'll use the wrong thing to make things more comprehendable. :-)
Juerd "foo" *is* data
Because "foo" certainly is singular.
coaster foo is datum ;D
Juerd Datum is not English. That's Latin.
Now, if "datum" were your word for "date", "data" should in fact be a valid plural for it. 19:42
ihb and datum is very confusing because in swedish it means "date" (calendar).
Juerd That's what we have in Dutch. Fortunately, "datums" is also valid, so you can disambiguate a little.
obra ingy? will kwiki be the first application ported to perl6?
nnunley Soylent Green is people. Mmmm. Soylent Green.
Juerd obra: Aren't you going to beat him by porting RT? (And thus all of its dependencies? *grin*) 19:43
Steve_p Juerd, datum is in English, it just is not really used
ihb btw, is &foo in "my $foo; sub foo { $foo }" a closure?
Juerd obra: It would have the extraordinary advantage of having half of the Phalanx 100 ported as well :)
ihb a natural language is the funniest thing, it keeps changing and you can't define it. 19:44
Juerd ihb: Yes.
ihb Juerd: using which definition of closure?
Steve_p obra, I'm looking to get blosxom ported as soon as I can do a `stat` in Pugs 19:45
Juerd ihb: The one that says a closure is a procedure (subroutine) that uses externally declared local (lexical) variables :)
Steve_p has a bit to go in pugs to do that
ihb Juerd: is that the Perl 5 definition?
Steve_p err, Haskell
Juerd ihb: If you use the words in parens, yes.
:)
rgs Steve_p: that would be excellent.
nnunley Steve_p: Isn't that just another add to Posix.hs?
rgs Steve_p: blosxom only uses %*ENV{"PATH_INFO"} doesn't it ? 19:46
ihb Juerd: different people say different things on this issue.
ingy obra: Kwiki is already slow ;)
Steve_p rgs: no, it does stats, globs, and reads files 19:47
rgs Steve_p: Posix.hs would be the place to add a stat call.
glob is more difficult i think
Juerd ihb: That's because these things are hard to grok.
Steve_p Yeah, I started looking at it last weekend but had no time. It doesn't look like it'd be too bad to do
Steve_p hopes to avoid the mess that is the glob of Perl 5 19:48
rgs I thought about porting blosxom too.
ihb Juerd: do perl -MDevel::Peek -wle 'my $bar; sub foo { 1 } sub bar { $bar } my $baz = sub { $bar }; Dump \&foo; Dump \&bar; Dump $baz;'
Juerd: notice that '3. 0x182d604 ("&" 1--1)' at the bottom?
Juerd ihb: You need a very thorough understanding of something to be able to define it, and not many people have that. To make things worse, most people who do have in their minds a thorough definition of how things work, cannot express the system in words. 19:49
rgs er hm.
Juerd ihb: What about it? 19:50
Steve_p rgs, hmmm? 19:51
rgs I can't express it in words.
ihb Juerd: what does it mean?
Juerd I have no idea. 19:52
ihb Juerd: the other subs doesn't have it. i recall something about it being there and it had something to do with closureness. what becomes interesting is that &bar doesn't have it.
aha. 19:55
perlintern "If the 'name' is '&' the corresponding entry in frame AV is a CV representing a possible closure." 19:56
also, from perlfaq 7: "Closures are implemented in Perl as anonymous subroutines with lasting references to lexical variables outside their own scopes." But we've concluded that the perldocs needn't be trusted on complicated issues. perlref however supports the definition with anonymous subroutines only. 19:59
so can *someone* please tell me what is and what isn't a closure *in Perl 5*. :-)
Steve_p guesses there is something on perlmonks on closures 20:00
ihb Steve_p: disagreements there too, even the Perl "authoratives" disagree there. 20:01
qmole i'd agree with that perlfaq 20:02
Limbic_Region are closures like pr0n - I can't give you a definition but I'll know it when I see it?
qmole that was my understanding of them
Steve_p www.stonehenge.com/merlyn/LinuxMag/col09.html # merlyn's article
Limbic_Region The spirit of a closure is such that a lexical that should have been GC'd because it went out of scope doesn't because something still has a reference to it 20:03
/something/something still in scope/ 20:05
autrijus cat /etc/mak 20:39
oops, wrong window :)
Steve_p heh
autrijus is finally back to freebsd.
theorbtwo Congrats, autrijus. 20:40
autrijus whew :) 20:43
ingy autrijus: how is that sleep? 20:49
autrijus uneventful. 20:50
nnunley autrijus: Sufficient?
autrijus not at all. 20:51
Coke_ autrijus, shouldn't you be asleep? ^_^
ingy autrijus: I'm fighting with M::I and E::MM and subdir Makefile.PLs
Coke_ is too slow.
ingy hopefully I'll win
autrijus I hope that too. 20:52
ingy Then we can move Test.pm into ext/
autrijus maybe. but it is not XS?
or do you think it's not important, we should just throw things to ext/?
ingy that's what i would thik 20:53
think
but i still need to get the MM magics working first
autrijus: If i patch directly into inc/Module/Install/MakeMaker.pm, can you then backport 20:54
autrijus sure will. 20:55
mugwump ingy, is perlkwid available for use in perl5 programs via a source filter? 21:11
crysflame .
mugwump also, all kwiki.org links seem to be 403's 21:22
21:23 buu_sleeping is now known as buu
Coke_ OOC, what's the rationale on open:.comment::close:.comment. ? is there precedent for the trailing . there? 21:23
autrijus not afaics. 21:24
buu Coke_: No, it's purely random 21:26
Because KWID is the spawn of satan.
stevan autrijus: any movement on the multi-dimensional arrays?
autrijus stevan: yeah, I've got the problem grokked
stevan cool
autrijus just had not time to hack it; I'm still syncing things 21:27
and setting up env
stevan I was starting to think I was gonna need to buy a Haskell book :)
autrijus aww, just buy one :)
or read YAHT again
crysflame where's the haskell perl cookbook?
or.. whatever it was
stevan has some examples planned but needs nested data structures
obra autrijus, how much are you coding these days vs writing specs so others can implement?
autrijus it's in Eval.hs
[Syn "[]" [Var name, indexExp], exp] -> do
crysflame Coke: RFC 822 ends messages with a trailing dot
autrijus need to factor that out into a func and make it recursive 21:28
crysflame so if you replace ".comment" with "" in your mind and ".comment." with "."
since "" is the divider between the message headers and the content
autrijus that's all nees^Hds to happen
same thing for Syn "{}"
crysflame and then "." ends the content
Coke_ crysflame... that's very lame. =-)
or, should I say, "it's a stretch".
autrijus obra: it's the other way around... t/* is the spec :)
crysflame Coke: well, it's off the top of my head, what do you expect
stevan autrijus: I will look over it today, but no promises :)
autrijus obra: and as for implementation, I think I'm still doing about 80% of the haskell side things
stevan: sure, I appreciate it. it's probably not the easiest place to start reading, though. :) 21:29
stevan: although the logic is quite straightforward.
stevan autrijus: I am gonna start with YAHT, then we will see :)
autrijus stevan: if you are feeling glorious, the indexExp is currently singular
crysflame autrijus: is there a way to explicitly and permanently collapse a variable that may or may not contain a junction(s)?
autrijus if you can detect a list there, then you get slice assignment for free. 21:30
crysflame: sure, via unary prefix ?
crysflame ok
so $var = ?$var
obra 821 coral
crysflame obra: 467 obra
(huh?)
obra RFC 821, no?
crysflame for.. email?
RFC 2822 is the most current
i don't know what delineates the SMTP terminator, though 21:31
obra RFC *82_1_ is smtp, which should define the ".", not 822, which defines message format
autrijus crysflame: unary ? only gives you a Bool though
crysflame autrijus: erk
autrijus if you want values, trunk pugs now does $junc.values
crysflame i have any(7|8|9) in a variable
autrijus which may or may not be what you want.
crysflame normally each time i work with the variable in a print, it prints something, one of the three.
is there a .collapse() method that'll just collapse it, once, and make it stick?
autrijus you mean, pick one at random? 21:32
crysflame so if i have any(any(any()|)|...) and so forth
autrijus there is an argument for a .pick.
you are welcome to write a test for it.
I think damian has mentioned it a while back. grep p6l for ideas
crysflame ok, cool
hmm, okay 21:33
so my explanation melds 821 and 822 into an evil twisted joke. neato. thanks for correcting me -- i didn't realize smtp was so closely numbered
nnunley Blah. Almost done converting Pretty so it uses Text.PrettyPrint 21:41
Just trying to figure out a type err. :/ 21:43
autrijus !! 21:44
wow. amazing :)
what type err?
maybe #haskell can help?
or you can just commit and let me look at it? :)
ingy autrijus: need your help a second on M::I 21:46
autrijus yes?
ingy ok
so I defined build_subdirs()
which is working 21:47
build_subdirs('ext/Kwid')
autrijus woot
but?
Steve_p was just wondering how to add makefile steps to M::I
autrijus stevan: postamble
err
Steve_p: postamble
ingy and if I ln -s ../../inc
autrijus but there's no good API
Steve_p Great!
ingy it all works
buu complains about crappy nmake 21:48
autrijus for good API, see Module::Build
buu autrijus: Were you saying something about converting to Module::Build?
autrijus ingy: so you'd like to use abs path for inc in INC?
buu: yeah, I said something about patches welcome.
and I'd suggest redo BuildPL from scratch
Build.PL, even
buu Er, Makefile.PL ? 21:49
autrijus Build.PL. that's what M::Build uses
integral buu: using Build.PL would avoid all the nmake stuff
ingy autrijus: I need to do something
buu autrijus: ER, right, I know that, but build.pl doesn't exist now does it?
ingy it looks like M:::I::Admin loads modules by hand
buu integral: Yes, if there was a build.pl..
autrijus buu: right, so, it needs to be written.
writing a build.pl is not that hard. :) 21:50
integral buu: err, well you write it. See perldoc Module::Build, there's examples
buu autrijus: Right-o. But you said "redo build.pl", implying one already existed. So you confused me =]
ingy even though I declared `use lib '../../inc'`
hmm
autrijus buu: ahh. sorry. I mean "redo" in the "redoing what Makefile.PL does"
ingy: use FindBin and
buu Right. 21:51
autrijus "$FindBin::Bin/../../inc"
ingy ERROR from evaluation of /Users/ingy/src/pugs/ext/Kwid/Makefile.PL: Can't open inc/Module/Install/Base.pm for input:
No such file or directory at /Users/ingy/local/lib/perl5/site_perl/5.8.6/Module/Install/Admin.pm line 132.
Admin needs to be smarter 21:52
autrijus right. 21:53
it needs to fix paths.
ingy I'll add what you say in Admin
ok
autrijus cool. :)
and I need to sleep and let java compile itself.
autrijus sold soul to eclipse
buu The devil!
ingy btw, I think there must be only one inc/ dir
autrijus ingy: makes sense 21:54
crysflame ta 21:59
22:10 Coke_ is now known as Coke
ihb does the indirect object syntax buy anything over "regular" object syntax or is it just a matter of taste? 22:14
Juerd Taste. 22:16
Some people like "new SomeThing" over "SomeThing.new", because they're used to other languages 22:17
rgs the indirect object syntax is a hell to parse
Juerd It's a preference for more natural sentences
It makes sense when the method name is an action and the object is, well, the object 22:18
drink $beer makes more sense than $beer.drink
And join @array makes more sense than @array.join 22:19
This analogy fails when you censider actions that are done *by* the object
parse $parser makes no sense, $parser.parse does
rgs in python that's separator.join(list) 22:20
Juerd I prefer syntax-wise consistency, because I find that easier to parse
rgs awful
Juerd rgs: In pugs too, unless autrijus fixed that already :)
(Side-effect of not really having objects)
rgs arf :)
Steve_p me.drink $beer
Juerd Steve_p: Right, that's where it stops to make sense
Steve_p There's almost always an actor of some sort
ihb hoes does me.drink $beer parse?
rgs Steve_p: in perl 6 that's .drink($beer) in /me class :)
Steve_p is trying to remember which language uses "me" for the intra-class invocant 22:23
Coke moo? =-) 22:25
Juerd It's me, not moo.
Coke tries to figure out if juerd is making a joke or not. 22:27
buu Yes. 22:28
s/m/y/
Juerd Coke: Whenever you disagree with me, assume I am joking. 22:29
Coke: Whenever you have no idea what I'm talking about, also assume I am joking.
buu Juerd: Awesome.
Juerd Coke: Whenever you know what I'm saying, and you agree, let me know, for that boosts my ego :) 22:30
buu: This doesn't necessarily imply you are allowed to laugh :)
buu Juerd: RFC 42321 says other wise.
Juerd There is no rfc 42321 22:31
buu You lie. 22:33
Steve_p heh
Juerd buu: No. 22:37
crysflame hi, Juerd. 23:08
Juerd Hello
ingy is autrijus awake 23:11
crysflame he slept 23:12
ingy good
I've totally refactored the Makefile.PL
and added support to Module::Install for sub directories
stuck on a little thingy though 23:13
I guess I'll wing it
buu Juerd: can I laugh now? 23:41
Juerd buu: Find a coin 23:46