Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2005-02-26

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
13:45 ilogger starts logging #perl6 at Sat Feb 26 13:45:34 2005
13:45 ilogger has joined #perl6
13:46 feb autrijus: you're welcome
13:48 autrijus irclog frontpaged on pugscode.org.
13:54 Steve_p autrijus, < autrijus> nah. I'll just ask steve. ?
13:54 asi has joined #perl6
13:54 autrijus steve fink
13:54 autrijus not Steve_p :)
13:54 ingy hola
13:54 autrijus hihi ingy
13:55 ingy hi autrijus
13:55 ingy did the /doc thing work for you?
13:55 Steve_p OK :)
13:55 * Odin- places a sane-o-meter on the channel, wondering if it'll score above zero.
13:55 autrijus ingy: uhm no, so I moved it to lib/Perl6/lib
13:56 ingy hmmm
13:56 autrijus rationale is that I'd like it installed.
13:56 autrijus and become part of standard perl6 library.
13:57 autrijus as such it can't live in doc/.
13:57 autrijus (oh and we already have docs/.)
13:57 ingy it was supposed to be like the /pod/ dir in the perl dist
13:57 autrijus ah. I consider that layout rather broken, honestly
13:58 scw has joined #perl6
13:58 autrijus because you need special makefile magic
13:58 autrijus hi scw!
13:58 ingy and I thought docs was more like project docs
13:58 ingy I see
13:58 ingy ok by me sir
13:59 autrijus ok :) not saying it's the only Right Thing
13:59 autrijus but feels workable for now
13:59 autrijus we'll see how it goes :)
13:59 ingy kwid is working out oh so nice
13:59 ingy did you try diffing the doc?
14:00 autrijus mm?
14:00 autrijus I looked at it when I moved it
14:00 autrijus not diffing
14:00 autrijus or you mean the kwiki page?
14:00 ingy diff -u perlpod.pod perlkwid.kwid
14:01 autrijus ohh
14:01 feb has left "Client exiting"
14:02 autrijus interesting.
14:03 autrijus it looks truly nice.
14:03 ingy the translation exercise was very interesting for me
14:03 autrijus bootstrapping++
14:03 ingy I varied from kwiki in some ways
14:03 autrijus torgox++ # worked on perlpod and perlpodspec
14:03 ingy and used pod norms where appropriate
14:03 autrijus cool.
14:03 autrijus it's still supportable by a kwiki plugin of course, right?
14:04 ingy [...] == L<...> (for the most part)
14:04 ingy of course
14:04 ingy my favorite newbie is `...` == C<...>
14:05 ingy it cleans things up so much
14:05 autrijus yup
14:05 ingy I'll take another pass today
14:05 autrijus fwiw I ate [=...].
14:05 autrijus I mean, I hate.
14:05 ingy hate
14:06 ingy yes, I hate it too
14:06 ingy it was never a candidate for kwid :)
14:07 autrijus good :)
14:07 ingy autrijus: can you make pugs recognize '=kwid'
14:07 ingy I tried but failed
14:07 autrijus and still ends by =cut?
14:07 ingy yes
14:07 ingy (it's in the spec)
14:07 ingy the spec being perlkid for now
14:08 ingy perlkwid
14:08 * Steve_p sees more pair goodness to test
14:09 ingy actually perl should ignore /^=[a-zA-Z0-9]+/ - =cut
14:09 ingy so =kwid is valid even in perl5 today
14:10 ingy btw, does perl6 have __END__ ?
14:13 autrijus no, it's =begin END
14:13 Steve_p heh
14:14 pjcj Now that's just copying Windows!
14:16 Steve_p I was thinking Pascal or PL/SQL myself :)
14:17 ingy there is one major podism I need to resolve
14:18 ingy I note it in my checkin
14:19 ingy the whole =over =item =back dance has its merit
14:19 ingy not for the nominal list case
14:19 ingy but for the more complicated lists
14:20 * ingy has to run
14:20 ingy stay tuned...
14:22 * statico won't touch that dial!
14:23 statico ingy++ # moving forward with kwid
14:23 * Steve_p guesses the preview was discussed on #kwiki last night
14:23 * integral thinks pod's problem there is not that =over etc dance, but reusing it for numbered and bulleted lists
14:24 Steve_p Yes.  Hate.
14:24 ingy integral: but what's worse is another kind of list
14:24 ingy that is not bulleted or numbered but worded
14:24 ingy =item this
14:24 ingy blah blah
14:24 ingy =item that
14:25 ingy more stuff
14:25 integral just separate all the things out, surely?
14:25 ingy I need to find a sane roundtrip
14:26 ingy btw {{*bold*}} == {*bold*} == *bold*
14:27 ingy {{ leave asis }} == { leave asis }
14:29 ingy `` C<stuff> == `stuff` ``
14:29 ingy I think I can handle the insane edge cases sanely and beautifully
14:29 ingy but I really gotta run
14:32 shapr I gotta unicycle! w00!
14:33 * Steve_p watches shapr's first attempt and hands him an icepack ;)
14:33 shapr http://www.scannedinavian.com/images/uni-hop.jpg
14:33 Steve_p Does Perl 6 have a "defined"
14:34 shapr Steve_p: I got my first stitches in 33 years almost a year ago when I was learning :-)
14:34 shapr almost a
14:34 shapr huh, weird C-q C-m typo
14:34 Steve_p heh
14:37 wolverian Steve_p: yes
14:38 wolverian (pugs has tests for it)
14:38 Steve_p wolverian, it appears to have some issues
14:39 Steve_p Damn, no nopaste!
14:39 Steve_p this seems to choke t/op/not.t
14:39 Steve_p ok ! defined $not, "not() returns undef in sclalar context";
14:40 * Steve_p is being bothered by an attentio-seeking cat
14:41 * shapr has five of them :-/
14:49 autrijus hm
14:49 autrijus podBlock parsing harder than I thought.
14:49 autrijus but then, I'm being diverted by $work
14:51 autrijus I'll commit what little I have first
14:51 autrijus maybe someone who wants to trace parsec can give it a try -- it's r315.
14:51 autrijus otherwise I'll come back in a bit
14:53 metaperl has joined #perl6
14:54 autrijus rehi
15:03 scw autrijus: Oh! so when I login, it's yourself instead of bot said "autrijus> hi scw!" !
15:03 autrijus uh.
15:03 autrijus yes.
15:03 autrijus I am not a bot.
15:03 autrijus but then, maybe I am, but I'm not self-aware.
15:03 autrijus hard to tell :)
15:06 Steve_p heh
15:52 asi has quit IRC ("ChatZilla 0.9.52B [Mozilla rv:1.6/20040119]")
16:40 stevan has joined #perl6
16:44 metaperl has quit IRC (" HydraIRC rocks! -> http://www.hydrairc.com <-")
16:50 metaperl has joined #perl6
17:10 autrijus yay.
17:10 autrijus finally got $dayJob nailed
17:10 autrijus ultra complex requirement :-/
17:11 autrijus however managed to get it done in 2hrs thanks to haskell.
17:11 * autrijus wonders if perl6 will make it even easier.
17:12 justatheory has joined #perl6
17:13 wolverian I'm slightly annoyed that perl6's pattern matching (mmd) isn't syntactically as nice as haskell's
17:14 autrijus wolverian: if you can list specific points, we may be able to propose on p6l.
17:14 autrijus I'd like to have full pattern match facility as well.
17:14 wolverian I'm not sure how I'd go about fixing it.
17:14 wolverian I'll think about it tonight, though.
17:14 autrijus it applies to := and ::= too
17:14 autrijus which is the same as letrec
17:14 wolverian hmm. do you have any ideas there?
17:15 autrijus have you seen array unpacking syntax?
17:15 autrijus and hash unpacking
17:15 autrijus in parameter binding
17:15 wolverian pairs to pairs? yes.
17:15 autrijus hash unpacking is really like record pattern matching in haskell, and array to list
17:16 autrijus s/array to list/array unpacking is like list pattern binding as well/
17:16 autrijus I think the magical _ helps.
17:16 autrijus and the use of constants as part of unpacking
17:16 autrijus but I think that's minor
17:16 autrijus the real deal is to use ~~ in binding.
17:16 autrijus if you can use ~~, you're set.
17:17 autrijus because ~~ is even more powerful than haskell patterns :)
17:17 wolverian hrm.
17:17 autrijus (you can use parsec-like Rules, for example.)
17:18 autrijus # http://dev.perl.org/perl6/synopsis/S04.html "Smart matching"
17:19 autrijus so yes, I'd like to see
17:19 autrijus multi sub foo ($x ~~ foo(), $y ~~ bar()) { ... }
17:19 autrijus where foo() and bar() may be rules, roles, lists, hashes, etc.
17:19 wolverian my (Foo @bar, Baz @quux) <== get_foos_and_bazes(); # if <== worked like this..
17:20 integral hmm, maybe some new code layout habits could help
17:20 integral maybe even being able to put multiple signatures and bodies after a single 'multi sub foo'
17:20 autrijus wolverian: that's :=
17:20 wolverian autrijus: oh, that works?
17:20 autrijus yup.
17:20 autrijus so it's not that bad :)
17:20 wolverian I thought it only distributes pairs
17:20 autrijus no, it distributes using the same rule as mmd.
17:21 autrijus or rather, as parameter binding.
17:21 wolverian oh, that's okay then.
17:21 autrijus I still miss pattern guards.
17:21 autrijus I think allowing ~~ in signature is like pattern guards.
17:21 wolverian it would enlargen signatures a lot, I think.
17:21 autrijus true.
17:21 autrijus and there's the nasty side effect thing.
17:22 autrijus which is why I'd like a functional sublanguage :)
17:22 autrijus but I already mentioned it.
17:22 wolverian is 'Foo $bar' in the signature a .does() test?
17:22 autrijus it is a ~~ test.
17:23 autrijus multi sub baz (&bar<Code, Int, Int>)
17:23 autrijus code unpacking works too.
17:23 wolverian and $bar ~~ Foo is a .does() test. okay.
17:23 autrijus yup.
17:23 autrijus so allowing explicit ~~
17:24 autrijus is merely generalizing things.
17:24 wolverian (I love perl6 already just because it's .does(), not .isa())
17:24 theorbtwo has quit IRC (Read error: 110 (Connection timed out))
17:24 autrijus duck typing ++ :)
17:24 wolverian yes.
17:24 autrijus and .does can be made to do side effects as well
17:24 autrijus so there's already side effect bug
17:24 autrijus I think explicit ~~ won't hurt.
17:24 wolverian where is &bar<Code, Int, Int> defined?
17:25 autrijus S06
17:25 autrijus grep for "The closure parameter"
17:25 wolverian hadn't noticed that before. thanks!
17:25 autrijus np :)
17:25 wolverian 6
17:26 wolverian er, wrong window
17:26 autrijus so yeah, there's this trait ~~
17:26 autrijus and class/role ~~
17:26 wolverian (it takes so time to get used to ratpoison)
17:26 autrijus and sigil ~~
17:26 autrijus but no explicit ~~
17:26 autrijus multi sub foo ("constant") { ... }
17:26 wolverian this is going to be a p6l suggestion, isn't it?
17:27 autrijus which is made into --> multi sub foo ($dontCare ~~ "constant") { ... }
17:27 autrijus it is if you'd like to write it :)
17:27 wolverian I wouldn't probably be coherent enough.
17:27 autrijus or ask for another kind soul for summarization
17:27 autrijus that is fine. p6l is very constructive nowadays.
17:27 autrijus fancy that.
17:27 wolverian horrid.
17:27 wolverian :)
17:27 autrijus :)
17:29 autrijus the dontCare defaulting is actually pretty strong.
17:30 wolverian what is the haskell term for thsi?
17:30 wolverian this, rather.
17:31 wolverian pattern guards?
17:31 autrijus "Pattern bindings"
17:31 autrijus that's unpacking
17:32 autrijus assertion at binding level is called "guards"
17:32 autrijus and using binding as assertion is called "pattern guard"
17:32 autrijus you can refer to http://www.haskell.org/tutorial/patterns.html
17:33 wolverian thanks. so this isn't valid right now? my ($foo ~~ bar(), $baz ~~ quux()) := ...;
17:33 autrijus nope. far from it.
17:33 autrijus the haskell case expression is like perl's given expression
17:33 wolverian yeah.
17:33 autrijus so same idea can be used there.
17:34 autrijus (i.e. haskell can also do guards and bindings inside case conditions)
17:34 wolverian using ~~ like that directly would be special syntax, and I don't think that would fly. it'd be special syntax in signatures as well, but those are already special, so..
17:34 sorje has joined #perl6
17:34 autrijus if I have to pick one feature in haskell that really shines, that is it :)
17:34 autrijus you mean ~~ in LHS being special?
17:34 wolverian yes.
17:34 autrijus but there is already implicit ~~ all around
17:34 autrijus so it's just unifying this idea
17:35 wolverian hrm. well, yes.
17:35 autrijus (pattern guards isn't in haskell 98 either, it's GHCism.)
17:35 autrijus I refer you to the excellent paper, " Pattern Guards and Transformational Patterns"
17:36 autrijus # http://scholar.google.com/scholar?hl=en&amp;lr=​&amp;safe=off&amp;q=cache:UxrfRtY_0XAJ:www.cs.o​rst.edu/~erwig/papers/PGandTP_Haskell00.ps.gz++​Pattern+Guards+and+Transformational+Patterns
17:36 wolverian thanks :)
17:36 autrijus =)
17:37 autrijus spj++ # full of good ideas
17:38 wolverian how would you state a less than/larger than assertion with ~~?
17:38 wolverian (can you do that in haskell? I'm woefully ignorant.)
17:41 wolverian I guess '$foo ~~ $min..$max' might work :)
17:42 wolverian the problem here is that ~~ is ugly when it's extended to do so much.
17:44 autrijus uh
17:45 autrijus smart matching is inherent in p6
17:45 wolverian yes, that's not what I meant, obviously
17:45 wolverian I think, anyway
17:45 autrijus $foo ~~ { $_ < 3 }
17:46 autrijus is how you assert for less than
17:46 wolverian right. that's probably a fair bit more efficient than smart matching against a range :)
17:46 autrijus depends on how good the optimizer is :)
18:13 autrijus journal up.
18:22 obra goes to read
18:29 nnunley does, too.
18:33 autrijus -c support in trunk now.
18:34 nnunley autrijus: So $work allows you to hack in Haskell?  Most excellent.
18:35 autrijus :)
18:35 autrijus the good thing about owning a small consulting company is that you can usually choose your tools :)
18:35 * nnunley nods.
18:35 nnunley True.
18:39 nnunley So...  If we were to use QuickCheck to validate the Haskell side, would you inject it the same way you injected Parsec?
18:39 autrijus uhm, no
18:39 autrijus I inject parsec because I plan to port it into a state transformer
18:39 autrijus inside the Eval monad
18:40 autrijus I think I can use QC as-is.
18:40 * nnunley nods.  "It does have a side effect of increasing the portablity of the code to other Haskell implementations."
18:40 autrijus I did not find a way to StateTify Parsec without modifying the small source.
18:40 * nnunley nods.
18:40 autrijus true, but we already must use binary IO
18:40 autrijus and lotsa pattern guards
18:40 autrijus and eventually unboxed types
18:40 autrijus so we're pretty tied to GHC right now.
18:41 nnunley Ok.
18:41 Rooty has joined #perl6
18:41 nnunley I think I'm going to try to make QuickCheck my vector into learning Haskell.
18:41 Rooty has left
18:41 autrijus that's wonderful.
18:41 autrijus http://perlmonks.org/?node_id=434803 # AST
18:42 autrijus anyone think adopting Text.PrettyPrint in Pretty.hs will help? :)
18:42 autrijus that will give us beautiful deparse and AST output.
18:42 autrijus if someone is looking for a small haskell intro project, that could be it :)
18:42 * nnunley grins.
18:43 autrijus T.PrettiPrint is a joy to use :)
18:43 autrijus and Pretty.hs is pretty much self explanatory.
18:43 autrijus s/PrettiPrint/PrettyPrint/
18:44 nnunley I remember basing a pretty printer API in Java on it.
18:45 autrijus :)
18:45 autrijus but, sleep. & boarding in 11 hrs
18:45 autrijus hmm, 10.
18:46 nnunley autrijus:  Sleep good.
18:46 autrijus :)
18:46 * autrijus waves &
18:49 nnunley Safe journey.
18:56 stevan has quit IRC ("Leaving")
18:57 shapr nnunley: QuickCheck is most nifty, if you need help with it, bug me. I wrote a Test-Driven-Development version of QuickCheck.
18:59 nnunley shapr: Thanks.  It feels a little daunting to start out with in Pugs.
18:59 nnunley shapr:  Given that there's no Arbitrarys for the AST yet. :)
19:02 nnunley shapr:  I guess I'm just trying to figure out a good cut point to start with.
19:13 nnunley shapr: Hrm.  Do you have a reference to your TDD version that I can look at?
19:14 shapr nnunley: http://www.scannedinavian.org/~shae/tdd-qc.tar.gz
19:14 shapr nnunley: Check out the README, and be warned that I'm probably the only regular user of that code :-)
19:15 shapr If you think of a better way to save failing test cases, or if you find bugs where it no longer does some original QC stuff, please tell me.
19:16 nnunley No problem.  As long as I don't start gibbering and chanting 'aie, aie, cthulu, cthulu', I should be fine.
19:16 * shapr snickers
19:17 shapr Hastur, Hastur, Hast-urk!
19:20 * nnunley installs hugs.
19:47 nnunley Aie... Aie...
19:47 nnunley Back to the YaHT :)
19:49 shapr hehe
19:49 shapr Any specific questions?
19:49 buu has joined #perl6
19:50 nnunley Just that I don't have enough Haskell yet.  I've read through SOE...  But since I never tried to apply it, it's all a little nebulous for me right now.
19:53 nnunley shapr:  So I stand at the foot of the cliff and wonder, 'How do I start climbing?'
19:53 buu Am I missing something trying to check out pugs?
19:53 shapr nnunley: Have you written any Haskell yet?
19:53 buu svn checkout svn://svn.openfoundry.org/pugs gives me an error
19:53 nnunley shapr: Simple stuff from the first few chapters of SOE.
19:54 buu Oh. http://, not svn://
19:54 integral buu: http://
19:54 buu integral: Oh wow, you can see me.
19:54 shapr imho, easiest approach is to learn the pure part first, and tackle monads after.
19:55 integral buu: I only /ignored you in #perl
19:55 buu Weird.
19:55 shapr nnunley: my first program was a text mandelbrot - http://www.scannedinavian.org/~sh​ae/src/haskell/Mandelbrot-0.1.hs
19:57 nnunley shapr:  I think it's just a mental block.  I can read that without a problem.
19:58 shapr well, can you write a julia fractal?
19:58 crysflame mm, fractint.
19:59 nnunley shapr: Good challenge.  I'll see.
19:59 shapr feel free to steal all/any of my code there.
20:21 buu Hrm. I wonder how to get haskell in cygwin
20:26 justatheory has quit IRC ()
20:27 sorje has quit IRC (Remote closed the connection)
20:28 b6s has joined #perl6
20:39 b6s has quit IRC ("leaving")
20:51 nnunley buu: I'm pretty sure you can just download a copy of ghc -- http://use.perl.org/comments.pl?sid=25119
20:51 justatheory has joined #perl6
20:51 nnunley That's a bit relevant to what you're about to experience.
20:52 buu Yeah, I got the binary
20:53 shapr another dimension, not only of sight and sound...
20:54 stevan has joined #perl6
20:54 buu Crap.
20:55 buu "Can't find module 'System.Posix.Unistd'
20:57 buu Hrm. ghc -v lists stuff like: c:/ghc, which should work
21:00 nnunley buu:  Did you run perl Makefile.PL ?
21:00 nnunley Apparently, you want to use nmake to build.
21:00 buu I ran perl Makefile.PL
21:00 buu But I can't use nmake
21:00 buu So
21:01 nnunley According to a message deeper in the thread, Makefile.PL will download nmake for you.
21:01 buu Doesn't seem to.
21:02 buu I just ran it, theres no mention of nmake in the file.
21:02 buu And if I exit cygwin to run nmake, it can't find my perl =/
21:08 iblech has joined #perl6
21:09 iblech Hi, just found a bug in latest Pugs: ./pugs -e 'say say "hi"' outputs "hi\nhi\n1", and not the expected "hi\n1\n1"
21:11 iblech err, the expected output is of course "hi\n1"
21:11 nnunley shapr: Fun... Going to define a julia point as an infinite stream. :)
21:11 shapr oooh, neat
21:11 iblech You can check that with Perl 5: perl -we 'print print "hi"' outputs the correct "hi1"
21:13 crysflame huh
21:13 crysflame say returns what it said instead of 1?
21:14 crysflame that sort of makes sense, if you want to do something with the result of the interpolation done inside what was passed to say after it's said.. but isn't terribly compatible with perl5 behaviour of print returning "true", i guess.
21:14 buu s/true/boolean/
21:14 iblech crysflame: Because of a bug, it depends ;) -- ./pugs -e 'my $x = say "hi"; say $x' outputs "hi\n1"
21:15 integral write a test :-)
21:39 b6s has joined #perl6
21:56 theorbtwo has joined #perl6
21:56 iblech has quit IRC (Read error: 113 (No route to host))
22:13 theorbtwo has quit IRC (Remote closed the connection)
22:16 alinbsp has quit IRC ("Leaving")
22:26 edgewalker has joined #perl6
22:39 iblechbot has quit IRC (Connection timed out)
22:40 theorbtwo has joined #perl6
22:44 justatheory has quit IRC ()
22:46 justatheory has joined #perl6
23:22 Juerd Dutch Perl Workshop was fun
23:22 Juerd That part of my car exploded was not
23:22 luqui your car exploded?
23:22 Juerd Part
23:23 luqui oh, now I can parse that sentence
23:23 Khisanth missing comma somewhere :)
23:23 luqui no, it's fine
23:23 luqui it's just hard to parse
23:23 luqui some people might prefer "That part of my car exploded, was not"
23:23 luqui but both are correct
23:23 Juerd I was just starting it and then all of a sudden a loud bang introduced the end of my car's life
23:24 Juerd Comma to separate the topic is wrong in Dutch
23:24 Juerd So I'm not used to using that
23:24 obra as a native speaker ""That part of my car exploded, was not"" is funny to me
23:24 mdiep the use of the comma seems out of place (wrong)
23:25 Juerd Anyway, RIP $car
23:25 mdiep err, s/the use//
23:25 Juerd Where P stands for Pieces
23:25 Juerd Wendy made pictures of the brokenness
23:26 Juerd When she sends them to me, I'll show them to you
23:26 justatheory has quit IRC ()
23:29 stevan has quit IRC ("Leaving")

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo