Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-12-11

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 bsb joined perl6
00:40 nekokak joined perl6
00:45 awwaiid joined perl6
01:15 polettix joined perl6
01:16 rafl Will Perl 6 have something like perl5's as.pm?
01:59 lyokato joined perl6
02:41 mjk joined perl6
02:58 tcliou joined perl6
02:59 Tene huh.  That's clever.  I haven't seen that before.
02:59 Tene (as.pm)
02:59 tcliou is now known as TzuChiang
03:01 nothingmuch aliased is a little bit saner
03:02 nothingmuch it doesn't actually alias
03:02 nothingmuch but just exports a sub to the importing class
03:03 nothingmuch use aliased "Very::Long::Module::Name" will export Name, and you can use it as a bareword and even without quoting when not doing OO, since it's a sub ($)
03:03 nothingmuch but yes, as is very cool =)
03:06 nipotaway is now known as nipotan
03:53 spoopithy joined perl6
04:17 dduncan joined perl6
04:26 Lee__ joined perl6
05:19 perlbot joined perl6
06:13 kanru joined perl6
06:15 BooK joined perl6
06:25 nipra joined perl6
06:39 RHainsworth joined perl6
06:41 RHainsworth left perl6
06:46 Dr_Pi joined perl6
06:47 patsalov joined perl6
06:47 patsalov left perl6
07:09 glasser` joined perl6
07:35 ozo joined perl6
07:44 marmic joined perl6
07:45 dduncan left perl6
07:54 iblechbot joined perl6
08:00 Lee joined perl6
08:50 drrho joined perl6
09:07 elmex joined perl6
09:43 BooK_ joined perl6
09:51 andara joined perl6
10:15 devogon joined perl6
10:24 spo0nman joined perl6
10:41 RHainsworth joined perl6
11:03 ruoso joined perl6
11:34 RHainsworth left perl6
12:07 chris2_ joined perl6
12:09 chris2_ is now known as chris2
12:16 macroron joined perl6
12:19 macroron joined perl6
12:45 macroron joined perl6
12:48 macroron joined perl6
12:59 macroron joined perl6
13:01 b00t joined perl6
13:19 Limbic_Region joined perl6
13:21 * Limbic_Region dreampt that he met audreyt on an airplane headed for somewhere in Pennsylvania last night
13:27 macroron joined perl6
13:38 DebolazX joined perl6
13:40 gnuvince joined perl6
13:44 RHainsworth joined perl6
13:44 RHainsworth left perl6
13:47 iblechbot joined perl6
13:47 nipotan is now known as nipotaway
13:48 bonesss joined perl6
13:50 * Limbic_Region has a couple of questions regarding lazy evaluation
13:52 Limbic_Region Does laziness only apply to lists and iterators or can it apply to anything?
13:52 Limbic_Region Does laziness only apply to lists and iterators or can it apply to anything?
13:54 Limbic_Region grrr - my apologies, I am having serious lag issues and sometimes my input finds its way to the bit bucket and sometimes it doesn't
13:56 Roadrunner joined perl6
13:56 Limbic_Region I was thinking something along the lines of:  my $blind_mice; my $answer = $blind_mice * 14; $blind_mice = 3; say $answer;  # 42 of course
13:58 Roadrunner Hello All!
13:58 Roadrunner How to use "flock" system call inside perl script? I want to use it instead of "flock" perl wrapper.
13:59 wolverian Roadrunner, you probably want #perl instead. this channel is for the development of the next version of perl.
14:00 kolibrie Limbic_Region: audreyt's Scalar::Defer for Perl 5 says you can say: my $answer = lazy { $blind_mice * 14 };
14:00 kolibrie but I don't know if anything is written for this in perl 6
14:03 Roadrunner left perl6
14:06 Limbic_Region kolibrie - well, I am not even sure what I have seen of Lazy in Perl 6 is what I am thinking of
14:08 Limbic_Region *shrug*
14:19 gaal IIRC lists are the only things that are lazy by default in Perl 6. There will be a pair of keywords for lazy/defer as in the P5 module, but "defer" is already used in STM so I think Larry was looking (and had perhaps found) an alternative name for it.
14:20 Limbic_Region gaal - I was wondering how something like my @array = lazy/defer %hash.keys; # would work
14:21 Limbic_Region gaal - cause I could see multiple behaviors and more than one desireable
14:23 kolibrie Limbic_Region: for lazy, every time @array is read, it looks at %hash to see the current keys
14:24 kolibrie for defer, in looks at %hash the first time, but afterwards is static
14:24 gaal kolibrie: if you're talking about the p5 module, it's the other way around :)
14:24 kolibrie gaal: shucks
14:25 * kolibrie remains silent most of the time for a reason
14:25 gaal Limbic_Region: in your example, presumably it's %hash.keys that needs to be lazy here
14:25 Limbic_Region kolibrie - those are the behaviors I would expect if @array were a scalar
14:26 gaal kolibrie: you'd have spent the rest of your days being wrong about this if you had :)
14:26 kolibrie gaal: I'll still probably explain it wrong from time to time
14:26 kolibrie that's why I document everything I write, I'll forget how it works within days or weeks
14:26 gaal that makes defer { $world_population } of us
14:27 kolibrie of course, in Perl 6 you can probably bind @array := %hash.keys
14:28 Limbic_Region so eliminating the case of assign once and static forever, what would you expect with @array[3];  # change %hash; @array[3]
14:28 gaal you mean #( change hash )  :)
14:28 wolverian should grammars have a "default" rule to call, a la .new in classes?
14:28 Limbic_Region hrm, I am not explaining this quite right
14:29 kolibrie gaal: #( less than one line comments are cool)
14:30 gaal huh, the bottom symbol is a quarter-line comment symbol _|_
14:30 gaal (for of those make up a #)
14:30 Limbic_Region and as such I will shut up until I can explain it the way it is gently bouncing around my head
14:31 kolibrie gaal: let's not propose that symbol for quarter-line comments
14:32 PerlJam wolverian: when would the default be called?  What's the syntax to invoke a grammar (as opposed to a specfic rule within a grammar)?
14:32 kolibrie Limbic_Region: if @array is bound to %hash.keys and you change %hash, @array will change with it
14:32 wolverian PerlJam, <Foo> vs <Foo.rule>, I suppose.
14:32 PerlJam kolibrie: It's the other way that's more interesting.
14:33 kolibrie if you change @array, %hash will change too
14:33 PerlJam wolverian: Then how does one differentiate between a call to a grammar and a call to a rule?
14:33 PerlJam er, how would *perl* differentiate.
14:33 wolverian PerlJam, ucfirst? ;)
14:35 kolibrie wolverian: I don't think there is a default rule in a grammar.  But one rule can be set up as the main one that calls all the othes
14:35 kolibrie others, even
14:36 PerlJam wolverian: in the parrot compiler tools, the "default" rule (ala what kolibrie just said) is called "apply".
14:36 wolverian kolibrie, right. I just kind of don't like that you don't know which one it is without reading the documentation.
14:37 kolibrie MiniPerl6 has a 'parse' top-level rule, but uses 'comp_unit' right now
14:37 kolibrie so it does not have to parse the whole input at once
14:40 hexmode joined perl6
14:44 stevan Limbic_Region: I think hard part about what you are describing is that you are talking about lazy evaluation in a side-effectful context
14:45 stevan Limbic_Region: in haskell you have no side effects (like variable re-assignment), so it is a non-issue for them
14:45 Limbic_Region stevan - yes, that is some of what I am thinking
14:46 Limbic_Region stevan - but I guess I was also thinking that both sides of the assignment could be lazy too
14:46 stevan yes
14:47 stevan I think this would probably be completely unpredictable though
14:47 stevan the beauty of haskell and its laziness is that they can be sure the value will always be the same
14:47 Limbic_Region right
14:47 stevan and just get around to evaluating it when they want to :)
14:48 Limbic_Region and what about allows for default values if the thing you were going to lazily evaluate disapears before you get a chance to interogate it
14:49 Limbic_Region or even better - spooky action at a distance - if the thing you were lazily basing your values on goes *poof*, it magically updates your value even if the user land code never asks it to
14:51 idiotmax joined perl6
14:52 Limbic_Region in any case, this all started over a post at the Monastery concerning wormholes and time travel
14:55 fglock joined perl6
14:58 * kolibrie wants a TARDIS for Christmas
15:00 kolibrie fglock: I have a meeting now, but would like to discuss grammars with you a bit later
15:00 Limbic_Region kolibrie - if you are getting one for xmas, couldn't you just come back to now and give it to yourself early?
15:06 fglock kolibrie: ok!
15:20 cjeris joined perl6
15:35 hexmode joined perl6
15:57 kolibrie Limbic_Region: I'm not sure if that may break the rules of time
16:00 Lee__ joined perl6
16:01 kolibrie fglock: I have between 20 and 200 types of documents, and I want to extract similar information from each of them
16:01 weinig|bbl is now known as weinig
16:01 kolibrie it is very similar to my Practical Extration with Perl 6 talk
16:02 kolibrie I like the way MiniPerl6 is set up with a grammar on one side, an emitter on the other, and a glue script in the middle
16:02 fglock kolibrie: yep
16:03 tcliou joined perl6
16:03 kolibrie I am thinking of defining the object in the emitter, and then have a differet grammar for each type of documnt
16:04 kolibrie I would like to use inheritance in the grammars, since many items will be similar across many of the document types
16:04 fglock kolibrie: you can use v6.pm in the same way as mp6
16:05 kolibrie fglock: I thought so.  I'll try to set something up today
16:06 hexmode joined perl6
16:06 kolibrie I would like to add tests to v6.pm, or wherever is appropriate, so that I will know when things change and I have to make adjustments
16:07 kolibrie fglock: would those go in Pugs::Compiler::Perl6, or Pugs::Compiler::Rule, or somewhere else?
16:08 fglock the best place would be under pugs t/
16:08 kolibrie okay
16:09 fglock so that they can be tested under pugs and p6-parrot too
16:09 kolibrie under regex, or under examples?
16:12 fglock regex, I guess - it can be moved later
16:12 kolibrie okay
16:13 fglock and writing failing tests is a good thing too
16:13 kolibrie that's true too, especially if it means they'll get fixed
16:21 Limbic_Region note however, if the test leads the harness to hang or blowup they should be written as flunk()
16:21 * kolibrie does not plan on hanging or blowing up any anything
16:23 kolibrie hmm, right now I can't get pugs to build (it's been a few weeks, at least, so it might need some coaxing)
16:23 pasteling "kolibrie" at 66.239.158.2 pasted "pugs build error - 'network-any' and 'setup-config'" (42 lines, 2.5K) at http://sial.org/pbot/21718
16:24 Limbic_Region kolibrie - you didn't build with extra-libs
16:25 integral (apt-get install libghc6-network-dev)
16:25 kolibrie integral: thanks
16:29 kolibrie oooh, this is nice, I've never seen the '[ 1 of 97]' before
16:30 Limbic_Region kolibrie - first time using 6.6 then?
16:30 kolibrie Limbic_Region: maybe
16:31 integral you mean "yes"
16:31 kolibrie :)
16:31 Limbic_Region kolibrie - you will then be happily suprised with the speed improvements
16:31 integral Limbic_Region: Despite the speed improvements, my personal code still can take 40 minutes to compile 60 lines :-)
16:33 kolibrie integral: I hope that's on a slower-ish computer
16:34 integral medium
16:36 chris2 joined perl6
16:36 Limbic_Region integral - I have found CPU has little effect on Haskell/Pugs - it is all about the memory
16:45 kolibrie alas, another error
16:45 pasteling "kolibrie" at 66.239.158.2 pasted "pugs build error - Pugs.Embed.Parrot In function ‘PugsziEmbedziParrot_dLGv’" (46 lines, 1.5K) at http://sial.org/pbot/21719
16:47 Limbic_Region kolibrie - have you tried without an embedded parrot?
16:47 kolibrie Limbic_Region: that is (supposedly) without embedded parrot
16:47 kolibrie which is why it is so confusing
16:48 Limbic_Region hrm - dunno.  The only other thing I can think of is weird third-party issues after upgrading to 6.6
16:49 Limbic_Region I don't remember it having anything to do with embedded parrot though - I wiped out third-party, svn'd up, and it went away
16:50 integral kolibrie: Did you build from a complete clean check out?
16:51 kolibrie integral: no
16:51 kolibrie but I don't think I have local modifications that are not commited
16:52 gaal try rm -rf dist/.......Pugs/Embed*
16:52 gaal for some value of .......
16:52 integral kolibrie: I don't mean modifications to source, more left older build files.
16:53 gaal also rm src/Pugs/Embed/Parrot.hs
16:53 kolibrie ls dist/build/Pugs/Embed/
16:53 kolibrie Parrot.hi  Pugs.hi  Pugs.o
16:53 gaal kill 'em all
16:53 gaal make will know its flock
16:53 Zerg_Mortron joined perl6
16:53 Zerg_Mortron is now known as DarthFredd
16:54 kolibrie same error, do I need to Makefile.PL?
16:54 kolibrie or even realclean?
16:55 * kolibrie tries a realclean
16:57 Limbic_Region realclean, kill em all, svn up, Makefile.PL make
16:57 gaal and rm src/Pugs/Embed/Parrot.hs (in the src tree, not dist/)
16:58 gaal also sv? st to make sure you don't have any stray local changes
16:58 kolibrie ls src/Pugs/Embed/
16:58 kolibrie Haskell.hs    Parrot.hsc    Parrot_hsc.h  Pugs.hs
16:58 kolibrie Parrot.hs     Parrot_hsc.c  Perl5.hs
16:58 gaal ECHO Y | FORMAT C:
16:58 gaal that's okay then
16:59 TimToady did you ever do a "make install"?
16:59 buetow joined perl6
16:59 kolibrie not in ages, or maybe ever on this computer
17:00 kolibrie hmm: /usr/local/bin/pugs -v .... Version: 6.2.12 (r11264)
17:01 kolibrie gaal: so still remove src/Pugs/Embed/Parrot.hs?
17:02 justatheory joined perl6
17:03 DarthFredd left perl6
17:03 gaal kolibrie: yes, it's generated from Parrot.hsc
17:04 gaal hsc files are haskell source with some special preprocessor moo to ease FFI, foreign function interface.
17:09 ashleyb joined perl6
17:09 kolibrie gaal: hmm, so perl has .pm -> .pmc (compiled) and haskell has .hsc -> .hs ?
17:09 _bernhard joined perl6
17:10 gaal kolibrie: it's a little more like .xs -> .c
17:11 kolibrie ahh, so .hsc is a sort of mini-language that gets compiled to haskell source
17:12 kolibrie still, it is kind of funny about the 'c' postfix having such an opposite meaning
17:13 gaal if you want an example look at the output of
17:13 gaal diff third-party/HsSyck/Data/Yaml/Syck.hsc third-party/HsSyck/Data/Yaml/Syck.hs | less
17:13 gaal e.g. #enum generates constant functions
17:14 gaal #{peek ....} translates to the byte offset in a struct
17:14 gaal that kind of stuff
17:15 kolibrie Generating precompiled Prelude, Math::Basic... ./pugs -Iext/Math-Basic/lib -C Parse-YAML Prelude.pm > blib6/lib/Prelude.pm.yml
17:15 kolibrie done.
17:15 kolibrie yeah!
17:15 gaal whee
17:41 lisppaste3 joined perl6
17:44 Dr_Pi joined perl6
17:47 justatheory joined perl6
17:50 fglock left perl6
17:51 Dr_Pi gaal: I've got my work cut out for me, getting pugs to build in eclipse. Neat thing about eclipse is it tried to compile it right away, but of course the build options are wrong, so I immediately got 100 problems of pugs_config.h not found. I'm flying to Italy tomorrow evening, but when I get my internet connection sorted out, I'll get back on this. Neat thing about the Haskell source editor in eclipse is you can hid
17:55 penk joined perl6
18:11 Psyche^ joined perl6
18:12 Psyche^ is now known as Patterner
18:14 BooK joined perl6
18:16 justatheory joined perl6
18:21 hexmode joined perl6
18:24 meppl gute nacht
18:45 ozo joined perl6
18:49 buu joined perl6
18:49 Lorn joined perl6
18:49 obra joined perl6
18:49 clkao joined perl6
18:49 jrockway joined perl6
18:50 tewk joined perl6
18:50 autark joined perl6
18:50 cj joined perl6
18:50 ingy joined perl6
18:50 lumi joined perl6
18:50 gaal joined perl6
18:50 amv joined perl6
18:50 dvorak joined perl6
18:50 spinclad joined perl6
18:50 gugod joined perl6
18:50 pjcj joined perl6
18:50 Shabble joined perl6
18:51 mr_ank joined perl6
18:52 beppu joined perl6
18:52 frankg joined perl6
18:53 takesako_ joined perl6
18:53 justatheory joined perl6
18:54 justatheory joined perl6
18:56 justatheory joined perl6
19:06 ludan joined perl6
19:17 Yappo joined perl6
19:33 qmole joined perl6
19:54 weinig is now known as weinig|bbl
20:52 * Limbic_Region wonders if audreyt has returned to the land of the living, and if so if he just keeps missing her
20:58 thepler joined perl6
20:59 wolverian er, that was weird
20:59 wolverian irssi detected one netsplit when it happened, and roughly 15 netjoins when it was fixed
21:00 wolverian oh well. never mind me.
21:04 Juerd wolverian: That's because of lag.
21:04 wolverian Juerd, right.
21:04 Juerd With a split, it just gets quits from the server. With a join, it just gets joins from the server. Irssi recognises and groups these.
21:04 wolverian I know how it happens, now that I actually thought about it.
21:04 Juerd But if there is a too large interval, it sees them as separate groups.
21:04 wolverian I was just too lazy to do it before wondering aloud.
21:05 Juerd For me, typing is harder than thinking :)
21:05 Juerd You must be wired differently :)
21:06 wolverian Juerd, oh, by the way. when opening a new shell (that is, bash) on feather, it takes about ten seconds to get bash loaded. ^C in the middle leaves me with a broken locale (or something; äöå don't come through to me). any idea if I'm doing something wrong?
21:07 Juerd It's probably /etc/bash_completion
21:07 Juerd Kill that from your .bashrc to work around that :)
21:08 wolverian oh. good point. thanks.
21:08 wolverian I do like bash_completion though ;)
21:09 Juerd I stopped using it when it started taking this long to load it.
21:09 Juerd Never bothered to investigate. This started, for me, at least a year ago.
21:09 GeJ møøse all
21:09 wolverian bash takes about a second to start, here, which is pretty long too, really.
21:14 DebolazX joined perl6
21:21 Lee_ joined perl6
21:21 Khisanth how long does it usually take to build pugs?
21:22 gnuvince Khisanth: depends on your machine.  My 1.6 GHz machine takes a little less than an hour maybe?
21:23 gnuvince But I've never timed it.
21:24 Khisanth I guess I have a while to go
21:25 DebolazY joined perl6
21:25 kolibrie Khisanth: 'make fast' is faster than 'make'
21:26 kolibrie I built pugs in less than 15 minutes today using make fast on a 2.66GHz x86
21:27 gnuvince ~convert 49 PEU CAD
21:27 gnuvince ~currency convert 49 PEU CAD
21:27 gnuvince oops
21:27 gnuvince wrong channel
21:30 brundlefliege joined perl6
21:30 Tene several hours on my desktop at home, less than half an hour on my laptop
21:36 Khisanth just make only takes around 15 minutes too
21:36 Khisanth it used to take me around 5 hours :)
21:39 brundlefliege hey guys i love shell scripting and wondered how a mundane task like e.g. for i in 1 2 3 4 5; do mkdir $i; done would be looking in perl on the command line?
21:39 brundlefliege what is the benefit of using perl for sysadmin tasks (little automations?) in comparison to bash scripts?
21:39 Khisanth perl -e 'mkdir $_ for 1..5;' :)
21:40 Khisanth ; not required in this case
21:41 rgs and $_ isn't required either with bleadperl
21:41 brundlefliege so ranges are expressed only by ..
21:41 brundlefliege cool
21:42 brundlefliege what is bleadperl?
21:43 rgs brundlefliege: actually you know that this channel is for perl 6, not for perl 5, right ?
21:43 rgs perl 6 still being in development, you probably want #perl instead.
21:44 brundlefliege ok thanks sorry for disturbing! (i actually thought perl 6 is out already :-P) :) have fun and thanks anyway!
21:44 Khisanth that was actually a bad question as far as being an example
21:44 brundlefliege why khisanth?
21:45 Khisanth mkdir just happens to be a builtin function, that isn't always the case
21:45 Khisanth then again there is the Shell module :)
21:46 brundlefliege so you mean the really nice thing about perl is that you can write directories on the given filesystem with perl synatx?
21:47 brundlefliege e.g. when you are on an os/2 system and you dont know which prebuilt shell-command is used for making a directory, right?
21:48 Khisanth the really nice thing about perl is CPAN!
21:48 brundlefliege but i am stopping and changing to #perl sorry for disturbing again :)
21:48 brundlefliege cpan is the free source of perl scripts isnt it?
21:49 brundlefliege python doesnt have something like that, does a place like cpan exist for mundane shell scripts in connection with system administration?
21:49 Lee__ joined perl6
21:50 allbery_b not yet.  we
21:50 allbery_b 're working on it :)
21:51 allbery_b http://lopsa.org/SysadminTools (still in its infancy, sadly)
21:51 Khisanth well CPAN has both modules and scripts
21:52 allbery_b actually http://lopsa.org/Tools is where the repo lives
21:52 Khisanth I prefer my Swiss Army chainsaw
22:00 Alchemy joined perl6
22:05 larsen_ joined perl6
22:09 cjeris joined perl6
22:14 Limbic_Region joined perl6
22:19 Lee_ joined perl6
22:32 prism joined perl6
22:36 frodo72 joined perl6
22:38 frodo72 is now known as polettix
22:48 weinig|bbl is now known as weinig
22:52 Khisanth 15 minutes to build and hour and a half to test :)
22:59 gnuvince` joined perl6
23:00 gnuvince joined perl6
23:33 Lee__ joined perl6
23:41 snaky joined perl6
23:51 weinig is now known as weinig|bbl
23:57 lambdabot joined perl6

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

Perl 6 | Reference Documentation | Rakudo