Summer of Perl | 6.2.12 released! | paste: sial.org/pbot/perl6 | pugs.blogs.com | pugscode.org | pugs.kwiki.org | www.treehugger.com/files/th_images/paradigm.jpg
Set by nothingmuch on 12 July 2006.
fglock leon: I think people will come back on monday - see colabti.de/irclogger/irclogger_logs/perl6 00:01
lambdabot Title: #perl6 irc log
leon OK, tnx
svnbot6 r11576 | fglock++ | v6 - simplified 'loop' rule 00:05
clkao fglock: i wonder what to do with the type barewords like Str and Num 00:07
for each class definition register such type as sub in global?
fglock clkao: that's one way to do it - I wonder what pugs does; let's ask audreyt, gaal 00:09
clkao also for Bool class that has object with value that is 1, but ref also needs to be Bool. i'd really avoid overload :/ 00:12
00:12 daxim joined
clkao fglock: btw, what about [1..5] ? ;) 00:13
svnbot6 r11577 | clkao++ | Trivial ::ref 00:14
fglock clkao: it works for me - what error do you get? 00:15
clkao oh, it does? i haven't noticed ;) 00:16
merlyn fglock - does that Module::Compile bug I reported have an easy fix?
00:16 mauke_ is now known as mauke
merlyn you're probably more familar with M::C than I am 00:16
otherwise, I have to write a column on some other topic soon 00:17
fglock merlyn: not really - I'm just another user :)
merlyn Ugh.
Ok, so if the first thing I tried to do with it breaks, I deem it "not ready to talk about in public".
I guess I'll have to pick another toipic in 12 hours 00:18
Ugh
merlyn goes to his list
fglock merlyn: M::C is used for precompiling modules at 'make' time, afaik 00:19
merlyn there are comments to the effect that if you "use" something without a .pmc, the .pmc is created and the action continues. 00:20
that's the bug. it doesn't do that.
I was able to demonstrate that with just a simple setup
in fact, it tripped up the very first simple example I wanted to make to understand how it worked. :( 00:21
fglock did you see 'orz' in cpan? it's a minimal example of using M::C 00:23
merlyn part of the M::C distro? 00:24
fglock search.cpan.org/author/INGY/orz-0.12/lib/orz.pm
lambdabot Title: orz - Total Failure - search.cpan.org
merlyn Yeah, that code would fail in the same way as mine, apparently 00:26
either that, or there's something magical about his code to do it right
00:27 markstos joined
svnbot6 r11578 | clkao++ | Pass t/statement/loop.t 00:30
clkao fglock: where is sub expression rule? 00:37
i found anonsub can't take signatures
fglock clkao: looking 00:43
merlyn: I tried to modify the example in M::C and it doesn't work for me too
clkao is there a list of builtin methods for Array?
fglock clkao: see perl5/Perl6-Container - it is slow but it works 00:45
clkao: 'sub' only exists in the statement list - the 'sub' in expression is parsed 'sub({block})' 00:46
clkao: have you used Module::Optimize? 00:47
clkao: Grammar::Operator.pm #39: 'BAREWORD exp' 00:50
clkao not yet 00:53
fglock merlyn: I found the bug 00:54
clkao where is @a.method:{warn $_} specified? 00:55
and what does @b.map{sub ($x,$y) {$x+$y}) mean? takes two from the list at a time?
fglock merlyn: s/sub pmc_optimize/sub pmc_compile/ and it works
ingy: ping 00:56
clkao fglock: how do we make sub into expression? grammar::expression isn't normal rules... 00:57
fglock clkao: yes, it sums each 2 elements
clkao that's a very evil map 00:58
luckily we have &code.arity implemented
fglock clkao: which file is that? 00:59
clkao pugs::grammar::expression
fglock sorry - which file has [email@hidden.address] $_}' 01:00
you define 'sub' in Term.pm
clkao docs/Perl6/Spec/Object.pod: @list.grep: { $_ % 2 }.map: { $_ - 1 }.say
fglock: so are we going to use perl6::container? 01:02
01:03 kanru joined
clkao kanru! 01:04
fglock clkao: you can call <Perl6::sub_decl> from Term.pm - near the barewords in the end of this file 01:05
clkao: Perl6::Container is too slow - we need a mix of oo and unboxed containers to get reasonable speed
clkao mmm 01:06
kanru clkao, hey!
clkao fglock: no, sub_decl is with the name 01:07
i am turning that into sub_decl_body 01:09
fglock clkao: the name is optional
clkao fglock: i also don't want multi/my/ etc 01:10
fglock I think these are valid terms
clkao @b.map(my sub { $_ + 1}) ? 01:11
lambdabot Unknown command, try @list
fglock audreyt, ingy: s/sub pmc_optimize/sub pmc_compile/ in Module::Compile? it doesn't work the other way 01:12
clkao ?eval (1,2,3).map:{$_+1}
01:12 evalbot_11574 is now known as evalbot_11578
evalbot_11578 (2, 3, 4) 01:12
clkao ?eval (1,2,3).map(my sub {$_+1})
evalbot_11578 Error: unexpected "{" expecting comment, "\\", ":", "*" or parameter name
clkao ?eval (1,2,3).map(sub {$_+1}) 01:13
evalbot_11578 (1.0, 1.0, 1.0)
clkao ?eval (1,2,3).map(sub {^$x+1})
evalbot_11578 Error: Undeclared variable: "$x"
clkao ?eval (1,2,3).map(sub {$^x+1})
evalbot_11578 Error: Undeclared variable: "$^x"
clkao ?eval (1,2,3).map(sub {$_[0]+1})
evalbot_11578 (1.0, 1.0, 1.0)
clkao mmm
do i have to have signature?
fglock $^x doesn't need a signature 01:14
Eidolos ?eval map {$_ + 1} (1, 2, 3) 01:18
01:18 evalbot_11578 is now known as evalbot_11579
evalbot_11579 Error: unexpected "(" expecting comment, ",", ":", operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input 01:18
svnbot6 r11579 | clkao++ | Fix emitter for array methods with args.
fglock clkao: I'll move 'sub' to Term, ok?
Eidolos ?eval map {$_ + 1} (1, 2, 3);
evalbot_11579 Error: unexpected "(" expecting comment, ",", ":", operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
Eidolos Heh, oh well. :) 01:19
clkao fglock: sure
audreyt the comma is mandatory 01:35
the implicit-comma rule is gone
??eval map {$_ + 1}, (1,2,3);
?eval map {$_ + 1}, (1,2,3);
evalbot_11579 (2, 3, 4)
fglock audreyt: is it a bug in Module::Optimize that it defined pmc_optimize instead of pmc_compile? 01:38
Eidolos ahh
svnbot6 r11580 | fglock++ | v6 - 'sub' declaration is a term
audreyt fglock: I think ingy started working on it but never got anywhere 01:39
fglock audreyt: it works if you make this change 01:40
merlyn was trying to use it
clkao: it should work now
audreyt have you looked at the source?
search.cpan.org/src/INGY/Module-Com...ptimize.pm
ingy havn't made it do _anything_ yet
Kattana www.perlmonks.com/?node_id=561229 <<<"Perl is dying"
lambdabot Title: Perl is dying
Kattana =/ 01:41
audreyt I like dye too
fglock audreyt: yes - there is no 'pmc_optimize' in the base module
xerox audreyt: may I show you a thing in Haskell?
audreyt fglock: I think pretend it doesn't exist for now -- or report to ingy 01:42
xerox: sure, 'cept I need to sleep real soon
xerox haskell.org/haskellwiki/User:PaoloMartini
lambdabot Title: User:PaoloMartini - HaskellWiki
xerox module VarArg
(See the comments)
(First)
clkao fglock: t/11-capture.t now fails to parse 01:46
fglock audreyt: no problem - I was just checking if I could help merlyn
clkao: looking 01:47
xerox yawnes
clkao fglock: and 12caller 01:48
i implemented the evil map
01:50 lollan joined
audreyt xerox: cute 01:54
xerox %)
fglock clkao: works again 01:57
svnbot6 r11581 | fglock++ | v6 - fixed 'sub' parsing 02:00
clkao fglock++ 02:01
fglock: i thought rx:perl5{\s} is parsed? 02:04
maybe not with arbitary balanced string?
fglock clkao: only with // 02:05
I think Text::Balanced can handle this
svnbot6 r11582 | clkao++ | Implement @b.map(sub ($x, $y) { $x + $y }) for v6. 02:09
02:10 theorbtwo joined
clkao fglock: (:foo<bar>, :b<zz>) seems to be in two different hashref 02:10
fglock clkao: yes, it is 2 pairs - it depends on context to process it further 02:12
look with V6DUMPAST=1 02:13
clkao i see. i was trying to get (foo => $bar) parsing correctly
fglock that's infix:{'=>'} - it looks ok 02:17
clkao that became foo()
fglock it's a special case - but it's better to handle it after the precedence parser 02:19
or it could be moved to Operator.pm - works too 02:20
clkao not sure what to do - allowing bareword before infix:{'=>'} is something parser should know?
02:22 markstos left
fglock you can check that foo doesn't have a parameter list, and consider it a bareword (at emit time) 02:23
'foo()' parses differently from 'foo' 02:24
clkao *nod*
btw, "sub only_accepts_odds(Num::Odd $odd) { $odd + 1 }" causes infinite loop
fglock sleep &
I think the grammar currently doesn't accept '::' in types 02:26
02:27 fglock left 02:39 weinig|bbl is now known as weinig|sleep
svnbot6 r11583 | audreyt++ | * TimToady++, the punny supunman pundit, made a punctional change to 03:09
r11583 | audreyt++ | the Punopses that changes $object.id to $object.valid, which puns
r11583 | audreyt++ | "val id" against "valid instance" to achieve a -Opun effect.
r11583 | audreyt++ | Implement this change so we can continue punning for the fnords. Pun!
Eidolos ponders 03:10
vsoni seen audreyt 03:11
jabbot vsoni: audreyt was seen 1 hours 17 minutes 3 seconds ago
clkao 538 tests pass as of tonight 03:20
stevan clkao: ping 03:42
clkao stevan: pong 03:45
stevan clkao: I had a thought for hooking Data::Bind and Moose type constriants together 03:48
clkao what's your insight about it 03:49
03:49 jwang joined
clkao (i think i am falling asleep very soon) 03:49
stevan would it be possible for Data::Bind::sig to set a bind "hook"?
clkao: I am just throwing out an idea,.. I am going to sleep soon as well :)
clkao ;)
when it actually binds? or checking signature? 03:50
i was to do the type checking in sub::multi
stevan when you call D::B::->bind(@_) inside the sub
clkao or something, to use moose typeutil
stevan so probably bind time?
03:50 wesle1 joined
clkao and you want to use the hook to decline particular binding? or ? 03:51
stevan is in the process of source diving Data::Bind :)
yes, to do a type check on the value being bound basically
clkao *nod* 03:52
stevan: start with making some todo tests in data::bind?
stevan okay
03:57 revision17_ is now known as Revision17 04:03 avar joined 04:24 avarab joined 04:41 avar joined 04:59 avarab joined 05:00 unobe_away is now known as unobe 05:11 avarab_ joined 05:21 unobe is now known as unobe_away 05:22 diotalevi joined 05:23 avar joined 05:34 avar joined 06:07 baest joined 06:32 edwardk left 06:40 Aankhen`` joined 07:14 scook0 joined 07:19 pmurias joined
pmurias hi 07:19
07:21 hugues23 joined 07:27 Aankh|Clone joined
pmurias regex {...}'s in pX are handled as :ratchet'y it's should be mentioned in TODO as a BUG, or something... 07:27
07:30 iblechbot joined 07:31 shachaf joined 07:54 baest joined
Jedai ?eval for (1..5) -> $foo { (('x' x $foo) ~ ';').say } 08:07
08:07 evalbot_11579 is now known as evalbot_11583
evalbot_11583 OUTPUT[x; xx; xxx; xxxx; xxxxx; ] undef 08:07
08:18 lisppaste3 joined 08:19 shachaf joined 08:32 penk joined 08:37 mugwump_ joined 08:42 froh-doh joined 08:44 xinming joined 08:55 drrho joined 08:57 hugues23 joined 08:59 Ryugi joined 09:04 revision17_ joined 09:10 froh-doh joined 09:23 froh-doh joined
broquaint ?eval sub f($x) { return sub {} if $x } f(1) 09:52
evalbot_11583 sub {...}
broquaint If you add a newline after "sub {}" the parser breaks. 09:56
In fact, it seems to any case where a braces are proceed by a newline and an if modifier that the parser breaks. 09:59
Broken down to a pathological case: "{}\n if 1" # b0rk, b0rk, b0rk 10:00
10:12 elmex joined 10:36 Aankh|Clone is now known as Aankhen`` 10:48 miyagawa joined 11:05 chris2 joined
gaal What's the purpose of the .valid pun? AFAICT identities don't have much to do with validity, and a user might ewll want to have their own .valid method... 11:10
11:14 ludan joined
pmurias gaal: IMHO VALue ID 11:15
seen the commit now, stupid me 11:16
jabbot pmurias: I havn't seen the, pmurias
pmurias gaal: it's propably a typo or a joke 11:21
gaal pmurias: yes, value id indeed, but I'm wondering what use that is 11:27
xerox Where can I read about typing in perl6? 11:28
broquaint There are some bits and pieces in docs/notes/ in the pugs tree such as "model_theory", xerox. 11:38
I don't think any of that is canonical though. 11:41
12:09 bpphillips joined 12:14 wesle1 joined, robkinyon_ joined 12:16 robkinyon_ is now known as robkinyon
nothingmuch ughghghgg 12:19
there isn't a single pod escaping module out there
too make L<$any_text|$uri> be safe 12:20
mauke there is no L<text|uri>, according to my perlpod 12:21
nothingmuch mauke: it's a generally accepted extension
all the converters do it
the problem is if you have slashes or pipes in the $text you need to escape it
angles too
and, err... other stuff
but it's nigh impossible to get right
because it's escaping 12:22
mauke there's an escape syntax?
nothingmuch E<gt> --> M
E<gt> --> <
mauke that's for normal text, not L<>
nothingmuch that also works inside L<>
mauke undocumented feature, nice 12:23
nothingmuch otherwise you can't make a link to a section with a slash or a pipe in it's name
you can use L<"foo/bar">
but that breaks since you need to escape "
and that's completely unspecced
not just kinda unspecced ;-)
12:25 iblechbot joined
nothingmuch ugh 12:28
why the hell am I even dealing with pod
nothingmuch abstracted it out already
audreyt: yaml loving summary tool! yay!
12:31 kanru joined 12:34 kanru joined
robkinyon audreyt: I had to "ln -s gcc cc" to install YAML::Syck - is this intentional? (Ubuntu 6) 12:40
audreyt robkinyon: we are at mercy of $Config{cc}
nothingmuch robkinyon: perl -V | grep cc= 12:41
oh, oops, audreyt is already on it
nothingmuch goes back to $stuff 12:42
robkinyon audreyt: Ok
nothingmuch robkinyon: basically, ubuntu's perl is built wrong 12:44
or ubuntu's gcc is installed wrong
but perl's build tools assume that $Config{cc} can be used to compile code in a way that is link-compatible with perl itself 12:45
robkinyon nothingmuch: The problem was that gcc wasn't installed 12:46
and, when it did install, it installed /usr/bin/gcc-4.0 and none of the standard symlinks (/usr/bin/gcc and /usr/bin/cc)
nothingmuch oh
so that's an ubuntu issue
ask on the irc channel or something
but yyou may neeed to select the default gcc 12:47
pmurias i have a g++ problem on my gentoo box with Inline::CPP (gxx_personality error) 12:49
12:50 xinming joined
pmurias gcc is a real pain in the ass 12:50
12:53 kanru joined, lollan joined 13:12 frederico joined 13:13 glasser joined
glasser hmm. can somebody help me understand what the line between class::mop and moose is? 13:13
nothingmuch glasser: sure 13:14
there are three layers
Class::MOP is the lowest one
it provides a meta object protocol (hence MOP)
that lets you introspect and edit classes
glasser ok
nothingmuch like Class::MOP::Class->initialize( $class_name )->add_method( sub { ... } );
then there's Moose::Meta
it contains subclasses for the various meta objects 13:15
robkinyon glasser: Class::MOP doesn't provide the ability to manage classes from userland
glasser: That's what Moose is for
nothingmuch (it's own Meta::Class, Meta::Attribute, etc)
and then Moose provides a sugar layer
Moose.pm that is
glasser and the conventions that class::mop uses are things that are relatively uncontroversial across the 18 million class:: foo modules, whereas moose looks to the untrained like it *is* one of those modules?
nothingmuch so that 'has foo => (....)' will call the right mop methods for you
and also throws in a 'use metaclass' which gives you $class->meta 13:16
i'm not sure what you mean
robkinyon glasser: Yes
The idea was that Class::MOP could be used by all the Class:: modules and that Moose IS one of the Class:: modules
Class::MOP is the fundamental infrastructure for a Class::foo module to use in order to get away from the typeglobs 13:17
glasser so the semantics that come in at the Moose::Meta level are more like type constraints etc, whereas at the Class::MOP level it's mostly symbol table munging and so on?
nothingmuch but class::mop doesn't use various Class::foo things
robkinyon and to provide some really nice infratsr4ucture
glasser: Essentially, yes
glasser robkinyon: heh, that is a simpler way of saying what I said :)
nothingmuch it's a bit more than symbol table munging
it also defines instance structure, attributes, etc
glasser ok. where that means "it's gotta be a hashref" and so on? 13:18
nothingmuch yes and no ;-)
the protocol for that is slot allocation
the meta instance object is told to allocate slots
and to create an instance
and to set/get slot values (possibly inlined)
by default this abstracts over a hash
but it's there so that it doesn't matter whether you use hashes or inside outs or arrays or whatever 13:19
glasser ah, the point being that different classes can have overlapping slot names etc?
oh, that. that's good too :)
nothingmuch not overlapping slot names (that's a conflict - to allocate the same slot twice)
private attributes, on the other hand, can add the class they are defined in into the slot name
stevan unless you namespace the slots :)
nothingmuch so that it's effectively namespaced
glasser ah, so if I wanted to have private attributes, that would be at the Moose level (or already is)
er, Moose::Meta
stevan glasser: yes 13:20
glasser cool
does the current implementation do a lot of dynamic dispatch for every accessor get/set, or does it install tiny methods (if you're not doing fancy things)? 13:21
not that accessor speed is usually such a big deal
stevan glasser: all of the above :)
Moose will inline methods
Class::MOP will do lots of stuff at runtime (which is slow)
but if you make your class immutable (though Class::MOP), then it will inline them for you 13:22
glasser ah, cool.
nothingmuch stevan: i want to resolve the role/has problem before 0.12
glasser (by which I assume you mean "say I'm not going to redefine this class anymore", not "no set accessors" right?)
nothingmuch even if it's a butt ugly special case right now (to iterate all attrs and see what they generate)
robkinyon glasser: All the Class::MOP stuff is, essentially, turned off when you mark it immutable
stevan glasser: yes,... you promise to not change the metaclass
robkinyon Or, rather, marked as read-only 13:23
meaning that it can calculate a bunch of crap for you
stevan yes,.. it is still there,.. but you can only read it
13:23 Qiang joined
glasser c::m and moose both live in the pugs repo, right? 13:23
stevan glasser: nope 13:24
they are a seperate project
glasser: we are working on getting them into a more public svn
13:27 scook0_ joined 13:49 pdcawley joined
ajs Someone named swaroop contacted me over the weekend, looking for pugs commit. Was he all set? 13:49
13:54 glasser left 14:07 hexmode joined 14:08 vel joined
nothingmuch ajs: do you know his email? 14:12
Kattana audreyt: www.algorithm.com.au/mt/haskell/a_h...ntary.html <<<in case you have not seen it before, it mentions you 14:17
lambdabot Title: Algorithm.com.au: A History of Haskell Commentary
szbalint ajs: he registered successfully. 14:20
14:21 cjeris joined, fglock joined
gaal Kattana: I love that referenced paper 14:23
14:25 Jedai666 joined 14:27 kanru joined 14:32 Bit-Man joined 14:33 drbean joined, buu_ joined, bcorn joined 14:34 buu_ is now known as buu 14:36 szbalint_ joined 14:39 xern_ joined 14:40 avar joined 14:42 elmex joined 14:44 szbalint_ is now known as szbalint, tup joined 14:52 Jedai666 is now known as Jedai, spinclad_ joined 14:58 vel joined 15:04 kattana_ joined, vel joined 15:05 rw-rw-r-1 joined 15:06 avar joined
Jedai On CPAN the Module::Compile documentation don't show up, it shows Module::Optimize instead (and it don't work..). :( 15:07
15:07 tup joined
nothingmuch Jedai: ?! 15:13
ingy: ping!!!!!!
silly silly silly
he confused the pause indexer
search.cpan.org/src/INGY/Module-Com...Compile.pm 15:14
sorry =(
Jedai Yeah, I have it but it could confuse new users. 15:15
Do you remember what problem had Merlyn with Module::Compile ?
15:18 ivanfrey is now known as Dr_Pi
fglock Jedai: I found that you need to s/sub pmc_optimize/sub pmc_compile/ - I think that's the problem merlyn had 15:20
pmurias Module::Compile's pod is all wrong 15:21
fglock: hi
fglock pmurias: hi
Jedai The 0.17 got it right
hi 15:22
But the CPAN Module::Compile point to Module::Optimize pod... :/
pmurias Jedai: hi
svnbot6 r11584 | fglock++ | v6-alpha-0.010
pmurias fglock: looked at the p6 emitter, it emittes regex as Ratchety rules, is it ok? 15:24
fglock pmurias: it's not ready yet 15:25
pmurias i understand it means yes
eq. no
fglock it is "ok" for testing the parser, but it needs fixing 15:26
pmurias what I looked at recently was the possiblity of making it emit a nice AST 15:28
fglock pmurias: it would be nice - interoperation with pugs' emitters is a major milestone 15:29
pmurias it's doable, but would require quite a lot of work 15:30
fglock I know :)
15:32 MikeJS joined
pmurias a nice and easy thing, would be to add regex support to emitter, and use v6 for parts of Pugs::Grammar::* 15:32
15:34 frederico joined
cjeris Right or wrong? my $a = [1, 2] and my $a = (1, 2) are equivalent, because [1, 2] evaluates to an array reference to an array containing 1 then 2, and (1, 2) evaluates to an array containing 1 then 2, which in scalar context yields a reference to itself. 15:36
fglock pmurias: sure. but I'd like to change v6 grammar to use token instead of regex, before rewriting the grammar to perl6 - doing the change after the bootstrap would be more difficult
pmurias why would it be more difficult then 15:38
?
fglock cjeris: right
pmurias: because there are some bugs in PCR that need to be fixed; it is easier to work around these bugs in p5 land :( 15:39
pmurias horrid :( 15:40
fglock I'm working on the fixes in pX/fglock
cjeris fglock: ok, thanks!
fglock pmurias: it's basically fixed, but now I've got to re-bootstrap the PCR grammar 15:42
15:43 gugod_ joined
fglock lunch & 15:43
pmurias the other major source of cruft is the __PACKAGE__-->add_rule(...) 15:44
fglock: till later
?eval 1 infix:<+> 2 15:46
15:46 evalbot_11583 is now known as evalbot_11584
evalbot_11584 Error: unexpected "i" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input 15:46
Jedai ? infix:<+> 1 2
?eval infix:<+> 1 2
evalbot_11584 Error: unexpected "2" expecting comment, operator, ":", ",", postfix conditional, postfix loop, postfix iteration, ";" or end of input
15:46 weinig joined
Jedai ?eval + 1 2 15:46
evalbot_11584 Error: unexpected "2" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input 15:47
Jedai ?eval (+) 1 2
evalbot_11584 Error: unexpected ")" expecting term
Jedai ?eval `+` 1 2
evalbot_11584 Error: unexpected "`" expecting program
cjeris ?eval infix:<+>(1, 2)
evalbot_11584 3
Jedai Aww... :)
cjeris just wondering whether I had the right idea :)
Jedai Too much Haskell
cjeris (+) 1 2 is ocaml isn't it? 15:48
Jedai ?eval infix:<+> 1, 2
evalbot_11584 3
Jedai Haskell too
Haskell and OCaml aren't that different (say the guy who started learning Haskell two days ago...) 15:49
?eval (+) 1,2 15:50
evalbot_11584 Error: unexpected ")" expecting term
Jedai ?eval infix:<+> 1 : 2 15:51
evalbot_11584 3
cjeris let n = ref 0 in while (!n < 10) do printf "%d\n", !n; n := !n + 1 done
:)
don't know how to phrase that with a monad yet
Jedai Me neither ! :D
I'm learning though 15:52
xerox printN n xs = sequence $ replicateM n (print xs)
printN :: (Show a) => Int -> a -> IO ()
Sorry, use sequence_, not sequence. 15:53
cjeris where is replicateM ?
xerox Control.Monad
Use lambdabot for questions like this.
?index replicateM
lambdabot Control.Monad, Control.Monad.Reader, Control.Monad.Writer, Control.Monad.State, Control.Monad.RWS, Control.Monad.Identity, Control.Monad.Cont, Control.Monad.Error, Control.Monad.List
xerox ?docs Control.Monad
lambdabot haskell.org/ghc/docs/latest/html/li...Monad.html
xerox ?fptools Control.Monad 15:54
lambdabot darcs.haskell.org/packages/base/Control/Monad.hs
cjeris awesome! do you have time for a couple more idiot questions?
15:54 Bit-Man_ joined
xerox Sure man! 15:54
Jedai Cool ! Is there a reference of the bots functions somewhere ?
cjeris 1) is there any place that tells which parts of the ghc library to worry about learning first?
xerox Jedai: /MSG lambdabot ?list 15:55
1) Read the Prelude.
cjeris 2) is $ precisely equivalent to avoiding parentheses? (sequence $ replicateM n (print xs) ?=== sequence (replicateM n (print xs)))
xerox 1.a) Try to understand the parts of the Prelude that interest you.
1.b) Re-read the Prelude.
Jedai thanks ^^
xerox 2) Yes, it is.
cjeris 3) if I have a VList, how do I construct a fresh reference to it? (I'm trying to modify Pugs.Prim.List to distribute hyperoperators into lists) 15:56
xerox What is a VList?
15:56 nothingmuch_ joined
audreyt cjeris: direct translation 15:57
until (== 10) (\x -> show x `trace` x+1) 0
though lambdafolks is going to lynch me for this
xerox growls
O_O
What are you teaching!
audreyt I'm teaching that "trace" is a refreshing desert in the oasis of referential transparency
xerox thinks 15:58
xerox is illuminated
audreyt :D
cjeris: a fresh reference?
cjeris: if you want a mutal reference, use newTVar
but I'm not sure which part are you modifyting
cjeris I think it _should_ be a mutable reference. Let me paste and show what I got, just a sec. 15:59
xerox is up for more Haskell questions, if anybody needs
15:59 justatheory joined
pasteling0 "cjeris" at 140.247.124.140 pasted "hyperop distribution in Pugs.Prim.List" (25 lines, 691B) at sial.org/pbot/18435 16:00
ingy morning
audreyt ingy: hi 16:01
ingy hi audreyt!
pasteling0 "cjeris" at 140.247.124.140 pasted ":E results from the above" (74 lines, 1.8K) at sial.org/pbot/18436 16:02
cjeris The result is wrong, correct? The second element of the resulting array should be a reference, like in the original value.
16:03 avarab joined, jkanter joined
audreyt indeed 16:04
because in
| VRef x' <- x
= doHyper =<< readRef x'
readRef already ditched the refhood
and changed it into a rvalue
?eval -<< [1,2,3] 16:05
evalbot_11584 (-1, -2, -3)
audreyt as you can see, it forces rvalueness
instead of preserving the container
so your patch is correct
it's the two lines above it that are questionable
please commit
(and change postfix/infix while you are at it)
cjeris ok, will do!
audreyt cjeris++ 16:06
Jedai ?eval -<< [1,[2,3]]
evalbot_11584 (-1, -2)
audreyt now, to redistribute over it
we need something like modifyRef
so you can say
modifyRef x' doHyper 16:07
pmurias ?docs trace
lambdabot trace not available
pmurias ?index trace
lambdabot Debug.Trace
pmurias ?docs Debug.Trace
lambdabot haskell.org/ghc/docs/latest/html/li...Trace.html
audreyt (bbiab) 16:08
robkinyon seen alias
jabbot robkinyon: I havn't seen alias, robkinyon
16:15 penk joined, spinclad_ is now known as spinclad
pmurias ?index unsafeIO 16:15
lambdabot bzzt
pmurias ?index unsafeIo
lambdabot bzzt
Jedai ?? 16:16
cjeris xerox: belated thanks! 16:18
TimToady ?ev6l say "hello v6evalbot someday?" 16:20
16:21 FurnaceBoy joined
TimToady course, loading in 100megs of compiler every time would be suboptimal... 16:22
gaal pmurias: looking for unsafePerformIO ?
TimToady took me 9 minutes to compile 08-test.t the first time last night...
by the way, seems like there should be a way to force recompiles based on whether the compiler changes as well as whether the original source changed. 16:23
on the other hand, in the current state of development, that would be akin to simply turning off the *c caching... 16:24
gaal heh 16:25
TimToady: I was wondering about .valid... is it just cute or is there a link between identity and validity that I was missing?
(I understand it's a pun on value identity; just don't see why it should be)
pmurias gaal: thanks 16:26
TimToady last night I made the mistake of installing PCP before running "make test", so the installed prelude didn't have its .pmc. Make ./foo in my home directory always run slow...
gaal contemplates .superego
TimToady a value type used to be defined as an object type that sets .id appropriately so that uniqueness is enforced on the contents of the object rather than its reference. 16:28
that is the sense in which it is a value id.
Daveman Hello, TimToady 16:29
TimToady to the first approximation, value types return their contents as their own id
gaal yes...
pmurias: see also haskell.org/haskellwiki/GHC/FAQ#Whe...rformIO.3F
lambdabot Title: GHC/FAQ - HaskellWiki
TimToady howdy Daveman 16:30
gaal TimToady: but is it worth possible clashes with user defined slots called "valid"?
TimToady much less likely than .id, I think
and easy to avoid with .is_valid or some such. 16:31
gaal ".valid?" :P
TimToady meh, to quote nothingmuch...
gaal pmurias: actually there was another answer to that FAQ that was better. can't find it now, but it had to do with NOINLINE and stuff. 16:32
nothingmuch_ ?!
lambdabot Maybe you meant: . v
nothingmuch_ how am *I* responsible for that?
gaal lol
16:32 nothingmuch_ is now known as nothingmuch
audreyt 18:30 < audreyt> is there a CPAN module that uses overload instead of tie 16:32
18:31 < audreyt> to implement lazily-calculated values?
18:31 < audreyt> Data::Lazy uses tie, Contextual::Return uses lvalue sub
18:31 < audreyt> is there an overload-based implementation?
TimToady you're not--you're irresponsible for it. 16:33
audreyt (trying to add thunks to jifty+moose)
nothingmuch audreyt: for any data? hmm....
gaal irregardlessic of nothingmuch's 'sponsibility...
16:34 vel joined
audreyt nothingmuch: yeah. I see a general use for that 16:34
gaal what's wrong with just, ".id"?
audreyt ponders Data::Thunk
nothingmuch gaal: i think that it's because not every object wants to have an .id
and the name sort of assumes it does
audreyt gaal: ruby people learned that in MVC, the framework wants the .id
and the language shouldn't grab that for nefarious purposes
gaal I... don't see how renaming it to .valid will change that :/ 16:35
audreyt it's more common for DBs to have columnes named "id" than "valid"
gaal aha!
TimToady valid is spelled "NOT NULL" or some such.
gaal the coin drops, thanks audreyt :) 16:36
pmurias isn't .valid a pretty evil attribiute, that should have a less nice name like valueid?
TimToady yes, but so is grabbing .meta
gaal audreyt: you're giving Perl a bad name in golf by writing all those moudles in the Data:: namespace. In haskell it's one quarter the dots; "Data."
TimToady and the fact is that we are also defining it to mean "is valid" 16:37
as in "not a prototype or undef"
the only difference between it and .defined at the moment is that .valid returns an id rather than a bool.
gaal well, we can have .defined return the ID. 16:38
TimToady and an id could be rather spectacularly large.
gaal ...or not in boolean context :)
audreyt having .defined returning the id is maybe a good idea.
$obj.def
TimToady only if it can be generated lazily on demand
audreyt $obj.defun # not this
gaal keep the fun in 16:39
gaal opens pundora's box
audreyt if .defined -> $id { ... }
16:39 gugod_ is now known as gugod
gaal what's the context of meth in if .meth { ... }? 16:40
(no ->)
(no arg)
TimToady syntax error, two adjacent terms 16:41
or would be, if if weren't if
gaal okay, what's the context in if .meth -> { ... }
TimToady same thing
both {...} and ->{...} know when a statment wants 'em 16:42
so "if .meth { ... }" works only if "if" is at statement expectation.
it would be a syntax error where a statement modifier is expected. 16:43
gaal to disambiguate there what would be needed? .meth() ? (.meth) ? 16:44
16:44 rlb3 joined
TimToady disambiguate to mean what? 16:45
as statement works already
as modifier would still be two terms in a row. 16:46
audreyt gaal: TimToady is talking about postfix if 16:47
svnbot6 r11585 | cjeris++ | Make hyperops distribute into lists, sort of: they propagate down into lists now, but references
r11585 | cjeris++ | are forcibly dereferenced, which is wrong.
gaal er. okay. I'm just wondering if context in audreyt's .defined example above is determined by the presence of an explicit arg to the block
does $_ get bound implicitly in if? (I'm hoping it isn't, vaguely recall a discussion) 16:48
audreyt it's not
gaal okay
TimToady no, it's explicitly bound to .meth because you it was where a term was expected and there's no object to the left of the . 16:49
s/you//
$x = .meth; means $x = $_.meth always. 16:50
gaal thanks, got it. 16:51
broquaint How do I modify an array in place with grep?
It used to be @foo=.grep:{/test/}; 16:52
TimToady audreyt: I was wondering if evalbot should translate newlines to ␤ instead of space.
broquaint s/=./.=/
SamB TimToady: how did you *do* that? 16:54
svnbot6 r11586 | fglock++ | added pX/fglock/Pugs-Compiler-Rule-Bootstrap
SamB I thought ␤ was a control character?
TimToady I said "uni newline" to find the character using my uni program.
SamB oh, I see...
TimToady then I cut and pasted it.
SamB U+2424 SYMBOL FOR NEWLINE 16:55
TimToady that's the one.
SamB it looked just like the glyph for newline in one font I've seen...
TimToady In my font it's a high N and a low L
that's what it's supposed to look like, methinks. 16:56
SamB something like that
16:56 fglock joined 17:02 shachaf joined
broquaint ?eval my @a = <foo bar baz>; @a = @a.grep:{ /b/ }; @a.perl 17:03
17:03 evalbot_11584 is now known as evalbot_11588
evalbot_11588 "[\"foo\", \"bar\", \"baz\"]" 17:03
17:04 buetow joined
broquaint ?eval my @a = <foo 123 bar 456 baz>; @a = @a.grep{/\w/}; @a 17:04
evalbot_11588 Error: Cannot cast from VList [] to Pugs.AST.Internals.VCode (VCode)
broquaint ?eval my @a = <foo 123 bar 456 baz>; @a = @a.grep:{/\w/}; @a
evalbot_11588 ["foo", "123", "bar", "456", "baz"]
broquaint Hrm.
?eval my @a = <foo 123 bar 456 baz>; @a=.grep:{/\w/} 17:06
evalbot_11588 ["perl6",]
broquaint ?eval my @a = <foo 123 bar 456 baz>; @a.=grep:{/\w/}
evalbot_11588 Error: unexpected "=" expecting ".", subroutine name, array subscript, hash subscript or code subscript
17:06 shachaf joined
TimToady ?eval $_ 17:08
evalbot_11588 \"perl6"
TimToady ?eval .grep(/./) 17:09
evalbot_11588 Error: Cannot cast from VList [VRule (MkRulePGE {rxRule = ".", rxGlobal = False, rxStringify = False, rxAdverbs = VUndef})] to Pugs.AST.Internals.VCode (VCode)
broquaint I got this which was more amusing: *** Undeclared variable: "$module" etc
TimToady ?eval .grep({/./})
evalbot_11588 ("perl6",)
broquaint goes to find what .= has changed to ... 17:10
TimToady do you mean string concat or mutating method? 17:11
.= should currently be a mutating method, and I say your error is a bug. 17:12
broquaint Mutating, and that earlier code was definitely buggy (just wanted to see if I could get the same error).
But shouldn't this work (as it used to): 17:13
?eval my @a = <foo 123 bar 456 baz>; @a.=grep:{/\w/}; @a
evalbot_11588 Error: unexpected "=" expecting ".", subroutine name, array subscript, hash subscript or code subscript
TimToady ?eval my @a = <foo 123 bar 456 baz>; @a .= grep:{/\w/}
evalbot_11588 ["foo", "123", "bar", "456", "baz"]
TimToady ?eval my @a = <foo 123 bar 456 baz>; @a .= grep:{/\d/}
evalbot_11588 ["foo", "123", "bar", "456", "baz"]
TimToady er...
broquaint Whitespace, eh? I missed that.
TimToady both forms should work. 17:14
but it looks like the grep on \d didn't change anything.
broquaint Hrm, methinks pugs could do with a couple of extra tests.
TimToady ?eval my @a = <foo 123 bar 456 baz>; @a .= grep:{/\d/}; @a
evalbot_11588 ["foo", "123", "bar", "456", "baz"]
audreyt good, overload is 76%+ faster than tie. 17:15
TimToady that's not saying much. :) 17:18
17:18 ruoso joined
TimToady almost everything is faster than tie... 17:19
gaal TimToady: I'm engaging in some espionage, does your "uni" have more features than this?
perl -CO -e 'my $s = "@ARGV"; @ARGV = "/usr/lib/perl5/Unicode/CharName.pm"; my @d = <>; shift @d until $d[0] eq "__DATA__\n"; for (@d) { next unless /$s/io; /(\S+)(.*)/; printf "$1 $2 [%s]\n", chr hex $1 } ' alef
pmurias ruoso: hi
svnbot6 r11590 | broquaint++ | * Added some tests for adverbial modification with grep (I ran into this 17:21
r11590 | broquaint++ | issue when updating the hop6 examples).
pasteling0 "TimToadyu" at 71.139.18.230 pasted "uni" (20 lines, 450B) at sial.org/pbot/18440 17:22
gaal TimToady: thanks :) 17:23
17:23 weinig is now known as weinig|working
TimToady the main thing it does is not hardwire the path name. 17:24
gaal yeah :)
TimToady by the do-File sneakiness.
gaal (do-File)++
17:24 hcarty joined
ruoso hi pmichaud 17:25
hi pmurias
gaal and is bidirectional
TimToady that too
and deals with badly encoded utf8 17:26
gaal merrily pastes a copy of TimToady's script in ~/bin 17:27
TimToady except it should probably throw a ^ on the front of some of those patterns. 17:28
gaal putting the character in []s is useful for bidi terminals
and to see more explicitly if your font is missing glyphs
TimToady I can see that. 17:29
though in some ways easier to copy-n-paste without other printables near it
gaal tru dat. 17:30
(sneaky hex usage)++ 17:31
TimToady shower & 17:36
daxim to which value do I have to set the UNICONF environment variable? 17:39
audreyt Data::Thunk 0.01 on CPAN 17:44
obra . o O { Does Jifty depend on it? } 17:48
audreyt liz++ # Data::Reuse 17:49
obra: if you want the lazy{} semantics, then yes
obra :) 17:50
audreyt ergonomics question 17:57
currently
in pugs 17:58
my $x = lazy {...};
evaluates at most once
that matches the call-by-need strategy
what's a good name for teh call-by-name
i.e. evaluate each time when it's demenaded
strategy?
my $x = later {...}; # this? 17:59
my $x = delay {...}; # this?
but both means more compute-once
gaal defer?
slothlike
audreyt I like "defer" 18:00
defer it is then 18:01
gaal++
audreyt deletes Data::Thunk and uploads Data::Defer
gaal Data::NameDropping 18:03
dinner & 18:04
svnbot6 r11591 | fglock++ | pX/fglock/Pugs-Compiler-Rule - better separation of compiler and runtime 18:09
audreyt ...and it's know Scalar::Defer 18:16
naming takes more time than coding up tests+doc+code
18:18 avarab is now known as avar 18:19 evalbot_11588 is now known as evalbot_11592 18:20 fglock_ joined
spinclad ?eval 1.infix:<+>(2) 18:20
evalbot_11592 3
spinclad ?eval "Hi, all".say
evalbot_11592 OUTPUT[Hi, all ] Bool::True
TimToady ?eval "␤".say 18:21
evalbot_11592 OUTPUT[$ ] Bool::True
TimToady $?
safe_print has strange ideas...
Daveman hmm 18:25
TimToady $.➥(:job) 18:29
audreyt fglock_: I'll go ahead and change ::Match to allow $$match 18:33
to agree with the spec
$match->() will be preserved (for a while anyway)
fglock audreyt: you are changing Pugs::Runtime::Rule? 18:37
audreyt ::Match
fglock does it make sense if $match were an iterator? I think it may make some operations easier 18:38
audreyt sure, maybe overload <> as well
fglock $match.next would be the next match in the same string 18:39
audreyt: I'm rewriting PCR internals in pX/fglock 18:40
18:41 typester joined
audreyt oh. 18:41
stevan ah.
audreyt heh :)
stevan :P
Data::Thunk??
looks nice
audreyt now Scalar::Defer 18:42
plays well with moose
stevan even better :)
M????????se!!
audreyt: I was pondering a sugar layer for Sub::Multi last night
and I talked to clkao about possibly having a bind-time a check-time which could check against Moose Type constraints 18:43
s// hook/
whoops,.. bad regex,.. 18:44
you get the idea though I think
I was wondering if you had any existing thoughts/plans on this yet
audreyt well, there's typesafety.pm 18:50
svnbot6 r11593 | audreyt++ | * Pugs::Runtime::Match - change its underlying representation to support
r11593 | audreyt++ | $$match to return the capture, which is closer to the spec.
audreyt I think the sugar question is how to attach sig to subs 18:51
seems to be either optree rewriting to support full
sub f (Type $x) {}
or go with
sub f :sig(Type $x) {}
what should CHECK-time constraints check do?
fglock: my r11593 patches cleanly against your branch 18:54
fglock: should I commit?
fglock audreyt: sure
audreyt done 18:55
fglock Pugs::Runtime::Match::Ratchet too
stevan typesafety.pm?? 18:58
18:58 amnesiac_ joined
audreyt fglock: havn't got around to it yet 18:58
fglock: because the emitter uses direct bless()
I guess we can retain the bless if we bless
sub{}
instead of
\
stevan: see CPAN
18:59 amnesiac_ is now known as amnesiac
stevan yes,.. looking 18:59
audreyt and switch &{} versus ${}
svnbot6 r11594 | audreyt++ | * bring the $$match fix to fglock's branch.
r11594 | audreyt++ | $match->data is now the accessor into underlying structure
audreyt but I think a ->new call is maybe more regularlized?
fglock audreyt: ok, I'll change to new 19:00
audreyt cool, then I'll wait for that change before changing representation
(or you can look at ::Match and do the change, too)
fglock audreyt: please only change Match::Ratchet - Match.pm is going away
audreyt ahh
heh
okay :)
then please renormalize to ->new first
and then I'll look at ::Ratchet
stevan audreyt: ok,.... typesafety looks kind of scary,.. but very interesting 19:01
audreyt stevan: need to extract out only the part that deals with signature
and bridge it with our own TypeConstraint
stevan audreyt: well I was thinking purely of sugar over the Data::Bind version
audreyt *nod*
stevan let me nopaste the examples I sketched out 19:02
audreyt Attribute::Handlers is maybe saner
ok
pasteling0 "stevan" at 71.234.68.135 pasted "Data::Bind->sig sugar" (52 lines, 1.6K) at sial.org/pbot/18445
stevan personally I would like to avoid attributes,... they tend to need CHECK/INIT
which is problematic for mod_perl,.. which is what all my $work is under 19:03
the one part which I didnt show here,.. is the way Data::Bind subs need to be called
the [ $positonal ], { named => ... } stuff
audreyt nod 19:04
[ \1, \2, \3 ]
can be written
[ \(1, 2, 3) ]
so that's a bit better
stevan why does it need to be references?
audreyt named is still bad though
because of "is rw" params
stevan ah
audreyt stevan: looks very nice 19:05
stevan maybe a bind() sugar could deal with that
audreyt yeah
stevan cool :)
audreyt stevan++ # sweet sugar moose
stevan I promised clkao some failing tests 19:06
for the bind/check-time hook
ch?c?late m??se :P
cjeris where can I find the definition of the Each role? 19:08
audreyt ideally, docs/Perl6/API/Each
.po
.pod
practically, you'd have to write it yourself... or ask p6l so p6l can write it out 19:09
cjeris the particular question I have is whether objects that 'does Each' are required to be constructible from their constituents.
S03's definition of hyperoperators seems to require that: Seq(3,8,[2,Seq(9,3)],8) >>-<< (1,1,2,1); # Seq(2,7,[0,Seq(7,1)],7) 19:10
ruoso fglock, I'm getting "Too many arguments for Pugs::Runtime::Perl6::Inf" when running the tests...
fglock, is it some known situation?
19:11 larsen joined
cjeris But then it seems (naively) that you can't implement Each for something like database rowsets. 19:11
audreyt cjeris: I understand. it's something like cvs.haskell.org/Hugs/pages/librarie...sable.html
but it's not been defined yet
fglock ruoso: no, I haven't seen this error - it is a signature mismatch, detected by Data::Bind - maybe recompile the latest Data::Bind? 19:12
ruoso ok... I'll try that...
fglock, should I use the svn version or the CPAN version? for Data::Bind, I mean... 19:13
cjeris suffers cranial detonation
fglock ruoso: svn version, if you are using svn v6.pm 19:14
ruoso ok
cjeris ok, let's see if I can put together an intelligible question for the list.
ruoso fglock, nops... same error...
audreyt stevan: API q 19:15
stevan: for moose typeconstraint Str
stevan audreyt: API a
audreyt currently an object with overloaded "" won't pass.
two solutions
Scalar::Defer can bless to package 0
or, we can code for Overloaded.
19:15 silug joined
stevan is the Scalar::Defer object blessed into anything already? 19:16
audreyt currently into Scalar::Defer
fglock ruoso: ' perl -Ilib lib/v6.pm -e " Inf.say " ' works for me - I'll update my Data::Bind now
audreyt I wouldn't mind blessing into 0
ruoso fglock, actually... perl -cw Perl6Prelude.pmc fails with this error 19:17
it's not the test itself
stevan audreyt: maybe a coercion from type constraint 'Scalar::Defer' to Str would work?
audreyt er no 19:18
stevan ok
just a thought :)
audreyt the entire point is that the attr is deferred :)
gaal wow blessing to 0 is a dirty trick :)
audreyt gaal: it fools even S::Util::blessed
gaal really? isn't that in XS?
audreyt it returns the package name 19:19
;)
gaal heh.
bool::true but bool::false
stevan audreyt: I will leave the descision up to you,.. I think handling overloads in the type constraints is probably a good idea, but its maybe a lot of work (for which I dont currently have tuits)
however you do have a commit bit ;) 19:20
svnbot6 r11595 | fglock++ | pX/fglock/PCR - s/bless/new/
fglock ruoso: try rm Perl6Prelude.pmc ?
ruoso ok 19:21
stevan audreyt: honestly, I feel like I have reached the end of my useful knowledge with the Type Constraints,.. I need input/help from someone more knowledgable on the subject
ruoso btw... the installation of Pugs::Compiler::Rule tries to touch the file
stevan or a long vacation, during which I can read TaPL again
ruoso it should do that during build, shouldn't it
?
I mean, my $HOME is under NFS with root_squash... 19:22
so, root can't touch my home
fglock yes, the pmc must have a newer date than the pm file 19:23
audreyt stevan: ok. we need support for all C::MM::Pure semantics
stevan: which inclues negated and intersection types
stevan: "not"/"and" in addition to "or"
ruoso fglock, but it should be done during build, not during install
as the user is supposed to run "install" as root... 19:24
and in my case, root can't touch my home
but besides that...
fglock ruoso: it should 'touch' only when you run Makefile.PL 19:25
stevan audreyt: agreed
ruoso fglock, nops...
make install touchs it
audreyt stevan: I think I'll simply make overloaded values bypass constraints for now 19:32
i.e. if something overloads @{}, it might as well be an ArrayRef
fglock ruoso: it may be a Module::Compile problem - maybe discuss it with ingy? 19:33
audreyt it's a Module::Install::Compile thing I think
or rather Module::Install::PMC 19:34
ruoso: it's touched in config stage
not sure if that also gets run on install
shouldn't, though.
ingy hola
:)
amnesiac que onda
ingy: qué cuentas?
:P
ingy amnesiac: su madre! 19:35
amnesiac hahahaha
no no...
qué cuentas == what's up
:P
ruoso audreyt, it's really called when installing...
ingy my assertion stands then ;) 19:36
ingy ducks
amnesiac shakes ingy
ruoso just made clean, perl Makefile.PL; make; make test; su -c 'make install'
ingy ruoso: do you have some patch for me?
ruoso not yet... 19:37
still trying to understand... 19:38
wow... running make -d install is pretty ugly 19:41
19:42 gosha joined
silug does anyone know of a clear license statement for the docs included with Perl6::Bible? 19:43
gosha hello what's the easiest way in perl to open an image given a URL. e.g. something like: open(IMAGE, 'perl.ftw.com/perl/is/greater/than/php.jpg') 19:44
ruoso wow
if I remove Makefile.old it just works
nops nops 19:45
wolverian gosha, possibly IO::All or LWP::Simple. anyway, you probably want #perl, as this channel is for the development of the next version of perl.
ruoso wrong bet
gosha wolverian: oops sorry. but thanks!
I'll ask there as well :) 19:46
ruoso forgot to 2>&1
wolverian gosha, no problem :) 19:49
ruoso ingy, do you have a clue for me?
19:49 salty-horse joined
salty-horse pugscode.org links to the pugs::hack doc, and it's gone: search.cpan.org/dist/Perl6-Pugs/lib...s/hack.pod 19:51
fglock ingy: in M::C, the example only works if I change pmc_optimize() to pmc_compile()
19:52 cmatei joined, undrdawg joined 19:56 gosha left
ruoso ingy, i give up... 20:03
:)
audreyt salty-horse: fixed 20:04
ruoso: the thing is that we need a variant of TOUCH
fglock audreyt: I made the conversion in Match::Ratchet
audreyt that does not get run if it doesn't need touching
ruoso: that is, if .pmc is already newer than .pm 20:05
then don't touch it again
ruoso audreyt, can't Makefile take care of that itself?
audreyt $(TOUCH_TO_MAKE_NEWER) foo.pmc foo.pm
svnbot6 r11597 | fglock++ | pX/fglock/PCR - converted Match/Ratchet.pm to inside-out
salty-horse audreyt, still nothing. is it the same url?
audreyt salty-horse: pugscode.org fixed
fglock: yay!
ruoso audreyt, I mean, in debian we usually create a .stamp file to control that 20:06
audreyt ruoso: I guess you can make the .pmc file depend on .pm
with a rule of simply TOUCH
ruoso yes, that works too...
audreyt and make the config target depend on the .pmc files
I think that's cleanest
code it up? :) it's in search.cpan.org/src/INGY/Module-Com...all/PMC.pm
ruoso taking a closer look... 20:07
20:08 lumi joined
nothingmuch clkao: i'll add $1 to my paypal dept if you give App::CLI some docs 20:12
ingy nothingmuch!!!!!!
nothingmuch ingy: !!!!!!!!!!
ingy :B
=:B 20:13
nothingmuch <3
salty-horse for some time now i've been getting an error while building pugs using a clean svn checkout and running "perl Makefile.PL; make unoptimized: Cannot import `Data.ByteString': it was found in multiple packages: pugs-fps-0.7 fps-0.7. (imported from src/Pugs/AST/Internals/Instances.hs). i guess i'm doing something wrong, since it's unlikely the tree is broken for so long. 20:14
svnbot6 r11598 | fglock++ | pX/fglock/PCR - Runtime/Match is used by the compiler; Runtime/Match/Ratchet is used by the runtime
audreyt salty-horse: please run a 20:15
ghc-pkg --user unregister fps 20:16
to resolve it
20:17 FurnaceBoy joined
audreyt adding it to Makefile.PL 20:17
salty-horse audreyt, i'm still getting this when running Makefile.PL: Could not find module `Data.ByteString': use -v to see a list of the files searched for (imported from pugs-tmp-16465.hs) 20:21
audreyt salty-horse: that's fine, simply "make" 20:23
I guess I should supress that error
broquaint ?eval eval("{} \n if 1"); $@
20:23 evalbot_11592 is now known as evalbot_11598
evalbot_11598 Error: unexpected "@" expecting "::" 20:23
broquaint What's $@ these days?
audreyt $!
$@ and $^E and $? and $! are unified
broquaint Ta.
salty-horse i'd rather "make unoptimized". it takes ages on my machine
broquaint ?eval eval("{} \n if 1"); $!
evalbot_11598 \undef
audreyt salty-horse: sure, same
20:23 bpphillips left
broquaint Hrm, I get an error on my build. Probably time to re-compile ... 20:24
audreyt broquaint: that's an error actually 20:26
svnbot6 r11599 | fglock++ | pX/fglock/PCR - added some docs to Match.pm
audreyt ?eval eval("\{\} \n if 1"); $!
evalbot_11598 \undef
audreyt hrm
pugs> eval "\{\}\n if 1"; say $!
unexpected end of input
expecting "_", fraction, exponent, term postfix, comment, operator or block
broquaint Yeah, I get something like that. 20:27
Is that a pugs thing or a perl6 thing?
audreyt anyway, you get that because of the line-ending-closing-brace is statement-ending-closing-brace rule.
it's a perl6 thing.
broquaint Any idea how to fudge it because I've got a few places where I have braces before an if modifier?
audreyt don't put \n there. 20:28
broquaint Urk :/
audreyt $x = { } \ if 123; 20:29
er
$x = {}
if 123;
to fix it:
$x = {
} if 123;
or
$x = {} if 123;
or
$x = {} #(
here is your advertisement
) if 123;
broquaint Aha, thanks :) 20:30
cognominal discover haskerls www.dcs.gla.ac.uk/~partain/haskerl/...ain-1.html
lambdabot Title: A message about Haskerl
cognominal Apparently every joke is somehow doomed to become someohow a reality
audreyt indeed. 20:31
cognominal spj++ # excellent paper about haskell history 20:33
svnbot6 r11600 | audreyt++ | * unregister --user fps before we install; promoted by salty-horse++
audreyt liberates the Jifty declarative-constructor and make it available to all mooseland :D
# nopaste.snit.ch/7680
(reflecting accessors into its own DSL, for the duration of a block, to construct objects) 20:34
broquaint Mmm, mind-boggling.
xerox Surely looks "declarative" :) 20:35
salty-horse audreyt, lisppaste3 is sitting right here...
audreyt yeah, this is cross-pasting from #moose
...which has, surprisingly, became an underground lab for mad scientists working on Object/Relational Mapping technologies on CPAN of sorts... 20:36
20:36 tga joined 20:37 FurnaceBoy_ joined
salty-horse i still don't condone ORM, coming from an environment that likes to pre-cache the execution plans in the database and fine-tune them. it's good for quick-hacking, though 20:37
audreyt salty-horse: have you read 20:38
stevan audreyt: :D
audreyt msdn.microsoft.com/netframework/def...risons.asp
lambdabot Title: .NET Framework Developer Center: Comparing LINQ and Its Contemporaries
audreyt ?
Moose is good for working on _that_ sort of ORM :)
salty-horse reading..
fglock audreyt: is inside-out really necessary for Match? it is much more difficult to add data from inside Runtime::Regex 20:40
audreyt fglock: well, the problem is that ${} @{} %{} are all used up
broquaint &{}!
audreyt yeah, that's an option
fglock: is a call to ->data hard? what's the use case? 20:41
fglock: we don't need inside out per se, but we do need somewhere other than $$ to hold the data 20:42
blessing subrefs and use &$ref is one way out 20:43
inside-out is another
though &$ref can't do assignment
while you can use ->data() to reset the info
ruoso audreyt, why is inc::Module::Install being used after all? 20:44
I mean
audreyt ruoso: because perl 5.9.3 and below has a bug
fglock audreyt: ok
audreyt ruoso: if you check out source from svn, there's no guarantee that .pmc will be more fresh than .pm
ditto for wget -m 20:45
ruoso: and unless .pmc is more fresh, it's not used
it's fixed on perl 5.9.4
but for now we need workaround
that uses TOUCH
ruoso will try something... 20:46
fglock, is lrep inside Pugs-Compiler-Rule standalone? 20:47
or does it depends on something inside PCR? 20:48
fglock it's standalone - it is only used for compiling the grammar
ruoso could it be moved to where Module::Install::PMC resides? 20:49
ruoso considering Module::Install::PMC as a separated module
including lrep inside it
no no no
forget it
fglock ruoso: later versions will not depend on lrep 20:50
ruoso I realized that just after typing 20:51
fglock because v6.pm will be used to compile the grammar
20:56 pdcawley_ joined, tga left 20:57 weinig|working is now known as weinig
pasteling0 "ruoso" at 201.8.237.163 pasted "Proposed change on PCR Makefile.PL (solves touch on install)" (38 lines, 928B) at sial.org/pbot/18452 20:58
ruoso just realized... the first 2 lines on MY::postamble are not necessary... 21:00
fglock, please take a look ^
make clean should remove the .pmc file, shouldn't it? 21:03
fglock ruoso: can it still use '$^X ' ?
ruoso: no, lrep is not in the dist 21:04
ruoso fglock, hmmm...
21:04 Bit-Man joined
fglock cpan users get a precompiled .pmc 21:04
ruoso changed to use $^X 21:05
hmm... 21:06
and what if they want to change something locally? 21:07
will they have to deal with the generated p5 file?
fglock they need a svn version, otherwise we have to pack lrep into the dist 21:08
21:09 DS41 joined
ruoso do we loose something, doing that? 21:09
fglock not really
ruoso why not doing it? 21:10
even if not installing it
fglock mm - because most developers just use the svn version anyway?
and it will be dropped in later versions 21:11
ruoso hmm... ok...
that's a point
fglock also, it used to take several minutes to compile the grammar - now it is faster 21:12
pasteling0 "ruoso" at 201.8.237.163 pasted "Final version of PCR Makefile.PL diff" (34 lines, 880B) at sial.org/pbot/18454 21:15
ruoso fglock, ^
may I commit it?
fglock ruoso: does it work in windows? 21:16
ruoso hmmm... don't konw 21:17
*know
if it doesn't... I can change p6compiler.pl to accept -o and take care of that shell part 21:18
pasteling0 "ruoso" at 201.8.237.163 pasted "patch to Module::Install::PMC" (19 lines, 469B) at sial.org/pbot/18455 21:19
ruoso ingy, audreyt ^ 21:20
fglock ruoso: I'm ok 21:21
ingy ruoso: go it 21:22
got it
fglock home & 21:24
ingy ruoso: can you make that diff from the top level dir of M::C?
there are two PMC.pm files
and I am lazy
and anyway, it's good form
ruoso ingy, well... I was with just that file... but wait a second... 21:25
ingy ruoso: you can do 'svn diff'
ruoso: also your patch looks backwards :P 21:26
pasteling0 "ruoso" at 201.8.237.163 pasted "patch to Module::Install::PMC" (19 lines, 501B) at sial.org/pbot/18456
ruoso ingy, I'm not with svn sources of module::compile 21:27
ingy yeah, that one doesn't look backwards
ruoso is it inside pugs svn? 21:28
ingy no
svn.kwiki.org/ingy/Module-Compile
lambdabot Title: Revision 2877: /Module-Compile
ingy ruoso: even that was not top level :P 21:31
ruoso I have your svn now... 21:32
ingy anyway. applied
ruoso do you want me to make a patch from there?
ingy nope, it's done 21:33
thanks!
ruoso ok
ingy++
ingy ruoso: File successfully copied to '/home/ftp/incoming/Module-Compile-0.18.tar.gz' 21:40
(pause)
ruoso nice... 21:41
does (cd dir && dosomething) works in windows?
ingy I doubt it 21:42
by work, I assume you mean to not leave the current dir 21:43
are you asking if you can do that in a Makefile?
ruoso yes 21:44
salty-horse shouldn't "print" print $_ by default? 21:45
ruoso someone in a windows machine around? 21:47
cjeris ruoso: it works on my XP box, surprisingly 21:49
but it leaves you in the resulting directory 21:50
which I guess is defined as "not work"
ruoso ok... so (cd dir && dosomething && cd ..) works for both
if dosomething fails, it won't leave the dir, but will stop the processing anyway... 21:53
so I don't think it's a problem
salty-horse why does this parse: "for(1..5) {;}" while "for(1..5){;}" doesn't? 21:58
nothingmuch clkao: ping 22:05
clkao pong 22:06
svnbot6 r11602 | ruoso++ | New parameter --output-program=s. p6compiler can now save to a file...
r11603 | ruoso++ | Avoid touching the file in make install... using per-file dependancy on config, make manages when to regen the .pmc file now...
TimToady salty-horse: because the second form looks like a hash subscript.
salty-horse thanks. how silly of me. i actually saw this on examples/snowing.pl 22:07
clkao TimToady: oh, do you know where the syntax @b.map:{$_+1} is defined?
ruoso realizes Perl 6 will not be sooo good on golf plays
nothingmuch clkao: i have a doc patch for you
clkao nothingmuch you get US$1 for the balance then? 22:08
nothingmuch yes
=)
but it's not 100% complete
some descriptions are missing
still an improvement though
salty-horse same snowing.pl example also tries things like "say$var;". should it work? are sigils allowed for function names?
nothingmuch how should I submit the patch?
TimToady clkao: S12.pod: @list.grep: { $_ % 2 }.map: { $_ - 1 }.say 22:12
svnbot6 r11604 | Sage++ | Added some basic work on translating regex internals (such as \A -> ^). Regex translation is done by a couple of functions to identify what text is a regex, then a parsec parser to actually handle the translation. Some of the code for split(FOO) -> .split(FOO) is also is place, but not quite fully ready yet.
r11605 | Sage++ | Updating with some functions used by the latest stuff in ASTTranslate.
TimToady salty-horse: that's just "say $var;"
salty-horse TimToady, so if I understand you, it should work (it doesn't ATM) 22:13
undrdawg ruoso, no that does not work
you need to use error level 22:14
errorlevel
nothingmuch clkao: ?
salty-horse lisppaste3, help
clkao nothingmuch: send it to rt.cpan? or me?
lisppaste3 To use the lisppaste bot, visit paste.lisp.org/new/perl6 and enter your paste.
ruoso undrdawg, I really don't know much about windows...
nothingmuch email unidiff?
ruoso undrdawg, could you provide an example?
undrdawg i havent messed with it ina while
google for it 22:15
ruoso ok... thanks...
undrdawg or, use perl
:D
dos is such a sucky shell
you'd be better off with vbscript or something i'd say
im just getting around to checking out perl6 22:16
is there any compatibility issues with perl5 code?
i believe there's actually an if command now 22:17
ruoso as the Makefile is generated... 22:18
having two versions is better than invoking 2 perl interpreters
just to run something in another directory 22:19
clkao nothingmuch: who helped you?
undrdawg www.robvanderwoude.com/ 22:21
lambdabot Title: Rob van der Woude's Scripting Pages: Batch Files, Rexx, KiXtart, Perl, VBScript
undrdawg that guys a dos pro
heh
nothingmuch clkao: ann
undrdawg www.tubgirl.com
:(
lambdabot Title: Consumption Junction, What's Your Dysfunction?
undrdawg hah
note to the clueless: dont click that 22:22
clkao nothingmuch: whoot
nothingmuch so 22:23
now i get help
It doesn't work!
22:28 froh-doh joined
nothingmuch clkao: so, err.. i can't get help or dispatch to a simple command to work 22:28
22:31 cjeris left
nothingmuch sheesh! he gets a doc patch and then suddenly i no longer exist 22:31
obra: maybe you can help? 22:32
obra ? 22:33
what's up? 22:34
nothingmuch obra: do you know App::CLI?
obra Some. not very well
"I've patched the code"
nothingmuch i'm having trouble figuring it ouot
"I've tried to use it" ;-)
i was paying clkao with a docpatch in exchange for some service 22:35
but then he disappeared!
obra ok. we made it go for jifty.
nothingmuch "made it go" ?
obra a made it work 22:37
nothingmuch ah
i thought "made it go away" ;-)
anywho
it appears that i've been doing stuff as exemplified
but i'm missing something
obra where can I grab the code? 22:38
nothingmuch want to subetha the code?
obra oh. you hadn't heard.
my courier bag strap came undone today
mac hit the ground. bent the case. broke the CD drive
nothingmuch shyte
obra $750 repair :/ but it'll be back tomrorow
nothingmuch sympathises
dented laptop
due to crappy bag 22:39
obra :/
and I was just about to order a replacement bag last night
nothingmuch so no macs or no subetha or no... ?
obra no subetha. due to no mac.
tarball?
nothingmuch yep, making
actually 22:40
i'll juist commit
darcs has amend-record
and you can see it on the web
moving to /msg 22:41
22:41 furrybeagle joined
nothingmuch EXTRA EXTRA! SVK PROPIETOR USES DARCS OUT OF CHOICE! 22:42
At 01:42, IDT today, Jesse Vincent, whose company Best Practical Solutions LLC had recently acquired the version control tool SVK was logged on IRC saying that he will voluntarily install darcs 22:43
When questioned Jesse did not respond within seconds, the reason likely being that he was busyin installing the tool. 22:44
wolverian haha
nothingmuch Chia-liang Kao, SVK's author and Jesse's partner at Best Practical was unavailable for comment, as he was applying a doc patch. 22:45
obra Yep! Jesse was busy stealing darcs' mojo 22:46
salty-horse should "say$a" parse as "say $a"? it doesn't seem to work 22:48
ruoso undrdawg, can you please test the Makefile.PL of Pugs-Compiler-Rule from SVN in your windows machine?
TimToady ?eval my $a = 'ABC'; say$a 22:50
22:50 evalbot_11598 is now known as evalbot_11605
evalbot_11605 Error: unexpected "$" expecting "::", dot, ":", "(", comment, term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input 22:50
clkao slaps nothingmuch with a wet patch
TimToady yep, seems busted to me, by the current parsing rules 22:51
salty-horse TimToady, say is a keyword, not a subroutine. it seems to work with subroutines (it works with my())
nothingmuch clkao: ?
salty-horse (i'm not sure isay is a keyword)
TimToady say is just a function and a method 22:52
salty-horse so how is it different from my? 22:53
TimToady ?eval sub foo(*@x) { say @x }; my $x = "abc"; foo$x
evalbot_11605 Error: unexpected "$" expecting "::", dot, ":", "(", comment, term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
TimToady ?eval sub foo(*@x) { say @x }; my $x = "abc"; foo $x
evalbot_11605 OUTPUT[abc ] Bool::True
TimToady my is a declarator
declarators really are keywords
salty-horse ?eval sub foo {say $_ }; my$x=123; foo$x; 22:54
evalbot_11605 Error: unexpected "$" expecting "::", dot, ":", "(", comment, term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input 22:55
salty-horse the above works on svn
ruoso asks himself if he's the only one who can't test svn v6-alpha 22:57
clkao ruoso: how come?
ruoso Error in perl 6 parser: Not a SCALAR reference at lib//Pugs/Grammar/BaseCategory.pm line 51.
clkao well, some of the tests have the error 22:58
ruoso use v6-alpha;"HelloWorld".say(); fails with the same error... 23:00
TimToady svn status show any out-of-sync files under pugs? 23:01
clkao it does work for me
TimToady just thinking maybe you have a private copy of something 23:02
ruoso hmm...
TimToady the double slash also seems a bit odd
ruoso TimToady, that's my perl -Ilib/... 23:04
shouldn't be a problem, should it?
no private copies... 23:05
TimToady you on unix or dos?
ruoso linux
TimToady shouldn't be a problem for // embedded in filenames, but could conceivably confuse other code, like s#.*/## kinds of commands. 23:06
anyway, it just looked strange, probably not related. 23:07
salty-horse: recompiling r11605 to see if we've regressed somehow. 23:08
salty-horse TimToady, not out-of-sync files on my copy of r11605 23:10
ruoso checking out everything again... 23:12
salty-horse actually, i was using r11600 for the tests - don't think it matters 23:14
nothingmuch clkao: is the open-your-editor portion of SVK copy-pastable 23:16
?
ruoso wonders why some files have  in the start? 23:19
wolverian BOM? 23:23
ruoso give up for today 23:24
ruoso can't figure out why he always get the same error
and nobody else gets it
ruoso going home 23:25
23:29 unobe_away is now known as unobe
salty-horse where do i submit patches to? 23:30
audreyt salty-horse: what's your email? I'll send you a commit bit
salty-horse: add yourself to AUTHORS 23:31
welcome aboard!
salty-horse yay
vsoni hi audreyt 23:33
audreyt latest uploaded-to-cpan hack:
perlcabal.org/~audreyt/tmp/object-declare.html
lambdabot Title: Object::Declare - Declare object constructor
23:36 furrybeagle joined
vsoni audreyt: ? 23:36
audreyt vsoni: hi 23:37
TimToady salty-horse: looks like it only failes inside eval 23:38
*fails
?eval say chr(0x2424) 23:41
evalbot_11605 OUTPUT[␤ ] Bool::True
TimToady heh
salty-horse hehe
23:41 esammer joined
salty-horse umm.. how does that escape parsing by eval? 23:42
TimToady I'm just trying to sneak ␤ past safe_print 23:45
not really related to your problem
salty-horse can you give an example where "say" is not parsed by eval? how did you reach your conclusion? 23:48
TimToady it's not parsed by eval when you type it directly to the pugs prompt. 23:49
but if you put eval '...'; $! around the same thing to the pugs prompt you'll get the same error 23:50
?eval join chr(0x2424), 1..100 23:52
salty-horse lisppaste3, help
evalbot_11605 "1\d[9252]2\d[9252]3\d[9252]4\d[9252]5\d[9252]6\d[9252]7\d[9252]8\d[9252]9\d[9252]10\d[9252]11\d[9252]12\d[9252]13\d[9252]14\d[9252]15\d[9252]16\d[9252]17\d[9252]18\d[9252]19\d[9252]20\d[9252]21\d[9252]22\d[9252]23\d[9252]24\d[9252]25\d[9252]26\d[9252]27\d[9252]28\d[9252]29\d[9252]30\d[9252]31\d[9252]32\d[9252]33\d[9252]34\d[9252]35\d[9252]36\d[9252]37\d[9252]38\d[9252]39\d[9252]40\d[9252]41\d[9252]42\d[9252]43\d[9252]44\d[9252]45\d[9252]46\d[9252]
lisppaste3 To use the lisppaste bot, visit paste.lisp.org/new/perl6 and enter your paste.
TimToady ?eval join chr(0x2424), 1..10 23:53
evalbot_11605 "1\d[9252]2\d[9252]3\d[9252]4\d[9252]5\d[9252]6\d[9252]7\d[9252]8\d[9252]9\d[9252]10"
lisppaste3 salty-horse pasted "pugs prompt (non-eval?) error" at paste.lisp.org/display/22777
TimToady ?eval join chr(0x2424), 1,2
evalbot_11605 "1\d[9252]2"
TimToady ?eval 1 ~ chr(0x2424) ~ 2 23:54
evalbot_11605 "1\d[9252]2"
TimToady ?eval say join chr(0x2424), 1..100
evalbot_11605 OUTPUT[1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59␤60␤61␤62␤63␤64␤65␤66␤67␤68␤69␤70␤71␤72␤73␤74␤75␤76␤77␤78␤79␤80␤81␤82␤83␤84␤85␤86␤87␤88␤89␤90␤91􏿽xE2􏿽x90
TimToady okay, I was playing with the foo$x example. I suspect say is currently in a different syntactic class in pugs than a normal listop 23:57
23:57 rashakil joined, mauke_ joined
svnbot6 r11606 | salty_horse++ | added space between for() and {}. it was treated as a hash subscript. 23:59
salty-horse yay