svn switch --relocate svn.openfoundry.org/pugs svn.pugscode.org/pugs/ | run.pugscode.org | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com
Set by avar on 16 November 2006.
00:05 bsb joined 00:40 nekokak joined 00:45 awwaiid joined 01:15 polettix joined
rafl Will Perl 6 have something like perl5's as.pm? 01:16
01:59 lyokato joined 02:41 mjk joined 02:58 tcliou joined
Tene huh. That's clever. I haven't seen that before. 02:59
(as.pm)
02:59 tcliou is now known as TzuChiang
nothingmuch aliased is a little bit saner 03:01
it doesn't actually alias 03:02
but just exports a sub to the importing class
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
but yes, as is very cool =)
03:06 nipotaway is now known as nipotan 03:53 spoopithy joined 04:17 dduncan joined 04:26 Lee__ joined 05:19 perlbot joined 06:13 kanru joined 06:15 BooK joined 06:25 nipra joined 06:39 RHainsworth joined 06:41 RHainsworth left 06:46 Dr_Pi joined 06:47 patsalov joined, patsalov left 07:09 glasser` joined 07:35 ozo joined 07:44 marmic joined 07:45 dduncan left 07:54 iblechbot joined 08:00 Lee joined 08:50 drrho joined 09:07 elmex joined 09:43 BooK_ joined 09:51 andara joined 10:15 devogon joined 10:24 spo0nman joined 10:41 RHainsworth joined 11:03 ruoso joined 11:34 RHainsworth left 12:07 chris2_ joined 12:09 chris2_ is now known as chris2 12:16 macroron joined 12:19 macroron joined 12:45 macroron joined 12:48 macroron joined 12:59 macroron joined 13:01 b00t joined 13:19 Limbic_Region joined
Limbic_Region dreampt that he met audreyt on an airplane headed for somewhere in Pennsylvania last night 13:21
13:27 macroron joined 13:38 DebolazX joined 13:40 gnuvince joined 13:44 RHainsworth joined, RHainsworth left 13:47 iblechbot joined, nipotan is now known as nipotaway 13:48 bonesss joined
Limbic_Region has a couple of questions regarding lazy evaluation 13:50
Does laziness only apply to lists and iterators or can it apply to anything? 13:52
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:54
13:56 Roadrunner joined
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:56
Roadrunner Hello All! 13:58
How to use "flock" system call inside perl script? I want to use it instead of "flock" perl wrapper.
wolverian Roadrunner, you probably want #perl instead. this channel is for the development of the next version of perl. 13:59
kolibrie Limbic_Region: audreyt's Scalar::Defer for Perl 5 says you can say: my $answer = lazy { $blind_mice * 14 }; 14:00
but I don't know if anything is written for this in perl 6
14:03 Roadrunner left
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:06
*shrug* 14:08
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:19
Limbic_Region gaal - I was wondering how something like my @array = lazy/defer %hash.keys; # would work 14:20
gaal - cause I could see multiple behaviors and more than one desireable 14:21
kolibrie Limbic_Region: for lazy, every time @array is read, it looks at %hash to see the current keys 14:23
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 :)
kolibrie gaal: shucks
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
Limbic_Region kolibrie - those are the behaviors I would expect if @array were a scalar
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
that's why I document everything I write, I'll forget how it works within days or weeks
gaal that makes defer { $world_population } of us
kolibrie of course, in Perl 6 you can probably bind @array := %hash.keys 14:27
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 ) :)
wolverian should grammars have a "default" rule to call, a la .new in classes?
Limbic_Region hrm, I am not explaining this quite right
kolibrie gaal: #( less than one line comments are cool) 14:29
gaal huh, the bottom symbol is a quarter-line comment symbol _|_ 14:30
(for of those make up a #)
Limbic_Region and as such I will shut up until I can explain it the way it is gently bouncing around my head
kolibrie gaal: let's not propose that symbol for quarter-line comments 14:31
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
wolverian PerlJam, <Foo> vs <Foo.rule>, I suppose.
PerlJam kolibrie: It's the other way that's more interesting.
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?
er, how would *perl* differentiate.
wolverian PerlJam, ucfirst? ;)
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
others, even
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.
kolibrie MiniPerl6 has a 'parse' top-level rule, but uses 'comp_unit' right now 14:37
so it does not have to parse the whole input at once
14:40 hexmode joined
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:44
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
stevan - but I guess I was also thinking that both sides of the assignment could be lazy too 14:46
stevan yes
I think this would probably be completely unpredictable though 14:47
the beauty of haskell and its laziness is that they can be sure the value will always be the same
Limbic_Region right
stevan and just get around to evaluating it when they want to :)
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:48
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:49
14:51 idiotmax joined
Limbic_Region in any case, this all started over a post at the Monastery concerning wormholes and time travel 14:52
14:55 fglock joined
kolibrie wants a TARDIS for Christmas 14:58
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?
fglock kolibrie: ok! 15:06
15:20 cjeris joined 15:35 hexmode joined
kolibrie Limbic_Region: I'm not sure if that may break the rules of time 15:57
16:00 Lee__ joined
kolibrie fglock: I have between 20 and 200 types of documents, and I want to extract similar information from each of them 16:01
16:01 weinig|bbl is now known as weinig
kolibrie it is very similar to my Practical Extration with Perl 6 talk 16:01
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
kolibrie I am thinking of defining the object in the emitter, and then have a differet grammar for each type of documnt 16:03
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
kolibrie fglock: I thought so. I'll try to set something up today 16:05
16:06 hexmode joined
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:06
fglock: would those go in Pugs::Compiler::Perl6, or Pugs::Compiler::Rule, or somewhere else? 16:07
fglock the best place would be under pugs t/ 16:08
kolibrie okay
fglock so that they can be tested under pugs and p6-parrot too 16:09
kolibrie under regex, or under examples?
fglock regex, I guess - it can be moved later 16:12
kolibrie okay
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
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
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 sial.org/pbot/21718
Limbic_Region kolibrie - you didn't build with extra-libs 16:24
integral (apt-get install libghc6-network-dev) 16:25
kolibrie integral: thanks
oooh, this is nice, I've never seen the '[ 1 of 97]' before 16:29
Limbic_Region kolibrie - first time using 6.6 then? 16:30
kolibrie Limbic_Region: maybe
integral you mean "yes" 16:31
kolibrie :)
Limbic_Region kolibrie - you will then be happily suprised with the speed improvements
integral Limbic_Region: Despite the speed improvements, my personal code still can take 40 minutes to compile 60 lines :-)
kolibrie integral: I hope that's on a slower-ish computer 16:33
integral medium 16:34
16:36 chris2 joined
Limbic_Region integral - I have found CPU has little effect on Haskell/Pugs - it is all about the memory 16:36
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 sial.org/pbot/21719
Limbic_Region kolibrie - have you tried without an embedded parrot? 16:47
kolibrie Limbic_Region: that is (supposedly) without embedded parrot
which is why it is so confusing
Limbic_Region hrm - dunno. The only other thing I can think of is weird third-party issues after upgrading to 6.6 16:48
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:49
integral kolibrie: Did you build from a complete clean check out? 16:50
kolibrie integral: no 16:51
but I don't think I have local modifications that are not commited
gaal try rm -rf dist/.......Pugs/Embed* 16:52
for some value of .......
integral kolibrie: I don't mean modifications to source, more left older build files.
gaal also rm src/Pugs/Embed/Parrot.hs 16:53
kolibrie ls dist/build/Pugs/Embed/
Parrot.hi Pugs.hi Pugs.o
gaal kill 'em all
make will know its flock
16:53 Zerg_Mortron joined, Zerg_Mortron is now known as DarthFredd
kolibrie same error, do I need to Makefile.PL? 16:54
or even realclean?
kolibrie tries a realclean 16:55
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/)
also sv? st to make sure you don't have any stray local changes 16:58
kolibrie ls src/Pugs/Embed/
Haskell.hs Parrot.hsc Parrot_hsc.h Pugs.hs
Parrot.hs Parrot_hsc.c Perl5.hs
gaal ECHO Y | FORMAT C:
that's okay then
TimToady did you ever do a "make install"? 16:59
16:59 buetow joined
kolibrie not in ages, or maybe ever on this computer 16:59
hmm: /usr/local/bin/pugs -v .... Version: 6.2.12 (r11264) 17:00
gaal: so still remove src/Pugs/Embed/Parrot.hs? 17:01
17:02 justatheory joined 17:03 DarthFredd left
gaal kolibrie: yes, it's generated from Parrot.hsc 17:03
hsc files are haskell source with some special preprocessor moo to ease FFI, foreign function interface. 17:04
17:09 ashleyb joined
kolibrie gaal: hmm, so perl has .pm -> .pmc (compiled) and haskell has .hsc -> .hs ? 17:09
17:09 _bernhard joined
gaal kolibrie: it's a little more like .xs -> .c 17:10
kolibrie ahh, so .hsc is a sort of mini-language that gets compiled to haskell source 17:11
still, it is kind of funny about the 'c' postfix having such an opposite meaning 17:12
gaal if you want an example look at the output of 17:13
diff third-party/HsSyck/Data/Yaml/Syck.hsc third-party/HsSyck/Data/Yaml/Syck.hs | less
e.g. #enum generates constant functions
#{peek ....} translates to the byte offset in a struct 17:14
that kind of stuff
kolibrie Generating precompiled Prelude, Math::Basic... ./pugs -Iext/Math-Basic/lib -C Parse-YAML Prelude.pm > blib6/lib/Prelude.pm.yml 17:15
done.
yeah!
gaal whee
17:41 lisppaste3 joined 17:44 Dr_Pi joined 17:47 justatheory joined 17:50 fglock left
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:51
17:55 penk joined 18:11 Psyche^ joined 18:12 Psyche^ is now known as Patterner 18:14 BooK joined 18:16 justatheory joined 18:21 hexmode joined
meppl gute nacht 18:24
18:45 ozo joined 18:49 buu joined, Lorn joined, obra joined, clkao joined, jrockway joined 18:50 tewk joined, autark joined, cj joined, ingy joined, lumi joined, gaal joined, amv joined, dvorak joined, spinclad joined, gugod joined, pjcj joined, Shabble joined 18:51 mr_ank joined 18:52 beppu joined, frankg joined 18:53 takesako_ joined, justatheory joined 18:54 justatheory joined 18:56 justatheory joined 19:06 ludan joined 19:17 Yappo joined 19:33 qmole joined 19:54 weinig is now known as weinig|bbl
Limbic_Region wonders if audreyt has returned to the land of the living, and if so if he just keeps missing her 20:52
20:58 thepler joined
wolverian er, that was weird 20:59
irssi detected one netsplit when it happened, and roughly 15 netjoins when it was fixed
oh well. never mind me. 21:00
Juerd wolverian: That's because of lag. 21:04
wolverian Juerd, right.
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.
wolverian I know how it happens, now that I actually thought about it.
Juerd But if there is a too large interval, it sees them as separate groups.
wolverian I was just too lazy to do it before wondering aloud.
Juerd For me, typing is harder than thinking :) 21:05
You must be wired differently :)
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:06
Juerd It's probably /etc/bash_completion 21:07
Kill that from your .bashrc to work around that :)
wolverian oh. good point. thanks. 21:08
I do like bash_completion though ;)
Juerd I stopped using it when it started taking this long to load it. 21:09
Never bothered to investigate. This started, for me, at least a year ago.
GeJ mōæ½xF8ōæ½xF8se all
wolverian bash takes about a second to start, here, which is pretty long too, really.
21:14 DebolazX joined 21:21 Lee_ joined
Khisanth how long does it usually take to build pugs? 21:21
gnuvince Khisanth: depends on your machine. My 1.6 GHz machine takes a little less than an hour maybe? 21:22
But I've never timed it. 21:23
Khisanth I guess I have a while to go 21:24
21:25 DebolazY joined
kolibrie Khisanth: 'make fast' is faster than 'make' 21:25
I built pugs in less than 15 minutes today using make fast on a 2.66GHz x86 21:26
gnuvince ~convert 49 PEU CAD 21:27
~currency convert 49 PEU CAD
oops
wrong channel
21:30 brundlefliege joined
Tene several hours on my desktop at home, less than half an hour on my laptop 21:30
Khisanth just make only takes around 15 minutes too 21:36
it used to take me around 5 hours :)
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
what is the benefit of using perl for sysadmin tasks (little automations?) in comparison to bash scripts?
Khisanth perl -e 'mkdir $_ for 1..5;' :)
; not required in this case 21:40
rgs and $_ isn't required either with bleadperl 21:41
brundlefliege so ranges are expressed only by ..
cool
what is bleadperl? 21:42
rgs brundlefliege: actually you know that this channel is for perl 6, not for perl 5, right ? 21:43
perl 6 still being in development, you probably want #perl instead.
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
brundlefliege why khisanth?
Khisanth mkdir just happens to be a builtin function, that isn't always the case 21:45
then again there is the Shell module :)
brundlefliege so you mean the really nice thing about perl is that you can write directories on the given filesystem with perl synatx? 21:46
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:47
Khisanth the really nice thing about perl is CPAN! 21:48
brundlefliege but i am stopping and changing to #perl sorry for disturbing again :)
cpan is the free source of perl scripts isnt it?
python doesnt have something like that, does a place like cpan exist for mundane shell scripts in connection with system administration? 21:49
21:49 Lee__ joined
allbery_b not yet. we 21:50
're working on it :)
lopsa.org/SysadminTools (still in its infancy, sadly) 21:51
Khisanth well CPAN has both modules and scripts
allbery_b actually lopsa.org/Tools is where the repo lives 21:52
Khisanth I prefer my Swiss Army chainsaw
22:00 Alchemy joined 22:05 larsen_ joined 22:09 cjeris joined 22:14 Limbic_Region joined 22:19 Lee_ joined 22:32 prism joined 22:36 frodo72 joined 22:38 frodo72 is now known as polettix 22:48 weinig|bbl is now known as weinig
Khisanth 15 minutes to build and hour and a half to test :) 22:52
22:59 gnuvince` joined 23:00 gnuvince joined 23:33 Lee__ joined 23:41 snaky joined 23:51 weinig is now known as weinig|bbl 23:57 lambdabot joined