Feather users: perlcabal.org/~autrijus/ | pugscode.org/ <Overview Journal Logs> | pugs.kwiki.org
Set by autrijus on 26 May 2005.
jql umm 00:19
Foo.bar() would be a submethod, and Foo::bar() would be a sub. I think. Where's my synopsis? 00:20
jql is smoking something, clearly 00:21
theorbtwo Darren_Duncan: That should be Foo::bar(), not Foo.bar(). 00:35
Darren_Duncan I see ...
theorbtwo &Foo::bar is the &bar in Foo (and the & is optional when calling a sub). 00:36
Foo.bar() means bar, called on Foo.
Darren_Duncan will test now ...
on a separate matter, it seems like .meta and etc aren't implemented, or I'm not calling them right ... 00:37
theorbtwo I think they aren't yet implemented.
autrijus sri_: how exactly do you want me to improve the p5 glue? :) 00:38
right, .meta is not yet there.
Darren_Duncan okay, so I'll need .meta, .isa, and .can plus a can_ok() in Test.pm to get LKT working 00:41
svnbot6 r4133, autrijus++ | * Correct address of p6tu talk as wagner is now kaputt.
r4134, autrijus++ | * First sketch of my HW2005 talk -- due in next week --
r4134, autrijus++ | feel free to hack my broken English. :-)
autrijus whew. finally got at least some words of docs/talks/hw2005.txt written
autrijus has procrastinated this for ~2 months
theorbtwo autrijus, what is your schedule like?
autrijus theorbtwo: next week to Vienna for APW; then YAPC::NA; then back to Taipei 00:42
afterwards in Sep., hopefully haskell workshop, then amsterdam for Euroscon
theorbtwo I've been half-pondering a lot about getting back into the swing of pugs devel... and about making Code objects readable, and possibly even modifiable.
autrijus that would be excellent. 00:43
theorbtwo And am wondering if you can try walking me through some stuff.
I meant schedule for the next few hours, not the next few weeks.
autrijus ah.
I need to catch up $work, but that means 60% of my brain gets to idle 00:44
theorbtwo Nod.
autrijus so you're free to ask questions and I'll answer them, not neccessarily in realtime
but probably with a 5min turnaround at most
is that okay?
theorbtwo Sounds good to me. 00:45
Darren_Duncan So far in testing, I haven't found any combination of Foo::bar() that works ... 00:46
autrijus cool :)
Darren_Duncan by itself or with leading ampersand, it says : No compatible subroutine found: "&t_LKT_Util::message" 00:47
autrijus Darren_Duncan: that is right. let me fix it now
Darren_Duncan with leading '::' it says : pugs: cannot cast from VType (mkType "t_LKT_Util::message") to Pugs.AST.Internals.VCode
autrijus, do you confirm that Foo::bar() is for modules and Foo.bar() is for class methods? 00:48
theorbtwo So how do I make a method on the builtin types? As a prim, or is there a better way? 00:50
autrijus Darren_Duncan: that sounds about right.
Darren_Duncan good
autrijus Darren_Duncan: class methods can also be invoked like Foo.Foo::bar()
or
Foo::bar(Foo)
just like in p5 00:51
theorbtwo: currently there's only Prim to use. you can, however, fully qualify that prim name.
Darren_Duncan sure ... though I never used those syntacies before
autrijus eg. Code::blah
then only &code.blah will invoke it
not @array.blah
theorbtwo Shall I make a new Prims/Code.hs?
autrijus sure, why not. 00:52
Darren_Duncan any particular goal for when 6.2.6 is going out? 00:53
theorbtwo Is there a purticular set of emacs settings published somewhere for how pugsly haskell code should look? 00:54
Darren_Duncan fyi, I noticed that my intended use of the '//' operator in Locale-KeyedText now compiles, where it didn't the other week, so that's good 00:56
autrijus Darren_Duncan: next 24 hours 00:57
Darren_Duncan pretty quick then
autrijus ok, I think "is export" and qualified subroutines and other lovely things are implemented
now let's see if it actually works... 00:58
hm. it may or may not. I'll commit and you'll test. ok? :)
theorbtwo: uh, no, but I used to use 00:59
# c-indentation-style: bsd
# c-basic-offset: 4
# indent-tabs-mode: nil
theorbtwo Are the cases of the op1 supposed to be in any purticular order? 01:00
autrijus theorbtwo: no.
theorbtwo: that is a big case-of statement.
Darren_Duncan question: can I assume that perl 6 rules will never function except when Parrot is used with Pugs?
autrijus Darren_Duncan: r4135 -- please test and let me know whether/if it is broken
Darren_Duncan: yes, that is a good assumption.
Darren_Duncan right then 01:01
autrijus "never" is a bit strong though.
it is conceivable that japhy will produce something that is independent of parrot.
so you can use it with perl5 embedding -- and port it to p6
so it can be used stand-alone
but for now (and near future), we need parrot for rules
theorbtwo crosses his fingers after implementing his first method and typing make. 01:02
Darren_Duncan given the simplicity of my module, a good half of the test suite just checks that it dis-allows bad input, and many of those use regexps, meaning that my module's test suite will never fully pass except when compiled with Parrot
autrijus notes that "make ghci" and ":r" makes a faster turnaround
Darren_Duncan: you can use rx:P5//
svnbot6 r4135, autrijus++ | * At Darren's request, implemented qualified subroutine names;
r4135, autrijus++ | as a result, `is export` must be used to expose a subroutine
r4135, autrijus++ | outside its module.
autrijus as many people now do
which is always available
if you want, you can add the equivalent p6rules as comments
Darren_Duncan and rx:P5 does not require Perl 5 right?
autrijus nope. we embed pcre
Darren_Duncan will do
autrijus you++ 01:03
theorbtwo (Also, p5 regexes are somewhat nicer when you are matching fairly simple things, I think.)
Darren_Duncan thats my standard practice ... if a workaround exists, I use that and place what I really wanted to do in comments
autrijus please do test that Foo::bar works
yup. I found it to be very helpful
Darren_Duncan commencing svn up now
theorbtwo yawns.
It compiles so much slower when I actually expect it to do something different... 01:04
Darren_Duncan commencing 'make'
autrijus theorbtwo: ghci and :r, really :) 01:05
<- can't use "make" for real development
sometimes "make unoptimised"
theorbtwo I keep having to delete things when I make ghci, which is ofputting. 01:06
Darren_Duncan how does Pugs runtime speed compare between the two
theorbtwo Looks like that's been fixed, though.
Darren_Duncan I never did the unoptimized before now, though I also didn't hack the core and didn't recompile much anyway
autrijus Darren_Duncan: if you are not hacking AST or Parser, and those two have beeing compiled with "make" before, then "make unoptimised" will produce quite fast code 01:07
in any case though, unless you're running the entire test suite, "make unoptimised" will save time.
Darren_Duncan anyway, its 'Compiling Pugs.Parser' 01:08
now on Eval
done make 01:09
autrijus cool.
Darren_Duncan unless I skipped a vital step, its now worse than before 01:11
*** No compatible subroutine found: "&import"
at t/lkt_10_msgprops.t line 1, column 1
checking ... 01:12
autrijus Darren_Duncan: ahh. fixing 01:14
Darren_Duncan gotcha
and I'll do unoptimized next time
just to clarify, I never use 'is export' etc in my own modules 01:15
autrijus 'kay. 01:16
unbroken. 01:17
r4136
svnbot6 r4136, autrijus++ | * unbreak `import`. Darren++ 01:23
theorbtwo God I hate my ISP sometimes. 01:29
Darren_Duncan will svn up now 01:40
now make un 01:41
theorbtwo Hmmpf, I've got a type error that I can't figure how to resolve. 01:51
code <- fromVal codeval 01:52
Ambiguous type variable `n' in the constraints:
`CodeClass n' arising from use of `code_assoc' at src/Pugs/Prim/Code.hs:13:20-29
`Value n' arising from use of `fromVal' at src/Pugs/Prim/Code.hs:12:12-18
Probable fix: add a type signature that fixes these type variable(s)
kelan no evalbot? 01:53
theorbtwo ?eval +pi
Guess not.
Darren_Duncan what a trade off ... testing my code was slow before, and its even slower now 01:54
autrijus maybe I should launch evalbot from feather
Darren_Duncan in any event, the added problem is gone
autrijus theorbtwo: do that
code <- formVal codeval :: Eval VCode
Darren_Duncan and Foo::bar() seems to work now
but have to leave comp for a bit, will confirm later
autrijus Darren_Duncan: thanks!
theorbtwo autrijus: Thanks. 01:58
autrijus np :)
meppl gute nacht
autrijus 'nite meppl
meppl ;) 01:59
theorbtwo Hm, I want \\n Str pre Code::assoc safe (Code:)\, right? 02:01
I'm getting "no compatable subroutine found" on say &say.assoc
autrijus theorbtwo: hm. but if you mark it as simply "assoc" does it work? 02:04
hm. that "is export" change seemed to break Set.pm 02:07
needs to investigate a bit
theorbtwo That works, autrijus. 02:10
svnbot6 r4137, autrijus++ | * report the erorr stack trace in the correct order.
theorbtwo However, that way assoc("foo!") gives a cannot cast error. 02:11
autrijus sure. 02:12
check in the Code::assoc part doso I can fix?
theorbtwo autrijus: Any way to tell openfoundry to mail me bug reports in english? 02:15
autrijus theorbtwo: in your user preference set it to English. but that may not be there yet -- I'll look into it
are there people submitting bug reports using openfoundry? 02:16
svnbot6 r4138, theorbtwo++ | say &say.assoc
autrijus (the "test" thing was a mistake by me. sorry)
theorbtwo Oh, no problem.
02:23 joepurl_ is now known as joepurl
mugwump hi there everyone! What's on the plate for this week's release? 02:24
theorbtwo Hi, mugwump!
02:57 < autrijus> Darren_Duncan: next 24 hours 02:25
Grr.
Sorry.
mugwump Hmm, wonder if there's a log anywhere..
what day/timezone was that from, theorbtwo ? 02:26
theorbtwo CEST -- that was an hour and a half ago. 02:27
mugwump finds xrl.us/f9h9
theorbtwo pugscode.org, click on logs.
(Amongst other logs.)
autrijus hey mugwump. I broke Set.pm by introducing qualified names and `is export`
will investigate in a bit
mugwump coos and looks 02:32
autrijus ahh. 02:35
method infix:<-> (Set $one, Set $two) returns Set {
this is borken
mugwump should be multi?
autrijus either multisub or s/,/:/ 02:36
mugwump right
autrijus as it stands it means something that is invoked by Set and takes another 2 Sets
mugwump yet somehow indicated by a binary infix op
autrijus strange no?
mugwump set - (set, set) ? :)
Darren_Duncan I'm back ... was at dinner 02:38
theorbtwo autrijus: Figure out what was wrong with my prim? 02:39
autrijus theorbtwo: checking 02:45
svnbot6 r4139, autrijus++ | * .keys and .values for uninitialised scalars should be ().
r4140, autrijus++ | * err, juxtaposed commit log. _this_ change was the .keys/.values
r4140, autrijus++ | fix -- last change was temporarily disabling infix:<-> in Set.pm
r4140, autrijus++ | during the investigation, and fixing the overloading from method
r4140, autrijus++ | into multi subs.
Darren_Duncan it seems a lot of my .meta use can be replaced with .ref, which I think works (and is more like the perl 5 version), so that much closer to working 02:49
autrijus nice 02:52
theorbtwo: I see. 02:53
&say is a Sub
but ::Sub metaobject did not register that it has superclass of Code.
so saying Code::assoc will break.
Darren_Duncan or actually, plain .isa() rather than .meta.isa() is functional, so used that instead
autrijus the proper fix here is to instantiate all the default classes with metaobjects.
theorbtwo Hm? But &say ~~ Code gives 1.
autrijus .does() too
theorbtwo: because isa check is different from metaobject walking
isa check just uses the clsTree 02:54
but metaobject looks at the actualy runtime thing
Darren_Duncan I just want to know if a given object is part of a certain class, either built-in or my own
autrijus Darren_Duncan: right... .does() is probably what you want
Darren_Duncan s/part/a member/
theorbtwo Darren_Duncan: You probably want .does. 02:55
Darren_Duncan how is .does() different from .isa() for what I want?
theorbtwo Does asks if it is compatable with foo; isa asks if it is implemented in terms of foo.
autrijus theorbtwo: I don't have time to implement the proper fix myself right now -- it will be making a set of VObject as part of initSym based on the init tree
mugwump what is this "is" business, anyway? :)
autrijus theorbtwo: for now for you to test, say Sub::assoc instead and see if works.
double thanks if you can write a test for this :)
I need to run to pay my income tax... 02:56
Darren_Duncan so does() takes a class name as its argument?
autrijus bbiab.
Darren_Duncan: yeah
Darren_Duncan: or role name.
&
theorbtwo Woo, sounds like tons of fun, autrijus.
Darren_Duncan separate question ... what can I use in place of Perl 5's can()
as in, does it declare this sub or method?
autrijus Darren_Duncan: .can() of course. it's unimplemented. :)
Darren_Duncan right, so no change there
will try .does() meanwhile ... 02:57
autrijus nod. the current sub lookup in Eval wants to be refactored there.
jql hard to implement because of multimethods?
autrijus really &
Darren_Duncan question: is does() working right now in plain Pugs, or does it require the metamodel module? 03:00
wait ...
theorbtwo Darren_Duncan: There is no metamodel module, just docs for it, I think. 03:01
Darren_Duncan pardon me, I was previously just searching in /ext for uses and found none, but now I found some in t/, so I see its in use 03:02
theorbtwo yawns. 03:03
Goodnight, all.
putter good night. 03:04
this can't be intended behavior... can it? 03:05
pugs> sub f() { my $h; $h<a>=1; $h<b>=2; $h}
undef
pugs> ref(f())
::Hash
pugs> [ f(), 'foo']
({ref:<Hash>}, 'foo')
pugs> [ f() ]
({ref:<Pair>}, {ref:<Pair>})
pugs> []
()
mugwump pugs> f 03:06
({ref:<Pair>}, {ref:<Pair>})
?
sub g() { my %h; %h<a>=1; %h<b>=2; %h} 03:07
({ref:<Pair>}, {ref:<Pair>})
that I didn't expect
sub g() { my %h; say "Hello!"; %h<a>=1; %h<b>=2; %h}
::Hash 03:08
jql interesting
mugwump o_Ć³
putter ;)
mugwump heh, ok try this 03:09
start pugs
ref(undef) ~ ", yar?" 03:10
sub f() { my $h; $h<a>=1; $h<b>=2; $h}
jql umm
mugwump so, sub f() { } does not change the 'return' value of the current point in code 03:11
pugs is continuing to display the old result, because the result as would be returned by the end-of-block from the current block is still the same
jql also, I'm surprised a named sub decl doesn't have a Code return-value 03:12
my &foo := sub bar () {...}
mugwump but it's compile time.. 03:13
whereas the other one is run-time
jql s/:=/::=/ would work, then? :) 03:14
since it would return a Code at compile-time, I presume foolishly
jql presumes many things foolishly
mugwump afaik $foo ::= is like making $foo an alias for the thing you bind it to at that point below 03:15
so perhaps, yes 03:22
jql well, it's probably last week's javascripting which makes me think sub foo() {...} would be the same as my &foo ::= sub () {...} 03:23
mugwump Yeah, Javascript's neat like that isn't it? Supports a surprising number of dynamic features 03:24
jql I've been consistently impressed not only with its fun capabilities, but the decent likelyhood that whatever I think should work actually does
nicely DWIMmy 03:25
mugwump well, let me assure you the novelty wears off once you try to run stuff in IE
jql well, having closures leak memory is very familiar to me
jql points at Perl5
mugwump hmm 03:26
jql IE ain't so bad. I like raping my own system with javascript
don't like other people doing it, though
I played with Javascript on my active desktop 03:27
I turned that shit off
alert() on mousemove on your desktop is scary
mugwump pugs> my $bar = "Hmm"
'Hmm'
pugs> $bar = "baz";
'Hmm'
dropping the semicolon makes it work 03:28
jql that's it
pugs> my $bar = "hmm";
({ref:<Pair>}, {ref:<Pair>})
jql chuckles
it's the evil semicolon implying a void statement 03:29
pugs needs to display the return-value of the last non-empty statement 03:30
putter sigh. ive been doing a p6 rules on pcre bootstrap. tried to be paranoid and use a very concervative subset of p6 to avoid problems. (bootstraps being inherently confusing by themselves;) it soooo hasnt turned out that way... :-( 03:36
mugwump you're writing a perl6 rules engine? 03:37
putter ah well. sleep. 'night folks.
oh, yes. well, sort of...
mugwump well, may your dreams be full of inspirations to help you on that and other goals 03:38
egads! ghc has its own GNU ld incompatible ELF loader?! 03:39
putter fake p6 rules parsetree -> backend using pcre rx plus capture repacker -> run on p6 rules description of p6 rules -> real parsetree. 03:40
last version actually worked. but I thought half an hour was a bit too slow. ;)
Khisanth mugwump: hey! I guess that might explain the problem I was having :) 03:41
putter the only thing compatible with gnu's ld is gnu's ld... it's embedded (read hairly entangled) w libc. not a pretty picture. my fuzzy impression is they are _finally_, after lo these many years, thinking of extracting it. sigh. 03:43
'night. 03:44
mugwump pasteling? 03:46
Khisanth sial.org/pbot
mugwump :) 03:47
Khisanth did perlbot get itself k-lined again?
jabbot: seen perlbot
jabbot Khisanth: perlbot was seen 2 days 3 hours 20 minutes 19 seconds ago
Khisanth bah!
autrijus rehi! 03:57
mugwump hi autrijus ... I'm having problems getting a perl5/perl6/parrot chimaera going :)
s/perl6/pugs/ of course 03:58
when I go `make unoptimized', I get nopaste.snit.ch:8002/2753 03:59
autrijus mugwump: try "make clean" first. 04:06
currently toggling between p5embed will not cause the relevant .o files to rebuild
so you end up with missing symbols.
not sure how to fix that 04:07
at least rm src/Pugs/*/Perl5*o
and src/*/*/*stub*
and maybe src/perl5/*o
mugwump ah, that looks better. I was in the process of being highly impressed that Haskell just needed to relink for that 04:08
autrijus sometimes the impossible really is impossible :)
mugwump such as interpreting GNU ld scripts without being GNU ld 04:09
(ie, non-ELF entities such as libpthread.so that actually contain plain text loader directives) 04:10
autrijus shrugs... never really used GNU ld
mugwump :P
Darren_Duncan question, inside my own new() method, is this the right way to do things ? ... 04:13
svnbot6 r4141, chromatic++ | Don't add skip to TODO test status report.
r4141, chromatic++ | UnTODO some passing tests.
Darren_Duncan method new( $class: Str $msg_key, Str ?%msg_vars ) returns Locale::KeyedText::Message {
my $message = $class.SUPER::new( { msg_key => $msg_key, msg_vars => {%msg_vars} } );
return $message; 04:14
the second line doesn't seem to be returning what I expect
also, if I say() $class, I get <obj:Class>
if I say() $message, I get nothing
sri_ thats not good? "pugs: cannot cast from VRule (MkRulePCRE {rxRegex = Regex 0x01505c20, rxGlobal = False, rxStringify = False}) to [Char]" 04:17
mugwump can't print a rule...
sri_ guess it's related to my P5 regexes 04:19
svnbot6 r4142, chromatic++ | Test that SUPER doesn't call the same method again. (Currently failing)
Darren_Duncan ah, that should fix it
I just determined that an infinite recursion was happening
the null $message was due to the method explicitly failing from bad input 04:20
my new
afaik, the built-in new() takes the hash ref that I mentioned
will sevenup and try again 04:21
that didn't fix it 04:23
still infinite recursion by SUPER
seen chromatic 04:24
jabbot Darren_Duncan: chromatic was seen 2 days 2 hours 47 minutes 44 seconds ago
Darren_Duncan another bug I noticed 04:25
it seems that a hash argument passed an undefined value will spit out > 0 values when .keys() is called on it 04:26
sri_ yay, got HTTP::Server::Simple ported =)
Darren_Duncan whereas, an empty/undef hash should always have zero keys
mugwump sri++! 04:27
Darren_Duncan eg, this will loop at least once: for %msg_vars.keys -> $var_name {
... when %msg_vars is undefined
obra sri++
Now I don't have to
sri_ you can still clean it up ;) 04:28
obra nods
sri_ next on the list is File::Find *shudder*
obra Working on Cat6?
sri_ need that for Module::Pluggable
mhm 04:29
opendir/readdir is not yet implemented? 04:39
hmm...same for glob 04:42
i'll add a todo 04:47
mugwump a :todo<feature> test? :) 04:48
sri_ mhm
autrijus theorbtwo: fixed the initialise bug.
all builtin types now have their corresponded metaobjects.
corresponding, even.
Darren_Duncan I have checked in the LKT work I did today so everyone can be up to date with it 04:49
autrijus Darren_Duncan: &new gets named args
Darren_Duncan still several issues remaining
autrijus not a hashref
i.e. a hash, not a hashref
Darren_Duncan is that what caused the infinite recursion?
autrijus hadn't checked yet
Darren_Duncan my code was acting like "SUPER::new()" did the same thing as "new()" -- the inf recursion 04:50
that SUPER thing is the biggest thing blocking me at the moment 04:51
svnbot6 r4143, Darren_Duncan++ | updated ext/Locale-KeyedText files towards full executability (not there yet); using p5 regexes instead of p6 ones so Parrot not required; replaced use of as() since not implemented; replaced class.bless() with class.SUPER::new(); invoke all module subs using Mod::sub() rather than Mod.sub(); a few other misc fixes; replaced commented-out can_ok() with executing skip()
r4144, autrijus++ | * initialise metaobjects for the default class tree; this makes
r4144, autrijus++ | `&say.assoc` correctly dispatch to `Code::assoc` through its
r4144, autrijus++ | type `Sub`, a subtype of `Code`.
autrijus hm. I fixed SUPER for objects
but it's possible that class methods hadn't got fixed. I'll check now
IshaCocoa HI. Once GHC 6.4 finishes downloading and is installed, and I've pulled the latest pugs with svn, do I need anythiing else before building using VC/nmake?
autrijus IshaCocoa: you need Perl. 04:52
Darren_Duncan I commented out the line in my LKT so someone running the tests will get an ordinary failure rather than inf recursion
IshaCocoa Got 5.6.4 ok?
autrijus possible.
I think most developers are using 5.8.1+
IshaCocoa S/6/8/ :)
Darren_Duncan didn't know there was a 5.6.4
autrijus heh.
sure then
if you plan to play with p6rules, also download www.jwcs.net/~jonathan/perl6/parrot-win32.zip and put the path to parrot.exe somewhere in your $ENV{'PATH'} 04:53
otherwise don't worry.
IshaCocoa Later. I'll get through to the pugs> prompt first.
autrijus does Win32 have glob(3)?
Darren_Duncan I'm using 5.8.1+, and my newer modules refuse to run with less too 04:54
IshaCocoa Not native without mingw or cigwin--a native equvalent of course
autrijus oh well. 04:55
no easy glob("") support then, sri_
sri_ :(
autrijus unless you can settle it working for POSIX first
and Corion et all can add win32 later
s/settle/settle for/
sri_ opendir/readdir is enough for now
s/is/would be/ 04:56
IshaCocoa There are various flavours of glob support by perl5. Any way to use those?
autrijus IshaCocoa: sure. needs time :) 04:57
Darren_Duncan: confirmed. fixing 04:58
Darren_Duncan thanx
IshaCocoa Understood. I just saw you had link P5 module support in and there are FIle::GLob and File::DosGLob modules... 04:59
Khisanth glob uses File::Glob anyway :)
IshaCocoa Egads 42 MB takes a long time at 4.1 k/s :( 05:01
autrijus Darren_Duncan: fixed. 05:13
svnbot6 r4145, sri++ | Added test for opendir/readdir
r4146, autrijus++ | * ensure that ./SUPER::method never gets circular; Reported by Darren.
autrijus IshaCocoa: right. but depending on p5 for globbing sounds... weird 05:16
it is certainly one of the ways though.
autrijus still remembers DosGlob.exe
mugwump finally places an order for TaPL 05:17
autrijus mugwump++
mugwump I want to work through the examples in Perl 6 and put them in examples/ :)
Darren_Duncan now sevenupping to check fix 05:19
autrijus a lofty goal, mugwump
sri_: you're on *nix right?
sri_ osx 05:20
Darren_Duncan btw, did you see my other comment about an undefined hash returning an item from keys() ... should return nothing
mugwump well, I'll give it a crack, anyway. Or maybe _some_ crack.
sri_ so it's arguable ;)
Darren_Duncan that is "for %foo.keys -> $bar" should never execute if the hash is empty, but the loop does at least once 05:21
autrijus yay!
op2 "split" = op2Split
op2 "Scalar::split" = flip op2Split
Darren_Duncan++ # prompting a good fix 05:22
pugs> 1.split(4)
('1')
pugs> split(1,4)
('4')
all our invocant-based flippable subroutines should be rewritten this way
including join, etc
Darren_Duncan now on 'make' 05:24
back shortly
svnbot6 r4147, autrijus++ | * &name and &arity are now `Code::` specific.
r4147, autrijus++ | * `$scalar.split($str)` is now treated correctly as
r4147, autrijus++ | `split($str, $scalar)` by putting &Scalar::split as a
r4147, autrijus++ | different OP as &split.
autrijus Darren_Duncan: 05:25
my %x; for %x.keys -> { die }
this doesn't die for me
Darren_Duncan my problem may be outdated ... will test again
I can still recreate it, but I'm about 4-5 commits out of date, will try again once your new commits have finished compiling 05:29
okay, there is a problem, but its different than what I said 05:39
svnbot6 r4148, SamB++ | Some changes in Pugs.Compile.Pugs, which I'm about ready to give up on
r4148, SamB++ | for being such a mess. dons++ in #haskell tells me that it is best to
r4148, SamB++ | use two steps for that kind of thing.
r4149, SamB++ | Yet another attempt at a Perl->Haskell compiler. Based on talking with
r4149, SamB++ | dons++ in #haskell about pretty printing.
Darren_Duncan basically, a method's hash optional argument is somehow defaulting to containing one key when the method is invoked without passing anything to that argument 05:40
or rather, this is happening ...
autrijus give me a oneliner that exhibits the bug?
Darren_Duncan newest Pugs has same behaviour ... attempting to simplify proble 05:41
autrijus cool. thx 05:43
IshaCocoa autrijus: I was thinking only of a stopgap measure until a native version can be written/derived. 05:45
autrijus: (Re: glob/). 05:46
Darren_Duncan about to pastebot 05:47
pasteling "Darren_Duncan" at 24.108.164.7 pasted "run this self-contained code thru pugs ... it prints 'two' but shouldn't" (26 lines, 737B) at sial.org/pbot/10576 05:48
Darren_Duncan autrijus, that small sample exhibits the problem 05:49
IshaCocoa Argh! 46.1 MB download of ghc 6.4.bld2 msi (5+ hrs) and "This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installler package." -- Anyone else got bld2 successfully? 05:50
Darren_Duncan simpler example coming ... 05:51
autrijus bld2?
hrmph. 05:52
IshaCocoa: it claims that it's 47mb
pasteling "Darren_Duncan" at 24.108.164.7 pasted "much simpler code with same problem" (17 lines, 357B) at sial.org/pbot/10577
Darren_Duncan this new version has one class and one method 05:53
wasn't sure if indirect call caused problem, but problem persists with direct call, illustrated in second sample
be back shortly
autrijus how do I invoke new?
just .new() ?
Darren_Duncan the pasted sample includes the invocation 05:54
the last line, saying my $msg1 = ...
is the invoker
paste all text in one file and run it
autrijus k. 05:55
I see "two"
Darren_Duncan but logically you shouldn't, should you?
autrijus sure. there's no logic
fixing
Darren_Duncan back shortly
autrijus ->?%x{say %x.perl}.() 05:57
is the minimal borking case
paramDefault is the culprit. 05:59
IshaCocoa According to wget:Length: 48,247,296 [application/x-msi] which translates to 46.0122 MB which I suppose is close to "~47 MB"...but it is a download error. My file is a few K short of the proper size. Hopefully wget -c will finish it properly 06:00
autrijus paramDefault was at Undef 06:01
it should clearly be Noop.
thanks, fixed as r4150 06:03
svnbot6 r4150, autrijus++ | * Optional array and hash arguments were defaulting the a single-element
r4150, autrijus++ | "undef" instead of the empty "Noop". A minimal regression test:
r4150, autrijus++ | ->?%x{say %x.perl}.() # should be "{}"
r4150, autrijus++ | Reported by Darren.
Darren_Duncan I was going to say that this problem could be indicitive of something larger, and all sub-type things should be tested, subs, methods, class methods, plus arrays and hashes ... but it looks like you already thought of it 06:07
autrijus :) 06:08
anyway it should be fixed now.
now trying to get opendir() written for sri_ 06:09
Darren_Duncan now making new version
autrijus I get to play with the opaque object type. fun
Darren_Duncan I actually still have to test that SUPER was fixed ... will do shortly
nothingmuch_ morning 06:19
Darren_Duncan make complete ... now testing again
oh, and morning to you, 11:19pm to me
yep, SUPER doesn't recurse anymore 06:27
svnbot6 r4151, autrijus++ | * Code::* moved to Prim/Code.hs.
r4151, autrijus++ | * "say" and "print" gets invocantised with IO::* forms.
Darren_Duncan however, it also made me realize that SUPER::new isn't actually what I need 06:28
what I wanted to do is invoke the default constructor for my class, which I overrode with my own 'method new' declaration
autrijus oh. 06:29
then you want submethod BUILD.
grep ext/ for samples
Darren_Duncan okay
part of what threw me off was the Test::Builder module 06:33
the Test::Builder class does not declare that it inherits from any class 06:34
yet its new() method invokes Class.SUPER::new()
... with its own arguments
anyway ... 06:35
autrijus $class.SUPER::new 06:37
you mean
Darren_Duncan yes
autrijus it's a variable
Darren_Duncan when I did that, it didn't work
autrijus hrm. 06:38
Darren_Duncan mind you, I said : method new( $class: ...
while the other module specified a class name to the left of $class ...
I say return $class.SUPER::new( msg_key => $msg_key, msg_vars => %msg_vars ); 06:39
will try something ... colons in front of key names
I get this as output either way: *** No compatible subroutine found: "&SUPER::new" 06:40
autrijus nod. maybe it's broken for T::B as well :-/ 06:41
sorry, I'm still in opendir
Darren_Duncan I thought the default constructor expected its args in named format, with the keys matching the property names
autrijus that is true
Darren_Duncan no prob, finish what you started
meanwhile, I will try using the default constructor for now, to get around this issue and see if anything else needs fixing in the module 06:43
autrijus k. 06:46
thanks for bearing with this infant puppy :) 06:47
luqui hello
autrijus hey luqui.
we've just been OOizing all our Prims
luqui what's new in the pugs world
yum
autrijus Code::arity, IO::Dir::readdir, IO::say, etc.
now that the default metaobjects and finalisers are in place
luqui has to look at that 06:48
but first
luqui has to install svk
autrijus :D
luqui do I have to copy over the whole repository when I svkize? 06:49
4000 revisions is pretty hefty
autrijus luqui: you can tell it to just sync the head.
but then you lose all history
so, depending on how fast your bandwidth 06:50
SamB: hey, can you cleanup Pugs2 with the proper #ifdef over the next 24 hours or so?
oh nvm you're not using TH. 06:51
but still lots of warnings
chromatic I'm mistrusting subName sub == qualified for some reason.
autrijus chromatic: it is a good reason. it doesn't catch indirect circularity.
but then, indirect circularity should be caught in another level.
i.e. at inheritance level
chromatic Ah, so it's good that I don't know where or how to fix it.
autrijus that check is merely to prevent findSub' from finding the package-level scopes.
i.e. 06:52
if you're in package Foo
resolving &foo will still yield Foo::foo
Darren_Duncan some progress here ...
autrijus so we explicitly forbid that.
Darren_Duncan when I comment out my custom new() and replace invocations with calls to the built-in, the tests suddenly get a lot further along
autrijus (we fallback to normal MMD &foo if a method can't be found in class hierarchy)
(as specced in S12) 06:53
Darren_Duncan: cool
luqui what do we lose by making SMD and MMD run in the same engine
Darren_Duncan the trade-off is that a lot of tests fail where undef is expected rather than an object
but those don' t kill the script at least
luqui or by checking those variants with fewer invocants first (maybe not a good idea) 06:54
Aankhen`` Our sanity? 06:55
(and that's dispensable anyway ;-) 06:56
Er, sorry, I just realised I hadn't scrolled all the way down after all. 06:57
autrijus "you have nothing to lose except your sanity"
Aankhen`` Whoops... I think I left marks of debugging in ext/libwww-perl/t/base/headers-util.t 06:58
Darren_Duncan found another bug 06:59
try running this: my %foo = ('a'=>'b'); say %foo.pairs.sort.map:{ .key~'='~.value }.join( ', ' );
it says : cannot cast from VStr "a" to (Pugs.AST.Internals.Val,Pugs.AST.Internals.Val) 07:00
Aankhen`` Does @*INC only need to contain "ext/name-of-module/lib" for the tests to work under `make smoke`?
chromatic Does it also need the path to Test.pm? 07:01
Aankhen`` Darren_Duncan >> Pairs don't seem to be supporting .key and .value properly. 07:02
pugs> ("a" => "b", "foo" => "bar").pairs.sort.map:{ .key ~ " = " ~ .value }
('0 = a b', '1 = foo bar')
Darren_Duncan this also fails: my %foo = ('a'=>'b'); say %foo.pairs.map:{ .key~'='~.value }; 07:03
a shorter sample
luqui How about: $a = ('a' => 'b'); say $a.key; 07:04
Darren_Duncan this does produce output : my %foo = ('a'=>'b'); say %foo.join();
but it isn't formatted
curiously, the Pugs command line always prints out the string 'undef' on a separate line following the normal input, no matter what I ask it to do 07:05
Aankhen`` luqui >> Actually, that works.
luqui it looks like it's map that is broken
Aankhen`` Darren_Duncan >> Same here. :-)
luqui wrt pairs
Aankhen`` Yeh.
Hrm...
luqui yeah, it's just getting a list 07:06
%foo.pairs.map:{say}
rather, say $_
Aankhen`` Er... how do you give a pointy block to map?
luqui map -> { } %foo.pairs ? 07:07
jql foo.map(->{})
Aankhen`` OK.
luqui oh yeah, that works too
jql timtowdi
s/di/tdi/
luqui map seems to be flattening the pairs
you can do your thing this way: 07:08
Darren_Duncan whooo ... midnight here now
luqui map -> $a, $b { say "$a => $b" } %foo.pairs
jql midnight here too. go figure
jql pokes the clock
you want %foo.kv, right?
Darren_Duncan yes
luqui yeah, but unfortunately, .pairs works too
Darren_Duncan I'm serializing a hash for easy examination
luqui it just shouldn't
jql pairs shouldn't really work.
Darren_Duncan here's the full line in my code, fyi 07:09
Aankhen`` Anyone here who understands what `make smoke` is and whether anything special needs to be done for it?
Darren_Duncan return $message.:msg_key~': '~$message.:msg_vars.pairs.sort.map:{ .key~'='~(.value // '') }.join( ', ' );
jql holy hell 07:10
Darren_Duncan that's what I'm actually printing out
a scalar followed by key=value pairs, with the value set to '' if undef (avoids warnings), sorted to give consistent string on all platforms
jql p6 gives new depth to the one-liner 07:11
Aankhen`` Darren_Duncan >> What are you working on?
Darren_Duncan result is used in my test suite
this is from Locale::KeyedText
Aankhen`` Ah.
Darren_Duncan here is the perl 5 version, fyi ...
return $msg_key.': '.join( ', ', map { $_.'='.(defined($msg_vars->{$_}) ? $msg_vars->{$_} : '') } sort keys %{$msg_vars} ); 07:12
svnbot6 r4152, Aankhen++ | * replaced ugly BEGIN { ... } block with pretty `use lib <...>` in ext/libwww-perl/t/base/headers-util.t
luqui hmm, the p6 one-liner might end up being clearer using some pipes
Darren_Duncan I think the perl 6 version is much prettier ... I love that Pairs object
luqui and maybe separating out your prefix from your pipeline 07:13
jql I wish postfic-statement given worked
that'd be sick
and obfuscated beyond reason 07:14
but still sick
Darren_Duncan I don't consider my code obfuscated
I try to make it readable on purpose 07:15
jql puts 'say given 1' on his Acme::Given module wishlist
luqui because say 1 isn't good enough
autrijus sri_: *dir landed.
jql well, it's meant for say .foo ~ .bar ~ .baz given $foo
autrijus Win32 people, please confirm that r4153 still builds.
sri_ yay! :)
jql of course, it's deeply evil to do that
luqui yeah. that's not so far-fetched. 07:16
Aankhen`` Dang.
sri_ autrijus++
autrijus sri++
Aankhen`` I'm building... r4151.
autrijus Aankhen``: maybe break it :)
Aankhen`` cancels and restarts.
Yea.
autrijus (also "make unoptimised" is your friend)
sri_ wait, now i have to touch File::Find :/
Aankhen`` I build once a day, so I just let it build the optimised version.
autrijus sri_: port F::F!
or F::F::Rules 07:17
a File::Find based on coroutines will be...
svnbot6 r4153, autrijus++ | * opendir/readdir/rewinddir/closedir on *nix.
autrijus ...not neccessarily a good idea. never mind
now fixing pairs
chromatic Pairs or SUPER?
Aankhen`` can't wait for his P4 630 and 1 GB of dual channel DDR 400 RAM.
autrijus what's wrong with SUPER?
chromatic t/oo/super.t 07:18
Aankhen`` That ought to speed up the build process some. :-D
autrijus $class.SUPER::new is borken again?
chromatic Yep, can't find &SUPER::new.
autrijus k.
Aankhen`` Are you going to ask me to build r4154 now?
Darren_Duncan autrijus fixed something with SUPER after you filed that test, but it was for infinite recursion
Aankhen`` Guess not. :-D
autrijus nope :)
eval "{1 => 2}.pairs.map:{say 3}" 07:19
this only say "3" once
I think it's correct, no?
chromatic Well it did fix the infinite recursion, but it fixed it by never calling it. :)
autrijus yeah. not neccessarily the best fix :)
jql correct to me
chromatic It makes one test fail a lot more quickly though, which is nice to diagnose.
jql IANA@L
Aankhen`` autrijus >> Win32: 07:20
Compiling Pugs.Compat ( src/Pugs/Compat.hs, src/Pugs/Compat.o )
src/Pugs/Compat.hs:151:25: Not in scope: type constructor or class `Typeable'
Darren_Duncan map should run once per pair, so one total is correct here
autrijus Aankhen``: uh oh
Aankhen`` :-(
luqui hmm... method foo ($.bar) { } is unsupported
autrijus Aankhen``: attempted a fix
Aankhen`` Committed?
autrijus r4154 07:21
yeah
Aankhen`` OK, Pugs.Compat seems to have compiled alright.
Darren_Duncan autrijus, the problem was a thrown exception about type coersion, trying to use .value in a string context
autrijus oh. ok 07:22
svnbot6 r4154, autrijus++ | * unbreak win32
autrijus minimal test case again?
Darren_Duncan look up the log, but will post again
try this: my %foo = ('a'=>'b'); say %foo.pairs.map:{ .key~'='~.value }; 07:23
says cannot cast from VStr "a" to (Pugs.AST.Internals.Val,Pugs.AST.Internals.Val)
luqui with the same %foo, just do %foo.pairs.map:{say "hi"}
chromatic Bad implicit topic? 07:24
Darren_Duncan no error with your example
but I think the problem is with the .key/.value not coercing to a string for the stitching properly
luqui chromatic, no, it's flattening the pairs
the map will be called twice, once with "a", another time with "b" 07:25
chromatic Into tuples?
luqui it's like .pairs is acting just like .kv in this context
Darren_Duncan oh right, its doing that too
luqui that's the source of your problem
Darren_Duncan each $_ in the map block should be a Pair object 07:26
I'm going to bed soon ... will test any fixes tomorrow unless available soon 07:28
12:30 here 07:29
autrijus chromatic: so it turns out to be simple
chromatic: user-defined classes was not inheriting anything.
so SUPER:: tree is empty 07:30
;)
fixed r4155
(adding a mandatory "Object" inheritance)
chromatic Ah, excellent.
That should fix all but two outstanding bugs and unimplemented features in T::B.
autrijus roles and ?
07:30 castaway_ is now known as castaway
scook0 what function do you use to write an eval test that should fail? 07:31
chromatic Optional named non-attribute variables in method signatures.
autrijus method foo (+$blah) {}
like that?
Aankhen`` scook0 >> fails_ok { eval(...); } perhaps?
Or maybe that was `dies_ok`.
Yeah, I think that's the one.
scook0 Aankhen``: I shall try both, thanks 07:32
chromatic Yeah, there's a test for that too.
Aankhen`` NP, hope it works. :-)
autrijus chromatic: cool. but can't you make it optional positional as well?
(not saying that's the correct design)
chromatic It's the only argument to the method.
autrijus method foo (?$blah)
Aankhen`` Then shouldn't it be optional positional, chromatic? 07:33
chromatic Let me find the test and you can see what I mean.
t/oo/submethods.t 07:34
svnbot6 r4155, autrijus++ | * all user-defined classes now inherit from "Object".
r4155, autrijus++ | * hence, fixed the problem of cannot find ./SUPER::new.
chromatic The two tests at the end.
castaway wonders why "Object" and not "Class" 07:35
autrijus castaway: class Foo is Object {}
lightstep they are a Class, but their superclass is Object, since their instances are Objects, not Classes
jql ugh 07:36
autrijus class Foo is Class {}
castaway sounds illogical somehow
jql ugh x2
lightstep autrijus, why would you want that?
autrijus chromatic: I see what you mean.
jql neither of those is what I'd want to see
castaway SUPER::new is calling the new from the inherited class, not an inherited object, no?
autrijus lightstep: class Foo { method new { ./SUPER::new() } }
that needs to work.
so there must be a SUPER somewhere. 07:37
that SUPER is Object
lightstep in Smalltalk, the metaclasses are anonymous. are they so in perl6 too?
autrijus calling the .new invokes Object.new
castaway I'm guessing Object is like UNIVERSAL?
autrijus a class method invocation
castaway: yeah.
castaway classes inherit, not objects 07:38
whatever
integral why isn't Object called UNIVERSAL?
castaway wonders if jql is going to make a statement or just go "ugh" ,) 07:39
cos its p6? ,)
jql Classes are objects, though. If something "is" a class, you're extending the class-object
luqui lwall: "I suspect we would make a lot of people happy if we named UNIVERSAL Object"
autrijus heh. amazingly
my %foo = (a=>1,b=>2); say join ',', %foo.pairs.map(&perl)
iterates twice
castaway these lot of people are java programmers? :)
lightstep jql, no, you create a new class-object
autrijus my %foo = (a=>1); say join ',', %foo.pairs.map(&perl)
also iterate twice!
ah. it's falling into this
"a single pair is like a one-element list"
definition 07:40
luqui well, one of the goals of Perl 6 was to make it look like Java to managers and Perl to programmers
autrijus so, say, is a single pair like a one-element list? ;)
jql allow me to re-ugh. :)
autrijus (a=>1)[1] # 1
because if that is that
then the .map behaviour falls out from that.
er
two-element list.
castaway class-object wont fit in my brain ,)
luqui right
autrijus is a single pair like a two-element list?
jql a single pair -> a one-element hash -> a single-element list containing a pair 07:41
jql chuckles diabolically
autrijus jql: I'm leaning toward that.
jql (1 => 2)[0] == (1 => 2)
castaway managers actually look at code? Hmm
luqui right
pairs don't flatten
autrijus ok.
but
(1=>2){1}
is 2.
makes some kind of sense? 07:42
Darren_Duncan a single pair is a one element list
chromatic Indexing into a pair is like .has_key?
castaway afair the docs say a pair of vals with a fat comma default to being a hash, yes
jql that would make me think (%foo)[1] should return 2 as well
autrijus nukes
jql which it shouldn't
autrijus instance ArrayClass (IVar VPair) where
luqui autrijus, yeah, that makes sense I think
oh
wait 07:43
there's something going on with the tentative new definition of .{}
Maybe the "pair is a one element hash" is the thing that has to give
Darren_Duncan in Perl 6, a => constructs a Pair object
that's its definition
a Pair object is a single element hash 07:44
luqui yeah, but larry also said that it can be treated as a single element hash
yeah
autrijus luqui: cool. get that codified in Syn so I can rewrite that chunk :)
Darren_Duncan or a single element array, where the key is the array index
luqui get what codified?
we've run into a conflict
castaway oops, I was mixing it up with $hashref = { "a" => 1 }; 07:45
jql codify pair =:= hash where .keys == 1?
Darren_Duncan the result of pairs() is a list of Pair objects; feeding pairs() to map() will give one Pair object per map iteration
luqui jql, but that's probably wrong, if we're considering .{} to be an advanced .[]
Darren_Duncan that's how pairs() is different from kv()
jql I'd like to consider .[] a specialized form of .{} 07:46
Darren_Duncan I think so too
luqui whatever 07:47
Darren_Duncan all array keys are integers starting at zero
jql hides $[
autrijus luqui: what's the win of considering .{} to be an advanced .[]?
Darren_Duncan $[ is deprecated anyway
and should never appear in perl 6
luqui autrijus, I don't remember ;-)
jql hid it
luqui I think it had to do with multidim stuff
autrijus not grokking it :) 07:49
but anyway, I'll make pair never flatten first.
luqui is looking through is recent mail
Darren_Duncan autrijus, thank you
luqui ahh, one thing was this: $ref{1;"foo";5} (AoHoA)
Aankhen`` Oh, autrijus, just FYI: r4154 built OK.
lightstep 4155 still builds here 07:50
luqui [email@hidden.address]
jql also [.{}] 07:51
autrijus so, is Pair an Array?
luqui nopaste?
autrijus (a=>1).does(Array)
jql pair.kv is the array. always, afaik
luqui jabbot, paste?
jabbot luqui: Tell me more about that.
autrijus does it respond to .[] at all?
luqui jabbot, nopaste?
jabbot luqui: nopaste is irc.csie.org:8888/
Aankhen`` luqui >> sial.org/pbot/perl6 07:52
s,sial,sial,
pasteling "luqui" at 67.165.197.242 pasted ".[] vs .{}" (31 lines, 1K) at sial.org/pbot/10579
jql I was under the impression that lvalue usage of the pair would possibly (depending on @Larry's whim) result in the .v
so $pair[3] might end up meaning $pair.value[3] someday maybe 07:53
luqui re paste: might be worth disputing, though
jql, I don't follow
jql I don't recall it ever being decided, but I recall some mailing-list chatter about a pair acting as a container for the value, and pretending the key was a sort of read-only role thing 07:55
this was long ago, so new stuff way overrides it
but it seemed like a nice idea
autrijus decides to punt for now... seems very blurry
luqui except not really, because what if the value is a pair
autrijus, good move, I think
that's the same complaint as my junctive methods complaint 07:56
autrijus luqui: not good news for module writers tho :)
jql if it's a pair, we're encouraging the heat-death of the universe. :(
luqui no we're not, we just can't decide whether to call it on the pair itself or its value 07:57
so we'd have to call it on the pair itself
jql you're right
luqui causing the special case .value.method for that particular method
autrijus Darren_Duncan: ok, I punt. use this form for now
luqui and unpredictable semantics for $pair.$method
autrijus [(a=>b)].map:{...}
er, I mean 07:58
jql I didn't like that for junctions, either
autrijus [%hash.pairs].map:{...}
luqui damian is convinced that it is The Right Way
Darren_Duncan uh huh
autrijus which is guaranteed to not treat single pair as a small list or a small hash or a small whatever.
luqui so it's hard to do anything about it
Darren_Duncan afaik, pairs() by definition returns an array whose elements are each Pair objects
jql autrijus: how can that be the solution, though? doesn't [] impose the same context as .map would?
luqui Darren_Duncan, a list, not an array
jql and cause the same expansion of elements? 07:59
autrijus Darren_Duncan: even the scalar context?
sorry, I mean list context
%h.pairs # under list context it flattens, no?
Darren_Duncan I consider a Pair object to be somewhat like a scalar
it is a value with an attached key for looking it up if it were in a list of pairs like a hash 08:00
it doesn't make sense to flatten a Pair
jql agrees with Darren
Darren_Duncan if you want the constituents, you say Pair.kv()
autrijus sure. 08:01
Darren_Duncan if you flatten an array, do you get the indicies interleaved with the values ... no, just the values
autrijus okay, I think I see what you're saying. attempting a hopefully working fix.
jql %hash.kv == %hash.pairs.kv
err
no
Darren_Duncan not sure about that
autrijus %hash.pairs.map:{.kv}
jql %hash.kv == %hash.pairs.map:{ .kv }
my bad
Darren_Duncan you mean %hash.kv == %hash.pairs.map:{.kv} 08:02
autrijus good that we agree vehemently.
jql heh
Darren_Duncan its important to have the semantics I see as being right ...
it is just so useful to keep the Pair object in a map etc
so nice to have each key/value in a neat package 08:03
what I have to do in Perl 5 is rediculous ... keys followed by a lookup for each
autrijus right.
r4156.
please test.
Darren_Duncan ok
jql has often had to resort to map { $hash{$_} ... } keys %hash;
autrijus stevan: sorry, I think ChangeLog may need to grow quite a bit :p 08:04
okay. I think that's it for now 08:05
jql umm... now that we're happy there, can we agree that %hash.map:{...} means %hash.pairs.map:{...}? heh
Darren_Duncan now on 'make'
I would be happy with that, though its less important than when you explicitly say .pairs
svnbot6 r4156, autrijus++ | * `.pairs` should never ever flatten when used as invocant to `.map`.
r4156, autrijus++ | Reported by Darren.
autrijus jql: we agree, but pugs doesn't (yet) 08:06
pugs> {1=>3, 4=>5}.pairs.map:{.ref}
(::Pair::HashSlice, ::Pair::HashSlice)
pugs> {1=>3, 4=>5}.map:{.ref}
(::Pair, ::Pair)
(i.e. the .map form are not lvalues)
jql ahh. okay
Darren_Duncan make complete
jql no worries
Darren_Duncan uh oh 08:07
autrijus breaks? 08:08
Darren_Duncan unless its because I killed make ...
Segmentation fault
autrijus try a clean unoptimised build.
Darren_Duncan will do
nothingmuch morning
autrijus yo nothingmuch
nothingmuch is sooo tired
jql :foo(1) is now ref:(Pair) from pugs>?
jql asks, cause he hasn't compiled 08:09
castaway awo nm
nothingmuch define: awo
Darren_Duncan did 'make realclean'; perl makefile ...; now on 'make unoptimized'
away from comp for c 10 min 08:10
autrijus pugs> my $x = :x<1>; $x.ref
::Pair
lightstep optimized r4155 doesn't break
autrijus same for :x(1)
jql that worked before. :) 08:11
autrijus er. sure.
jql I wan referring to plain pugs> :x(0)\n 08:12
I was just being curious
Darren_Duncan done already ... much faster than expected 08:13
scook0 is it supposed to be legal to call a non-multi sub as though it were a method? 08:14
castaway awo = hawo = hallo
luqui = hello
putting it through the babelfish
scook0 (sri_ mentioned this yesterday, but I'm not sure if anyone else noticed)
luqui you know, I don't know. I wouldn't think so, though 08:15
(but there is an argument for making $foo.bar($baz) equivalent to bar($foo,$baz) everywhere)
(but we probably don't buy that argument)
Darren_Duncan unfortunately, this still gives the same answer as the old version: my %foo = ('a'=>'b'); %foo.pairs.map:{say $_};
chromatic It's like CPS for dispatch!
scook0 luqui: it makes sense for multi subs, but I'm a bit suspicious of allowing it for regular subs 08:16
luqui I know what you mean
Darren_Duncan autrijus, it still seems to be broken, or something else is busted here 08:17
scook0 I was putting together a patch for it, but Bind.hs is in a bit of a state after the recent shakeup of how invocants work
Darren_Duncan however, lets see how SUPER works ... 08:18
autrijus scook0: there is indded an argument for 1.sort() to fail with "method not found" 08:19
instead of promoting it to (1) and returning it
scook0 also, I have a test, but I can't for the life of me figure out where to put it
autrijus scook0: I can argue bothways. :)
scook0: but I think p6l'ing it is the best idea
the spec in S12 says it has to fallback to MMD
scook0 autrijus: roger
autrijus and we know that MMD considers regular sub too (it trumps multi variants) 08:20
but then that sentence can also be taken to mean that it _only_ consider
multis
although it did not say that explicitly.
scook0 autrijus: yea, I shall petition the gods for a ruling
luqui that seems the most reasonable to me
autrijus luqui: only considering multis? 08:21
luqui foo($bar); # check subs, then multis
$bar.foo; # multis only
autrijus er, no.
foo($bar); # always means &foo with $bar as invocant -- at least now
you can argue that it has no invocant
and only attempts to consider methods on runtime
luqui soo foo($bar) and $bar.foo are equiv? 08:22
autrijus but in any case please spec it down better than S12 :)
luqui: that is what I gather. I may be totally wrong.
close $fh;
luqui that's just because there's no "close" in scope
maybe
I'm no authority on this matter. I grok it the least of anything in p6 (except the political-type stuff) 08:23
autrijus so is or is not $fh invocant?
in close($fh)
luqui Depends on whether there's a "sub close" above it
autrijus does it get resolved at compile time?
luqui !!
autrijus eval '&close = {...}'; close($fh);
luqui (perhaps)
scook0 the exact snippet that sparked this was:
autrijus luqui: I can't see how it can be resolved at compile, like, at all. 08:24
jql crapity crap
scook0 my Int $x = 1; $x.foo; sub foo { say 'lalala' }
luqui hmm... dunno
luqui p6ls
jql I can make educated guesses, but I can' 08:25
s really say
nothingmuch luqui, autrijus: i'm starting to write up the MMD proposal
autrijus anyway, please let me know when this is hashed out :) 08:26
(it will affect a lot on S29 and Prim)
sri_ autrijus: *** No compatible subroutine found: "&opendir" 08:27
svnbot6 r4157, autrijus++ | * `sub foo is rw` now toggles &foo's subLValue flag.
r4157, autrijus++ | * subroutines declared in main is marked as global for now
r4157, autrijus++ | -- will revisit later
sri_ fresh baked pugs
autrijus sri_:
pugs> opendir('/tmp')
{obj:IO::Dir} 08:28
sri_: look at src/Pugs/pugs_config and see if you have PUGS_HAVE_POSIX
er, wait, that can't be it.
you're using an old pugs , or you are invoking opendir weirdly.
(note that it now returns the dh)
(not taking dh as argument)
sri_ works on the interactive shell 08:29
autrijus opendir($fh, '/tmp');
are you doing something like that? :)
$fh = opendir('/tmp'); # it's like this
dh, even.
sri_ dammit :) 08:30
works
sri_ hides
autrijus :)
you have open/close/read/rewind
there's no seek/tell yet, but I suspect you won't use that anyway
sri_ full File::Find::Rule would also require stat 08:31
autrijus what kind of stat? 08:32
the full kind?
sri_ the perl5 kind yes
but that has time
autrijus yeah. we have various filetests
rwxezsfd 08:33
so try to use them first :)
(and they work on win32)
sri_ nice
Darren_Duncan autrijus, good news and bad news with your latest updates 08:34
autrijus bad news please
Darren_Duncan the SUPER fix, adding Object , works so my new() is back in action 08:35
bad news is that Pair objects still separate
autrijus as in %hash.pairs.map:{}?
Darren_Duncan I still see the same behaviiour as before with pairs()
yes
scook0 autrijus: Everything after line 1093 of AST/Internals shows up as methods of typeclass MonadEval...is this a mistake, or deliberate? 08:36
(it compiles fine either way...)
Darren_Duncan near as I could tell, you only updated one file, Types or something; maybe multiple files were necessary? 08:37
autrijus scook0: not deliverate
scook0 autrijus: I'll fix it in my next ci
Darren_Duncan either way, your other fixes give me enough for another commit
autrijus Darren_Duncan: it's the sort. 08:38
if you take the sort away it works.
Darren_Duncan looking ...
fyi, Syn02 says that Pair objects sort on their keys by default 08:39
jql sweet
autrijus cool, so :x<3> sorts better than 'y'?
Darren_Duncan and they don't get split up
since its obscure, I even made a note of that in a module comment
luqui autrijus, either that, or :x<3> sorts better than :y<2>, and we have yet to define how :x<3> sorts wrt 'y' 08:41
jql hrm. are inline try{} blocks supposed to work?
not in Pugs, but in P6
Darren_Duncan I think it string sorts on the keys like with cmp
luqui you mean 3 + try { 4 } ?
Darren_Duncan by default
autrijus jql: sure. try{} is just like p5 eval{}
jql yes, like that
luqui no
I don't think so
Darren_Duncan try{} is like the block form of eval 08:42
luqui That could be, but it could also be a statement: form like if
Darren_Duncan and in perl 6 'eval' only has its string form
luqui realizes he has no idea
jql so I need to write sub try_this (&foo) { try { return foo() } catch(...) {} }?
autrijus well.
svnbot6 r4158, scook0++ | * Changed var names & comments in Bind to reflect (Maybe invocant)
r4158, scook0++ | * Removed errant functions from class MonadEval
r4158, scook0++ | * Corrected the "evil hack" comment for &not
autrijus "The Perl 6 equivalent to Perl 5ā€™s "eval {...}" is "try {...}"."
Darren_Duncan so p5 "eval { ... };" equals p6 "try { ... }"
autrijus (S04)
luqui except for your bad syntax yeah
Darren_Duncan and "eval '...';" is the same in both languages 08:43
autrijus and later in S04
$x = try { given $foo { when 1 {2} when 3 {4} } + $bar;
luqui oh
autrijus so I think I'm correct in thinking that try is a normal sub.
;)
jql ok, that's good
luqui there we go
Darren_Duncan try is a block
luqui try is like do
Darren_Duncan technically you don't even need the 'try' word
luqui except that it catches all exceptions by default 08:44
jql I asked so I could use @foo.sort:{ try { .value } // $_ }
autrijus jql: you can use that.
jql not that I'd *want* to use it
just so I could
Darren_Duncan if you put a CATCH block inside ANY other block, said outer block will act like a 'try'
autrijus Darren_Duncan: that is right, except that try{} also runs the block.
Darren_Duncan so the 'try' is syntactic sugar, except when you want to ignore the exceptions
autrijus try{} is like
luqui holy smokes, I just realized that try is the thing that converts exceptions into undefs, as people have requested
autrijus do { CATCH: {}}
luqui s/\:// 08:45
nothingmuch i am discussing binding matching
jql umm... so @foo.sort:{ .value; CATCH { $_ } }?
nothingmuch how do I call the thing that is entering the function
and how do i call the thing that is accepting it?
i know both can be called "param"
Darren_Duncan the exception is in $!
like all errors in Perl 6
luqui jql, hmm... woah... nice
jql I don't want the exception. I want $_
Darren_Duncan Perl 6 uses just $! whereas Perl 5 used either $@ or $! depending on what caused the error 08:46
luqui ohhh
right
@foo.sort(-> $a { .value; CATCH { $a } })
darn
nothingmuch note that catch implies given $!, i think
luqui CATCH is a topicalizer
yeah 08:47
nothingmuch you can do $?OUTER::_
err, ditch the ?
anybody got named that distinguish the parameter getting into a function, and the parameter declaration that's taking it in?
s/named/names/
jql hrm. CATCH topicalizes... 08:48
Darren_Duncan autrijus, I still get the cast error even with the .sort taken out 08:49
luqui nothingmuch, you mean parameter and argument?
scook0 nothingmuch: you mean the distinction b/w formal parameter & actual parameter?
autrijus Darren_Duncan:
pugs> list({x=>2}.pairs.map:{1})
(1)
pugs> list({x=>2}.pairs.sort.map:{1})
(1, 1)
nothingmuch so parameter is the thing that gets the argument? 08:50
scook0 I think I used 'parameter' and 'argument' in the Haddocks...
nothingmuch that makes sense
scook0: i'm not sure
autrijus Darren_Duncan: can you confirm that?
nothingmuch function($a); # what is $a?
Darren_Duncan checking
jql hrm. too bad $! doesn't let you examine your scope like a debugger
nothingmuch sub function ($b); # what is $b?
jql $!<$_> in that case
luqui jql, are you sure?
Darren_Duncan as far as I know there is a $! stack
it keeps a list of error values
scook0 nothingmuch: parameter & argument seems to be the way to go
luqui but it would have to be something like $![-2]<$_>
jql there's no need for it to give you access to your lexical scope, though, since CATCH{} is already in it 08:51
luqui $b is a parameter, $a is an argument
(parameters are also known as "formals") 08:52
Darren_Duncan autrijus, my version spits out (1,1) both with and without the .sort
luqui (which is less common, but also less ambiguous)
08:52 ChanServ sets mode: +o autrijus
Darren_Duncan is anyone else here up to the latest build, can you test this pairs thing? 08:52
08:53 autrijus sets mode: -o autrijus
jql looky there 08:53
svnbot6 r4159, autrijus++ | * converted more (return . VList) into returnList
autrijus ?eval list({x=>2}.pairs.sort.map:{1})
nothingmuch Darren_Duncan: my box should be pretty far along. want an account?
evalbot6 (1, 1)
jql ?eval "Hello #perl6!"
evalbot6 'Hello #perl6!'
jql sweet
autrijus ?eval list({x=>2}.pairs.map:{1})
evalbot6 (1, 1)
jql ?eval :x<1>
evalbot6 ('x' => '1')
jql ok, that's good
Darren_Duncan mine is up to date
nothingmuch if the smoke loop isn't dead, that is 08:54
?eval exit;
Darren_Duncan nothingmuch, I wanted a third verify, since autrijus and I got different answers
evalbot6 Error: No compatible subroutine found: "&exit"
nothingmuch buahahaha
i bet that's banned too
jql lol
nothingmuch ah
jql I wanted to know exit()'s return value!!
luqui !eval "system 'rm -rf /'"
nothingmuch what will (1 ...)>>+<<(1...) do to evalbot? 08:55
autrijus Darren_Duncan: r4159 should have both cases solved
nothingmuch does it have accounting?
autrijus nothingmuch: timeout
it does.
Darren_Duncan will check
jql (:x<0>).map:{1}
nothingmuch goody
jql ?eval (:x<0>).map:{1}
evalbot6 ()
autrijus ?eval $?PUGS_VERSION
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.5, May 24, 2005 (r4158)'
autrijus wait till it's r4159 ;)
jql ?eval {:x<0>}.pairs.map:{1}
evalbot6 (1, 1)
luqui does it continuously update? 08:56
autrijus it does.
jql ?eval recompile yourself
evalbot6 Error: No compatible subroutine found: "&recompile"
luqui I don't think we made "yourself" a keyword
but there is a reflexive method call form
nothingmuch evalbot runs pugs -e?
?eval $?SELF.recompile;
evalbot6 Error: Undeclared variable: "$?SELF"
luqui ?eval ./=recompile
evalbot6 Error: unexpected "." expecting program
jql perhaps you need $*INTERPRETER? 08:57
?eval $*INTERPRETER.recompile
evalbot6 Error: Undeclared variable: "$*INTERPRETER"
jql darn
scook0 ?eval my &foo := {say 'hi'}; &foo.arity
evalbot6 1
nothingmuch ?eval die die die stupid robot!
evalbot6 Error: unexpected "!" expecting word character, "::", ".", "(", adverbial block, block construct, term, ":", term postfix, operator, ",", postfix conditional, postfix loop, postfix iteration, ";" or end of input
luqui scook0, that arity should be 0
scook0 luqui: aye 08:58
nothingmuch ?eval die die die stupid robot;
evalbot6 Error: No compatible subroutine found: "&stupid"
luqui you found yourself a bug
autrijus luqui: why?
nothingmuch haha
autrijus it's *@_
*@_ is arity 1
no?
jql it croaked on stupid?
luqui because it doesn't implicitly use $_
oh
autrijus ;)
luqui bare block is *@_ ?
autrijus I don't know
scook0 autrijus: no, it behaves differently if you use @_
autrijus is it only applied to sub{}?
Darren_Duncan your test works now
scook0 ?eval my &foo := {say hi}; foo
evalbot6 Error: No compatible subroutine found: "&say"
autrijus Darren_Duncan: cool
Darren_Duncan list({x=>2}.pairs.sort.map:{1})
jql say "hi: 08:59
luqui I thought, in the absence of $^s, that it was either 0 or 1, depending on the usage of $_
Darren_Duncan now to test my module
nothingmuch back to thinking
jql ?eval my &foo := {say "hi"}; foo
evalbot6 Error: No compatible subroutine found: "&say"
luqui autrijus, I think it is only applied to sub, since that was a backwards-compatibility decision
jql ?eval my &foo := {say "hi"}; foo(1,2,3)
evalbot6 Error: No compatible subroutine found: "&say"
jql is amused
autrijus luqui: sure. 09:00
luqui ha, "backwards-compatibility" and perl 6t
s/t$//
autrijus luqui: methods too?
method foo { say @_ }
luqui yeah, but methods also have a *%_
autrijus sure
?eval $?PUGS_VERSION 09:01
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.5, May 24, 2005 (r4158)'
autrijus slow rebuild cycle
luqui It wasn't so much backwards compatibility as it was to appease people who don't like signatures, and enjoyed the pain that was perl 5 arg processing
the question is, in method foo, is the invocant @_[0] ?
autrijus don't think so.
jql aww crap
luqui I wouldn't think so, but the "old-style" type argument says yes 09:02
autrijus as it stands it would mean something like ($?SELF:*@_)
jql that's a nasty, vicious question there
autrijus how do you write it "correctly" anyway?
is the signature allowing double binding?
luqui I don't think so
jql I have to think it's not in @_
autrijus well then. if you can't express it using introspectable syntax :)
...it can't happen
luqui yeah...
jql slurpy *@_ means only slurped arguments are in @_, I think 09:03
Darren_Duncan my module's pairs() etc works now
autrijus Darren_Duncan: yay
jql @_[0] has to be the first slurped argument
luqui well, we were arguing about whether *@_ is really the signature of methods 09:04
or whether it's some funny inexpressible thing
autrijus I don't like funny inexpressible things, fyi. 09:05
luqui and I have to agree than inexpressible things are bad
autrijus I think it's perfectly well that we pretend there's always a
$?SELF = shift;
in front of all methods.
where "we" means "old perl 5 people"
luqui yeah. p5 junkies can't have it their way all the time
jql you can always unshift it. method foo { unshift $?SELF; } # feels like perl5
luqui yuck. Well, the whole ()-less thing is yuck anyway. 09:06
jql if the p5 people could live with shift @_, they can live with that.
luqui At least we're preserving the bosonic nature of yucks
autrijus, who was that guy that you pointed me to who did something in relation to the many worlds interpretation? 09:07
long, long ago the pointing occured 09:08
svnbot6 r4160, autrijus++ | * according to luqui, bare {} and pointy -> both have no
r4160, autrijus++ | default argument at all, unlikes sub/method/coro that has *@_.
autrijus luqui: ashfar?
luqui wikipedias him
first name?
jql ?eval {@_}.(1,2,3) 09:09
evalbot6 [1, 2, 3]
luqui that still looks right 09:10
autrijus except it's not? ;)
luqui no, just confirming
autrijus so @_ is implicit var?
or how does that work?
jql ?eval {$^x}.(1,2,3)
evalbot6 Error: unexpected "\\" expecting "::"
luqui I wonder what happens when you use $_ and @_ in the same block...
jql phooey
autrijus luqui: hey wait. @_ is implicitly extracted? 09:11
Synopsis never said that
luqui I don't like @_ implicit, but I think that's what people would expect
yeah, I'm extrapolating
don't gospel it
autrijus whew.
jql so @_ is the $& of perl6 subs? :)
saw_slurpyargument
luqui thinks he should have a "speculating" sigil on his quotes
or, for proper huffmanization, a "not speculating" sigil 09:12
;-)
jql so placeholders don't work yet, or did I make a mistake?
autrijus jql: I think it's a evalbot helper script problem
jql ok. I tried it from pugs> and it works fine 09:13
oh, and my 2 cents, I think luqui is right 09:14
even though I made fun. :)
autrijus what is right again? :) 09:15
luqui jql, there are a lot of local $&s in perl 6. Fortunately, we're trying hard not to make any of them global.
jql if @_ is used, it implies a *@_ argument
autrijus ?eval $?PUGS_VERSION
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.5, May 24, 2005 (r4158)'
luqui jql, only in implicit blocks
autrijus wonders if juerd's rebuilding script is really working
luqui it's always there if there's no (), and it's never there if there is a () on normal declarations 09:16
jql where a signature is not otherwise provided, and not a "sub"
yah
autrijus sub foo { $_ + @_ }
what does this do?
{ $_ + @_ }
what about this?
luqui right
that was my question earlier
jql $_ would be undef, @_ would be the count of slurpy args
autrijus undef?
luqui Or $_ would be first arg 09:17
who knows
jql who defined $_ for sub foo{}? it's lexical
autrijus and how do you spell out the full signature?
jql: $_ is defined as implciit.
luqui jql, I think $_ is the first arg still (that could have changed last week though)
jql well, it's undef if @_ == 0
jql chuckl;es
autrijus ...
luqui I don't think anyone in here was around for my "nonex" proposal ;-) 09:18
autrijus anyway. the Synopsis doesn't say how @_ autoextracts, and how it interacts with $_
so I get to blissfully ignore it :)
luqui %hash<foo> = nonex; # equiv to delete %hash<foo>
that's fine
as long as it does $_ right
that's the important one
which it does not 09:19
{say}.(1)
autrijus ?eval {int}.(1)
evalbot6 0
jql ?eval {@_}.(10) 09:20
evalbot6 [10]
jql ?eval {$_}.(10)
evalbot6 \10
jql interesting
luqui it works if you actually type $_, but it doens't do the implicit right, it seems
Aankhen`` sub foo { ... } gets an implicit signature of (*@_)...
autrijus luqui: "say" worksforme
Aankhen`` ?eval say "hi"
jql $?CALLER::_ doesn't work, then
evalbot6 Error: No compatible subroutine found: "&say"
Aankhen`` ?eval {@_}.(foo => "bar") 09:21
evalbot6 []
luqui autrijus, really? {say}.(1) says 1?
autrijus nvm.
Aankhen`` That ought to throw an error, innit?
autrijus luqui: how does say signal that it needs $_ though.
we currently have
Aankhen`` ?eval -> *@_ {@_}.("foo", "bar")
evalbot6 ['foo', 'bar']
Aankhen`` ?eval -> *%_ {@_}.(foo => "bar") 09:22
evalbot6 Error: Undeclared variable: "@_"
autrijus say(?$x=$CALLER::_)
Aankhen`` Oops.
luqui through the $CALLER::_ in the declaration of say
ouch
Aankhen`` ?eval -> *%_ {%_}.(foo => "bar")
evalbot6 {('foo' => 'bar')}
luqui that seems nasty in the face of redefinition and such
Aankhen`` ?eval -> *@_, *%_ {%_}.("foo", "baz", "quux", foo => "bar")
autrijus luqui: except this
evalbot6 {('foo' => 'bar')}
Aankhen`` ?eval -> *@_, *%_ {@_}.("foo", "baz", "quux", foo => "bar")
jql not bad
evalbot6 ['foo', 'baz', 'quux']
Aankhen`` I love P6 signatures. :-D 09:23
autrijus {eval '&say := { $^x + $^y }'; say}.(1)
jql they are spiffy
svnbot6 r4161, autrijus++ | * luqui pointed out that *@_ is only implicit for Routines.
luqui autrijus, right
Aankhen`` ?eval sub ($odd where { $_ % 2 }) { $odd }.(1)
evalbot6 Error: unexpected "w" expecting trait, ",", ":" or ")"
Aankhen`` :-(
luqui hmm
autrijus luqui: if you can find an algorithm -- or indeed define that only compile-time binding counts -- I'm willing to implement it
luqui maybe it's time to rollback 4160
Aankhen`` ?eval { ++@_ }.(1) 09:24
evalbot6 Error: Can't modify constant item: VInt 2
Aankhen`` ?eval { ++@_[0] }.(1)
evalbot6 Error: Can't modify constant item: VInt 2
Darren_Duncan question ...
luqui well, I wonder which is more complex
Darren_Duncan I have a function that does this: return hash %{$message.:msg_vars};
luqui compile-time binding that fails with redefinition, or just making .arity return 1 instead of 0
autrijus ?eval $?PUGS_VERSION
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.5, May 24, 2005 (r4158)'
luqui from a language perspective, of course
Darren_Duncan from the caller point of view, this seems to return a 'List' and not a 'Hash' as I expected
luqui (ok, so it wasn't 4160, but it was recent) 09:25
autrijus luqui: *shrug* you get that any way with any sort of mmd.
in the face of runtime rebind
so it's a general problem
Darren_Duncan what's the easy way to make it return a 'Hash'?
jql Darren: \hash
?
luqui twoo, twoo
Darren_Duncan will try that
autrijus Darren_Duncan: return {hash %{}}
or indeed 09:26
jql ?eval \hash(1,2,3,4)
Aankhen`` ?eval sub (Range $foo) { "Range - " ~ $foo.perl; }.(1..10)
evalbot6 {('1' => 2), ('3' => 4)}
'Range - \\(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)'
autrijus { %{}}
hm, that won't work.
stupid autoclosuring heuristic.
Darren_Duncan autrijus, return {hash %{}} doesn't work; it will construct an anonymous lock
block
autrijus indeed.
jql ?eval hash(1,2,3,4)
evalbot6 {('1' => 2), ('3' => 4)}
luqui autrijus, huh?
which autoclosuring heuristic?
jql hrm. same difference
Aankhen`` ?eval -> { return hash (1, 2, 3, 4); }
evalbot6 Error: cannot return() outside a subroutine
Aankhen`` ?eval sub () { return hash (1, 2, 3, 4); }.() 09:27
jql wtf?
evalbot6 {('1' => 2), ('3' => 4)}
autrijus luqui:
2~If the closure appears to delimit nothing but a commaā€separated list starting with a pair (counting a single pair as a list of one element), the closure will be immediately executed as a hash composer.
S04.
Aankhen`` ?eval sub () { return hash (1 => 2, 4 => 3); }.()
evalbot6 {('1' => 2), ('4' => 3)}
autrijus the stupid thing is that it doesn't say hash() counts too.
but maybe it's intentional :)
I think it is.
luqui you mean hash { } ?
autrijus I mean hash ().
luqui oh right 09:28
Aankhen`` Darren_Duncan >> Try `return hash $message.:msg_vars;`?
autrijus there is no hash {}
that's another application of principle of most surprise, fwiw :)
Darren_Duncan will that return a copy of the original hash?
luqui yeah, but at least hash can be a function instead of a syntactic form then
IshaCocoa_ how big is a fresh checkout of the pugs source (roughly)?
castaway thats what I was pointing at earlier
autrijus luqui: what's wrong with hash{} running the adverbial block. 09:29
luqui Maybe you could make an empty hash like {,}
that would be nice
oh
Aankhen`` Darren_Duncan >> It ought to.
luqui that's an interesting proposition
autrijus luqui: that's what many people expected on #perl6 :)
I think I've seen it ~12 times
including you
Aankhen`` ?eval my %foo = (foo => "bar", baz => "quux"); sub () { return hash %foo; }.(); 09:30
evalbot6 {('baz' => 'quux'), ('foo' => 'bar')}
luqui I didn't think it ran the block, I thought it would interpret the next {} as a has composer
autrijus it may even worth it to have
multi sub hash (Code &x)
multi sub hash (List *@_)
jql hash %foo is wrong. you have to use hash %foo.kv
Darren_Duncan all my variations didn't work
autrijus as two multi things.
Aankhen`` ?eval my %foo = (foo => "bar", baz => "quux"); sub () { return hash %foo.kv; }.();
evalbot6 {('baz' => 'quux'), ('foo' => 'bar')} 09:31
Aankhen`` jql >> Seems to work right either way. ^_^
autrijus jql: hash %foo is right.
luqui jql, a list of pairs works fine
autrijus it really works either way, except when the hash is shaped to take pairs as keys.
(in which case all hell break lose) 09:32
luqui: so, why do you want to rollback *@_ on pointy and bare?
Darren_Duncan well, I'll just skip this attempt for now
jql alright. if hash accepts <a b c d> and :a<b>, :c<d> equally, I'm not going to complain
Aankhen`` Maybe it needs: multi sub hash (*%_) 09:33
as well.
(for `hash(:a<b> :c<d>)` to work) 09:34
jql but then I see a difficulty in using pairs as keys that way in hash()
luqui autrijus, I referred to the wrong revision
autrijus luqui: so what you want to rollback?
Aankhen``: it already workes
jql that's why %hash.kv sprang to mind
luqui I (possibly) want to roll back the arity-0 when $_ isn't used thing
Aankhen`` autrijus >> Ah, right.
Aankhen`` shuts up.
?eval $?PUGS_VERSION
jql I assumed it would construct Pair => Pair otherwise
autrijus luqui: oh, you mean passing in $_ anyway?
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.5, May 24, 2005 (r4158)'
jql since that's legal
autrijus luqui: as in making the prototype as (?$_)
luqui yeah, it seems simpler that way
and nice an opaque from a syntactic perspective 09:35
autrijus i.e. disable implicit varring on $_
luqui Actually, I think the best is:
autrijus and if arglist is empty, put it as ?$_
luqui (?$_ = $OUTER::_)
autrijus for pointy and block
and as *@_
for routine and above
jql would implicitlly given $?::OUTER::_ {...} the sub body 09:36
or however it's syntaxed
s/:://
Aankhen`` BBL.
autrijus luqui: makes sense to you?
luqui yeah
the only thing I'm frightened about with the $OUTER::_ thing 09:37
is if you're passed an argument without knowing that your particular construct passes arguments (like while), and then you try to use the lexical $_
when it's your argument
jql slaps his forehead 09:38
luqui when in doubt, use -> { }, but I'm not sure that's good enough
luqui ows for jql
autrijus what does ->{} gain?
->{} has no implicit params _at all_ ?
luqui it says "no, seriously, no arguments"
jql when $_ is your argument (like in while()), it's your invocant. right?
luqui (unless I'm mistaken about what -> {} means) 09:39
autrijus so we have
{} # defaulting on ?$_=$OUTER::_
->{} # defaulting on nothing
sub {} # defaulting on *@_
luqui jql, I don't think so
autrijus is that the idea?
however,
{$^x}
->{$^x}
sub{$^x}
luqui except for the first one, yeah. the first one is a maybe.
autrijus all produce the same signature
that is ($x) 09:40
luqui can you use placeholders inside named subs?
luqui dunnos
autrijus I can't see why not.
it's not forbidden anywhere.
luqui Well, no, those couldn't all create the same signature
autrijus why?
luqui the second one is like saying sub () { $^x }
"I have no arguments. I have one argument."
I think you basically have to pick your argument style: named (with ->) or placeholder ($^x) 09:41
no mixing and matching
jql points at macro /->/ { "sub" } as a defense
luqui s/named/declared positional/
jql, it's more like macro /-> stuff/ { "sub ($stuff)" } 09:42
jql too true
autrijus okay. so $^x in anything but Bare is banned.
jql cries 09:43
luqui jql, how come
autrijus as it would make no sense to disallow it in -> but allow in sub.
luqui autrijus, right
jql I'm a lazy bastard. that's all
autrijus (?$_=$OUTER::_ is rw) ?
(for bare)
@_map:{chomp}
luqui for now, yeah
autrijus @x.map:{chomp}
jql sub foo { print $^foo if $^bar } # I suck. shoot me now 09:44
luqui everything is crystal clear except for the placeholderless bare block
autrijus for some reason I think jql's plea makes sense ;)
luqui which is "get close until we figure it out for real"
jql, you realize that $^bar is your first argument 09:45
jql yes. I know
foo(DEBUG, "hello:)
autrijus luqui: do you have tuits to codify all the three cases into tests?
luqui how does that work with the implicit *@_ on ()-less subs
yeah
autrijus danke.
jql the sorted list of $^placeholders are indexes into @_? 09:46
luqui where should I put them
autrijus t/subroutines
or t/syntax, pick one
luqui cd pick glob 't/{subroutines,syntax}'
jql ?eval <subroutines syntax>.pick 09:47
evalbot6 'subroutines'
jql likey
autrijus lol
luqui: I don't think I have tuits to rewrite the doExtract in Parser right now... I'd appreciate if you can p6l this whole summary 09:48
(preferably with tests)
jql we should use ?eval for all design decisions
autrijus then I'll put it to code
jql ?eval <./method $?SELF.method>.pick 09:49
luqui autrijus, okay
evalbot6 '$?SELF.method'
jql stupid bot. lets not
luqui btw, I notice that BEGIN finally works. pugs++
autrijus :)
along with "use" and imports etc.
luqui right
Darren_Duncan I committed LKT again 09:50
one of the main test files now runs
the remaining two main files still short-circuit-exit
thanks to Autrijus for all the Pugs updates that got it this far
autrijus no prob :) 09:51
I look forward in getting it all pass.
Darren_Duncan one of the main issues left is in regards to how empty array arguments are handled
autrijus hm?
jql what? 09:52
Darren_Duncan try removing the 'exit' in t/lkt_20_trnprops.t and see what happens
essentially, making a new Translator object with two empty array arguments should be valid, but the function returns undef as on bad input
this is probably simple and I'll look at it tomorrow 09:53
but today's progress was very significant
luqui dies_ok is the !eval test?
autrijus luqui: something like that, yeah
Darren_Duncan: cool. thanks!
luqui well I knew it was something like that :-)
Darren_Duncan the code doesn't die; it just returns the wrong output
then it dies afterwards when trying to call a method on undef 09:54
autrijus luqui: rtf[ms] -- it's try{} and making sure there's $!
luqui right, I was just going for the "quick answer" approach 09:55
svnbot6 r4162, Darren_Duncan++ | Locale-KeyedText update, following some Pugs improvements by Autrijus - SUPER::new now works, so uncommented and fixed; commented out some tests, but most of 10_msgprops work now; other minor bits
luqui ~ "at the expense of others' time"
Darren_Duncan ain't that the way the world works 09:56
its now 3am and I'm off to bed ... good night
autrijus :) 09:57
I need to sleep too.
it's 6pm and I think it's 21st hour of my uptime
luqui ouch
autrijus (not that unusual.)
(but still.)
luqui (ikwym.)
Darren_Duncan you're longer than me ... it's just my 19th hour or so 09:58
luqui neaheheheheheh, you just said "you're longer than me" 09:59
(sry. too much family guy)
Darren_Duncan that's right, laugh it up
that show is half good and half crass
luqui yeah. it's my favorite for the good part 10:00
I put up with the crass
(sometimes that's the mood I'm in) 10:01
Darren_Duncan and we're out in 3...2...1
autrijus :) *wave* & 10:05
Juerd Bye 10:09
And hi
luqui hi 10:10
knewt ponders the terms "Hard Ref" and "Symbolic/Soft Ref" 10:12
luqui hmmm... unixly delicious
svnbot6 r4163, luqui++ | Add implicit parameters test. 10:28
IshaCocoa_ pastebot 11:01
clkao summon autrijus 11:06
castaway he just went to bed after 21 hours up, poor guy 11:07
castaway turns off the summoner
Juerd You turned off clkao! You bastard :)
clkao i know, but he only needs 5 min sleep
i know him very well :) 11:08
Juerd Yay - feather is up 4 days already
castaway grats Juerd :)
Juerd TBH, I expected it to face huge loads and crash within the first 3 days
So this is positive :)
If you want an account, let me know by mail :) 11:09
scook0 ? our $autrijus; $autrijus.does(::Sleep)
Juerd There's still moments that it idles.
castaway email where to? :)
Juerd [email@hidden.address]
top - 13:10:06 up 4 days, 18:12, 4 users, load average: 0.13, 0.09, 0.03 11:10
Tasks: 89 total, 1 running, 86 sleeping, 2 stopped, 0 zombie
Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 1031736k total, 581024k used, 450712k free, 167708k buffers
Swap: 987896k total, 23204k used, 964692k free, 275716k cached
castaway makes a note :)
clkao Juerd: i want too, should i send ssh key to you or ?
Juerd clkao: send me a request for an account by email
clkao: Attach your ssh key if you want
Otherwise you will be given a temporary password
scook0 ?eval our $autrijus; $autrijus.does(::Sleep) 11:11
evalbot6 bool::false
clkao sent
Juerd Do you want your nick as username? 11:12
clkao: ping 11:13
I'll just assume so
Given your mail address :)
You should be able to log in now 11:15
clkao j:)Juerd: [email@hidden.address] 11:19
Juerd ?
^kj^I:)?
castaway cat on keyboard? ,) 11:21
Juerd aww 11:23
Who poked your eye out?
castaway various daft chat programs :) 11:24
rgs shouldn't "make distclean" wipe out src/Config.hs et alii ? 11:26
or, there are old leftover files in my working copy 11:28
svnbot6 r4164, scook0++ | Non-toplevel type declarations 11:47
clkao whoot, i feel feather is local to me 11:48
so fast
wolverian hmm. why do I have emails about pugs from OSSF in my inbox? I can't even read it, whatever language it is! 11:49
clkao grr, can't compile perl5 on feather. some crypt_r crap 12:00
rgs tales from the crypt_r 12:01
clkao rgs should know it well. what should we do?
rgs it's freebsd ? 12:02
clkao feather is .. debian i think
rgs what Configure line do you give to perl 5 ? 12:03
clkao wait a sec, why is ~autrijus/.svk/local 666.. and people are not in a same group?
i don't know. Juerd?
i think it's the -D_GNU_SOURCE from google.
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT 12:04
rgs you're not helping very much 12:05
clkao Juerd: how was the perl5 compiled on feather? or installed from apt?
svnbot6 r4165, rgs++ | * Add missing files to be cleaned up by the realclean target
wolverian perl is installed on feather from apt according to /var/lib/dpkg/status 12:09
castaway suspects its apt 12:14
broquaint Are import methods now required? - pugs: *** No compatible subroutine found: "&Stream::import"
luqui no 12:15
must be a bug
broquaint Darn. 12:16
luqui I'm trying to track it down
broquaint Aha: use module <<stuff to import>>; # triggers the import call
But without an import list there's no import() call. 12:17
luqui hmm, that's wrong
use works just like perl 5's.
or should, rather
broquaint Are empty parens still required to explicitly not call import? 12:18
luqui yeah
well, maybe. we might turn it into an adverb 12:19
use Foo :noimport;
but for now, just like perl 5.
broquaint Alrighty. 12:20
castaway broquaint!
broquaint castaway!
castaway allo there, got a job yet? 12:21
luqui does anybody know what 'Just' does?
broquaint #haskell might know ;)
luqui good point 12:22
broquaint 'lo, c :) Someone figured to employ me, finally! And yourself?
castaway cool..
waiting for an answer from Sophos
was looking at places to rent and so on.. doesnt look all that rosy/fun tho :( 12:23
broquaint Darn, now that import() is required subs aren't automagically stuck into the default mainspace. Can exporting be done with perl6 yet?
castaway where did you get one?
broquaint Multimap.com
So it's a life of cartography for me! Not quite the high seas, but near enough. 12:24
castaway cool
broquaint What caller information can be obtained presently? 12:37
Is it just file, line num, sub name? 12:38
castaway know nuthin :) 12:43
broquaint It also appears if you use() a module it trys to call $Modulename.import, even if there is no package pertaining to $Modulename in the module. This makes things tricksy. 12:47
Juerd clkao: apt 12:52
broquaint pugsbug: perl -Mfoo=:stuff -e 1 # doesn't exit. looks like a bug in -M not use() 12:59
nothingmuch autrijus: ping 13:08
SamB !karma dons 13:10
SamB wonders what all the "++"s are for
castaway karma castaway 13:11
jabbot castaway: castaway has karma of 11
clkao karma samb
jabbot clkao: samb has neutral karma
castaway (that)
clkao karma SamB 13:12
jabbot clkao: SamB has karma of 12
SamB why is it case sensitive?
castaway cos its perl? :)
nothingmuch perlbot karma samb
perlbot karma SamB
SamB karma dons
jabbot SamB: dons has karma of 3
nothingmuch darn 13:13
Juerd Its case sensitivity makes no sense on irce.
irc.
nothingmuch pugs takes forever and a day to load Class::Events
gugod: please make jabbot's karma reporting case insensitive 13:14
see? problem solved.
SamB of course, it would have to use a special concept of case insensitivity for IRC...
iirc, some brackets are considered to be upper and lower case versions of the same thing...
nothingmuch does anyone know a bit about parrot's MMD? 13:32
castaway multi media display?
SamB multi-method, probably
I think it means, paradoxically, dispatch over multiple method arguments... 13:33
theorbtw1 G'morning, lambdacamels. 13:37
scook0 ahoy 13:38
13:41 theorbtw1 is now known as theorbtwo
theorbtwo Correct, samb. 13:46
nothingmuch gotta love tom waits 13:47
"lay your head where my heart used to be"
=)
broquaint is rw hasn't been implemented, right? 13:49
theorbtwo autrijus++ # Fixed my bug.
?eval sub foo ($a is rw) {$a++}; my $x=1; foo($x); $x
evalbot6 \2
theorbtwo ?eval 42 13:50
evalbot6 42
theorbtwo Odd.
What's that \ doing there?
theorbtwo guesses that is rw works and evalbot6 does not, but could well be wrong.
broquaint ?eval sub f($a is rw) { $a = [$a] } f 'foo';
evalbot6 Error: Can't modify constant item: VRef <Array>
theorbtwo broquaint: That looks correct to me. 13:51
broquaint Really? Why?
theorbtwo Same reason 'foo' = ['foo'] is illegal. 13:52
?eval 'foo' = ['foo']
evalbot6 Error: Can't modify constant item: VRef <Array>
integral ?eval 'foo' = 5
evalbot6 Error: Can't modify constant item: VInt 5
theorbtwo (The error message is wrong, though -- it should say what is being modified.)
integral slightly misleading error
broquaint Ah, got it. 13:53
is copy works for my porpoises anyhow :)
IshaCocoa Where is the pugs makefile.pl expecting to find nmake.exe? I have put copies in perl\bin, windows\system cl\bin and the pugs directory and still every makefile run (17 and counting) isists upon re-downloading it from the web? 14:01
svnbot6 r4166, Aankhen++ | * finally added lovingly translated, sadly crippled version of HTTP::Message. 14:04
theorbtwo IshaCocoa: You should probably ask in #perl, not #perl6. 14:05
IshaCocoa Noone here is building pugs? 14:06
theorbtwo Well, the question does apply to pugs. 14:07
Somewhere in your PATH. 14:08
(Actually in the PATH variable, which leaves out some things that are effectively in the PATH.)
IshaCocoa All those locations are in my path
theorbtwo Hm. 14:09
The relevant bit is inc/Module/Install/Can.pm, can_run.
castaway presuambly just calling "nmake" produces useful results?
IshaCocoa Castaway: Yes. Pugs built and runs (unoptimised). 14:10
broquaint pugsbug: pugs -e 'sub a { f @_ } sub f { my $s = @_.shift; say $s } a q[foo],q[bar]' # *** Can't modify constant item: VUndef 14:11
IshaCocoa TYping nmake works fine from anywhere. I just can;t work out where the makefile is expecting to find it?
broquaint But calling a() with one arg works fine.
Further simplified to: pugs -e 'sub f is export { my $s = shift @_; say $s } f q[foo], q[bar]' # *** Can't modify constant item: VUndef 14:12
And the 'is export' is superfluous. 14:13
So, simply: pugs -e 'sub f { shift @_ } f 1,1 ' # *** Can't modify constant item: VUndef
nothingmuch ?eval sub f (*@_) { shift @_ } f 1,1 14:14
evalbot6 Error: Can't modify constant item: VUndef
nothingmuch that's very odd 14:15
IshaCocoa theorbtwo: con.pm is the problem. It doesn't append '.exe' so never sees the executable.
nothingmuch ?eval sub f (*@_) { shift @_ }; my $a = 1; my $b = 2; f $a, $b;
theorbtwo Ah!
evalbot6 Error: Can't modify constant item: VUndef
IshaCocoa s/con/can/
theorbtwo Note that most callers of the thing that gives out "Can't modify constant item" pass it an explicit undef.
theorbtwo ponders... do I want to fix this, or work more on the Code methods. 14:16
IshaCocoa: patch your local version so it works, then yell at ingy when you see him.
We can put the changes into Pugs' copy of Can.pm, but we should push them upstream. 14:18
Actually, write your patch, and we'll give you committer access so you can check it in. 14:19
broquaint I see the bug is already in t/subroutines/subroutine.t.
castaway Code methods?
theorbtwo castaway: say &say.affix 14:20
Er, that's not quite right. 14:21
?eval &say.assoc
evalbot6 Error: Undeclared variable: "&say"
theorbtwo Grr, and that's new...
It works in my local copy... 14:22
?eval $?PUGS_VERSION
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.5, May 24, 2005 (r4158)'
castaway assoc? 14:23
Limbic_Region did .assoc get added in the last 9 revisions? 14:24
castaway guesses svn blame would know 14:25
theorbtwo No, but some relevant stuff may have gotten changed around. 14:26
svnbot6 r4167, broquaint++ | * added argShifter test for single arg and made test output more descriptive
Limbic_Region if I want to add an example using features not yet supported by Pugs, where should I put it and/or how should I label it? 14:27
theorbtwo I think treat it just the same as an example that is supported, and make sure there are additional normal tests for the features it uses. 14:28
...and the features will probably appear shortly.
Limbic_Region doubt 14:29
castaway tests tests tests :)
Limbic_Region err
I doubt it
I am fairly certain the majority of the features have been marked todo for some time
theorbtwo Yeah, but having an example that actually uses it provides additional motivation.
What's the feature?
Limbic_Region hyper derefing, last LABEL, plus a bug or two 14:30
let me see if I can find any others
wow - when I first started writing that there were a lot more things wrong 14:31
guess it is just 3
a bug
and two missing features
all of which have tests
theorbtwo OK. 14:32
Limbic_Region hmmm
it appears the label test(s) are no longer in for.t 14:33
I wonder if they got moved or removed
nevermind
they are in last.t
my mistake
oh - there is another weird bug 14:35
but it too has a test 14:36
I will add comments for the 4 tests that need to be implemented/fixed before it will work 14:37
svnbot6 r4168, luqui++ | Implement loop {} while and loop {} until.
wolverian I thought larry didn't want to implement those. :) 14:38
luqui hmm?
theorbtwo bets luqui will shortly fix last label.
No, that's do {} while and do {} until.
luqui I probably won't
wolverian right. I thought the tail weight was his argument against that, which applies to loop { } ...; similarly
luqui I'm clawing for ground here
I'm pretty sure that's the one we decided one 14:39
s/e$//
I don't recall, it could have just been damian's idea, with larry keeping silent
wolverian I don't recall loop { } while at all, on p6l anyway. 14:40
luqui it might have been a sixperl thing 14:41
nothingmuch define: sixperl
castaway Looping statement modifiers are the same as in Perl 5, except that to avoid confusion applying one to a do block is specifically disallowed. Instead of 14:42
do {
...
luqui secret cabal mailing list
castaway } while $x;
luqui oh no
castaway you should write
loop {
luqui now they'll have to kill me.
castaway ...
} while $x;
(S04)
svnbot6 r4169, luqui++ | Let's not be an idiot. Run the body the first time *outside* the recursive call.
nothingmuch wonders why all the secrecy 14:43
could it be a readonly list?
i understand the need to not flood with comments
but I do think that the cycle is slightly too long, between things starting, and getting to the public
theorbtwo s/is the community's rewrite of perl/is the cabal's rewrite of perl/ 14:44
nothingmuch which kind of makes me feel like i'm too much of an idiot to get undigested perl6ish discussion
lathos theorbtwo: "The community" can't make decisions. Somebody has to.
wolverian castaway: oh, thanks. :)
rgs the cabal is the community's rewrite of the community. 14:45
theorbtwo lathos: Accepting for the case of argument, but that person, or those people, could use informed commentary.
lathos theorbtwo: They do use informed commentary. You think they don't read p6l?
luqui well, the thing is, the comments would come to p6l, which we all read 14:46
theorbtwo lathos: But if most of the discussion goes on where p6l can't see it, then p6l is uninformed commentary.
nothingmuch lathos: it's not about vetoing, it's about transperancy
lathos You're confusing discussion and decision again.
rgs most of the discussion goes on p6l 14:47
nothingmuch i wouldn't mind my opinion being ignored until it's "out"
luqui larry says a lot of stuff
and we wouldn't want people to misinterpret that
nothingmuch i'd just like a preview, so i can think about things before they are up for discussion
luqui but I don't really understand the need for secrecy any
Limbic_Region ok - comitted
theorbtwo I think people would misinterpret less if they understood how sure or unsure Larry was at the time. 14:48
svnbot6 r4170, Limbic_Region++ | Added cribbage_scoring.p6 example which needs 2 bugfixes and 2 features implemented before it will work
nothingmuch as for comments coming up on p6l - they can be ignored till it's time
lathos Ah, you just need to look in the X-Larry-Confidence headers.
nothingmuch goes to check if that's a joke or not
theorbtwo I think part of the problem is that Larry isn't always sure how confident Larry is.
lathos Right. 14:49
Also, Larry's confidence counts for nothing when two days later another situation comes up and everything changes. :)
theorbtwo More context is almost always good at helping misunderstandings.
luqui nothingmuch, you can't really ignore people's comments
theorbtwo (This is why we don't name functions <a b c d e>.) 14:50
luqui we've been doing pretty badly on keeping up
but when you stop responding, people stop caring, it seems
theorbtwo luqui: It creates the impression that p6l is an echo-chamber, and the real decisions are being made elsewhere.
lathos But that's true.
Again you're confusing discussion and decision. 14:51
theorbtwo lathos: Again, you are assuming discussion doesn't happen on the cabal list, only decision.
nothingmuch I would also like code to be opened. No doubt the community could help Larry's dabs at the converter
luqui a lot of times larry accepts proposals that people on p6l make without telling them on p6l
theorbtwo That seems to be unfounded.
lathos theorbtwo: Oh. I was on it, if you remember.
nothingmuch does he accept them on cabal list?
luqui because if he did, people get very defensive if he decides to change his mind
theorbtwo Oh. No, I didn't remember that.
lathos Some discussion happens, but not much. It's only really discussion of the effects of a decision, as it were. 14:52
And that happens on p6l too.
luqui yeah. the real decision making really only takes place in a certain person's head
IshaCocoa_ theorbtwo: Okay. I have the patch for the nmake problem. Where do I send it? 14:53
luqui list?
theorbtwo perbot nopaste
Limbic_Region perlbot nopaste
luqui or [email@hidden.address]
theorbtwo jabbot, nopaste
jabbot theorbtwo: Please go on.
luqui jabbot, paste
jabbot luqui: Does talking about this bother you?
nothingmuch sial.org/pbot
luqui hmph
lathos By the time we work out the URL, you could have mailed it to the list. :) 14:54
castaway (its such a memorable url too)
nothingmuch castaway: but it's too easy to fetch it
it also serves as a sort of trumpet sound
theorbtwo Yeah, but I'd rather it go to the nopaste, so I can take a quick look and offer IshaCocoa_ a committer bit.
nothingmuch "I am going to paste something!"
castaway its easy? 14:55
theorbtwo It is when perlbot is here. 14:56
Limbic_Region perlbot is also missing from #perl and I can't seem to find Chris62vw's email addy
nothingmuch use pbotutil, it's easier once you config it 14:57
pbpaste | pbotutil -m "a description"
integral Limbic_Region: just poke him when he comes online later
Limbic_Region that assumes I will be around
integral oh, someone in #perl will :-)
Limbic_Region *shrug*
nothingmuch pbotutil -c pugs 14:58
luqui is a lazy bastid
nothingmuch oh, you have to make add a slash at the end, i think
sial.org/pbot/
otherwise the relative action is a 4004
integral and sial.org/pbot/perl6 will automatically paste here :-) 14:59
luqui 4004? That's like "I couldn't find it, so I shot your mother"
theorbtwo 4004 -- Not Found: The Next Generation. 15:00
These are the voyages of the starship Missing, on it's continuing mission to seek out new deaths, and new anarchy... to bodly go where many people have gone before. 15:01
pasteling "IshaCocoa" at 195.92.67.70 pasted "makefile.pl:nmake not found patch to Index: inc/Module/Install/Win32.pm" (13 lines, 543B) at sial.org/pbot/10590 15:02
nothingmuch luqui: replied... thanks 15:05
theorbtwo Oh, that's not the fix I thought you were going to make... but it'll do.
Want a committer bit?
luqui nothingmuch, sortof
oh
_you_ replied
nothingmuch yep
Limbic_Region theorbtwo - you aren't in sales are you
:)
the appropriate way to do that is 15:06
nothingmuch given just a bit more restructuring this should go into svn
Limbic_Region give me your email address so I can give you the commit bit
theorbtwo God no. I hated sales.
Limbic_Region ;-)
me too - but autrijus is quite effective at it
nothingmuch i feel bad about checking in something unreadable
theorbtwo worked at Staples recently.
Limbic_Region ed?
theorbtwo Er, s/recently/shortly/
Limbic_Region didn't work out? 15:07
oh
nevermind
gotcha
theorbtwo I was told that people there thought I was pretty good. 15:08
...after I quit after having a small nervious breakdown.
IshaCocoa_ theorbtwo: Not yet a while. See if I sustain my interest:)
theorbtwo IshaCocoa_: Giving you a comitter bit costs us nothing, and is a good way to sustain your interest. 15:09
I managed to work there by completely supressing myself during working hours as much as I could.
This managed to make me calm and plesant during work hours, and make me have shakes before and after. 15:10
Also, I constantly felt like my work was crap -- my repairs kept not working right, because I rushed through them. 15:11
I couldn't bring myself to sell people stuff that they had no real need for.
luqui It's like trying to convince your friend that java is a good language because your boss told you to 15:13
Limbic_Region I was in telemarketing (credit card sales) for 2 weeks and 3 days
2 weeks was training
theorbtwo Also, I could never find anything in that damn store.
Limbic_Region I had one of the top sales ratings in my group - but my ratio of calls/sales was abysmal 15:14
theorbtwo Customer: "I want one of those". Me: "OK, let me find it." Me, 20 minutes later: "We're out of that, sorry."
Limbic_Region If someone indicated they weren't interested I would hang up right away and go on to the next call
I figured people who wanted it would take less time
theorbtwo (Even though the computer says we have 10... damn if I know where.)
Limbic_Region my superiors didn't like this approach
castaway the computer should say where.. 15:15
theorbtwo Limbic_Region: It's a matter of how much less time vs how many people actually want it.
Yes, I agree. It should.
Sadly, I was their computer repair and a computer sales guy.
Fixing their computer systems to actually do something useful was rather outside the scope of my job.
castaway Staples is a chain, no? 15:16
svnbot6 r4171, luqui++ | Update loop tests.
theorbtwo Yes. A quite large one.
castaway one would think they'd centralise such
theorbtwo I worked at stapes #138. 15:17
Yes, castaway, they did.
There are presently 1,695 stapes stores in four countries. 15:18
Including three in Munich. 15:19
www.staples.de/DEU/StoreLocator/sto....asp?ID=03
</stapesad> 15:20
Blasted stupid build system. 15:21
svnbot6 r4172, jhorwitz++ | * compile methods w/ no arguments
theorbtwo Modifing src/Pugs/Types/Scalar.hs and doing make unoptimized thinks that nothing has changed.
luqui weird 15:23
theorbtwo It's because we #include it into src/Pugs/Types.hs.
castaway rm its .o?
luqui you mean instead of importing it? 15:24
Khisanth hmm 15:26
that pthread.so problem is gone
eric256 i looks like we need a person dedicated to the dailiy updates, autrijus seems a little overloaded lately...or i just got in on the week where he managed to do it all the time so i'm spoiled. lol 15:29
luqui daily updates? 15:31
lathos autrijus' journal
luqui ah yes
nothingmuch lambda the ultimate has a link to a very nice talk about a languge called Slate which does MMD + prototyped OO 15:34
wolverian these guadec videos are _very_ interesting. 15:39
nothingmuch wolverian: link?
luqui beds &
wolverian nothingmuch: stream.fluendo.com/archive/ 15:40
nothingmuch: especially jeff waugh's project topaz (gnome 3.0) speech is illuminating
nothingmuch how many topaz projects are out there?
wolverian (basically: we're too conservative, we don't concentrate on features, so we're changing things, aiming for 10% global desktop marketshare and we're doing it in these ways...) 15:41
nothingmuch from which conf are those? 15:43
wolverian 6uadec kƶnig
this was.. today, I think 15:44
eric256 still wishes method dispatch on class type worked. 15:51
theorbtwo eric256: Not sure what you mean by that. 15:52
eric256 when you overload operators they don't dispatch correctly
multi sub *infix:<+> (Range $range, Int $inc) { is getting called for all addition, not just addition between a range and an Int 15:53
theorbtwo Odd. 15:54
It seems to work OK for Set.
eric256 realy?
theorbtwo ?eval (1..2).ref
evalbot6 ::List
theorbtwo That'd be why. 15:55
eric256 what?
theorbtwo Oh, also, I think Set declares theirs somewhat differently.
It's not a Range, it's just a List.
Unless you didn't mean 1..2 when you said Range.
BTW: Leaving off the parens on that ?eval makes my local pugs hang, or at least take a long time. 15:56
eric256 Range is a class i have defined
theorbtwo Oh, OK.
Check how Set does it?
eric256 odd Set definitly looks like it works.
yea i'll try it there way
hey thats a step in the right direction, but i think that must have gotten fixed just recently 15:57
theorbtwo I seem to recall it did. 15:58
Rather, that the changes to make is export work broke Set, then autrijus fixed it.
eric256 i spoke too soon. that doesn't work still. hmmm 16:01
i put warn "infix called on {$range.ref} and {$inc.ref}"; 16:03
inside that infix + declaration and it produces 16:04
*** infix called on Num and Int
and
*** infix called on Scalar and Int
which obviously don't match the signature...that seems odd
theorbtwo Yes, it seems very odd. 16:07
eric256 pasteling nopaste 16:08
how do you wake that thing up?
gaal eric256, sial.org/pbot/perl6 16:32
svnbot6 r4173, theorbtwo++ | Fix the error for 42 = "a" to point out that the 42 is read-only, not what 17:04
r4173, theorbtwo++ | is being assigned to it.
ninereasons ?eval my %hash = zip 'c'..'f',3..6; %hash<d f> 17:10
evalbot6 [4, 6]
broquaint How do I get this to work? 17:19
?eval sub f($a,$b,$c) { say "$a,$b,$c" } my @a = 1 .. 3;
evalbot6 [1, 2, 3]
broquaint Hrm ...
I get: *** No compatible subroutine found: "&f"
?eval sub f($a,$b,$c) { say "$a,$b,$c" } my @a = 1 .. 3; f *@a; #even
evalbot6 Error: No compatible subroutine found: "&f"
Juerd And if you do f(1,2,3)? 17:20
broquaint ?eval sub f($a,$b,$c) { say "$a,$b,$c" } my @a = 1 .. 3; f(1,2,3); # probably works
evalbot6 Error: No compatible subroutine found: "&say"
broquaint Weird.
Juerd say broken? 17:21
ninereasons all IO broken, for evalbot6
broquaint ?eval sub f(*$a,*$b,$c) { say "$a,$b,$c" } my @a = 1 .. 3; f @a; # this works :/
evalbot6 Error: No compatible subroutine found: "&say"
broquaint ?eval sub f(*$a,*$b,$c) { "$a,$b,$c" } my @a = 1 .. 3; f @a; # this works :/ 17:22
evalbot6 '1,2,3'
broquaint Wah, pugs: cannot cast from VRule ... # no line number :/ 17:25
Is there a way to stringify rules? 17:40
putter I just svn up'ed for the day, and yesterday's work stopped working. (so an unknown pugs of yesterday morn or perhaps the day before). specifically... 18:05
broquaint Working with modules, putter? 18:06
putter in a sub with some internal my subs, the first mysub called is now Undeclared variable: "&tree_id".
broquaint: no modules,
just sub { my sub f {...} my sub g { f } g; } # conceptually 18:07
theorbtwo broquaint: Know way that I know of to stringify a rule usefully... but it should be possible to do it uselessly without getting an internal error. 18:11
broquaint Hrm, fiddly. Can a perl5 regex be used in rules? 18:12
theorbtwo I doubt it.
p5 regexes and p6 regexes, at least as currently written, are very different things. 18:13
broquaint Darn. It also means perl5 regexes can't be used in perl5 regexes either :/
putter hmm... pugs> sub f() { my sub g(){say "g"} my sub h(){g()} h()}
Undeclared variable: "&g"
any miraculous bug report for fix trades? ;) 18:16
eric256 my sub? that is weird syntax 18:20
why not just sub?
theorbtwo eric256: Scope.
eric256 shouldn't the enclosing { } be enough for scope?
hmmm on testing apparently not. odd. that seems counter intuitive 18:21
theorbtwo eric256: normal subs scope the same way they did in p5: sub foo {} is visable everywhere. 18:22
eric256 didn't know that about p5. 18:23
theorbtwo OTOH, there was no way to get a lexically-scoped sub in p5. (Though you could fake it with a lexically scoped reference to a sub.) 18:24
putter cries "dooh!". can live without mysub for today. easier than regressing pugs. eric256++ 18:26
putter goes back to trying to bootstrap p6 rules on pcre...
nothingmuch heya 18:34
seen autrijus
jabbot nothingmuch: autrijus was seen 8 hours 28 minutes 59 seconds ago
nothingmuch wakey time 18:35
putter fyi, re the "my sub" regression, it works in r4070. 18:42
svnbot6 r4174, nothingmuch++ | New multimethod proposal, version 0.0.(1/2) 18:49
eric256 it would be interesting to make something that automaticaly built every revision number and listed all tests that started or stopped working for that version. ;) 18:50
nothingmuch eric256: you can autogenerate YAMLs, and then diff the structure
eric256 YAMLS?
nothingmuch i think rootmj did diffs for a while
see util/smoke_loop.sh, util/yaml_harness.pl, make smoke 18:51
theorbtwo The only problem with doing that is that when tests get moved around, you'll get non-useful output. 19:00
It could work well if you figure tests by file, name tupple, and there aren't too many tests with the same name (including no name). 19:03
putter or just treat file (dis)appearance separately. one can also use "is their diff bigger than the file" to test new/old file approximate eqness. 19:06
theorbtwo The problem is more test (dis)appearance.
Adding a test in the middle of a file, in purticular 19:07
putter ahh. well, all are tests are commented aren't they... ;) 19:10
theorbtwo Make a test yaml and find out. 19:14
putter ok, I'm being blocked by the "hashes magically disolve in singleton arrays" bug. what is the state of objects this afternoon? anyone not/having problems? 19:17
theorbtwo nothingmuch: It looks like a good plan to me.
eric256 some how my 17month old daughter knows exactly which button on the keyboard to hit to put the comptuer to sleep
nothingmuch woah 19:18
i think you need to spend more time in the lawn with her
putter eric256: :)
eric256 its not even a button i ever use. hehe lawn? not until we move and can finaly get a house! ;) 19:19
nothingmuch good luck with it 19:20
putter clarifies - I could switch from hashes and arrays to objects and arrays. but if oo is unstable after the recent changes, then I'll punt...
nothingmuch and i hope it's not too late for her to appreciate sun light ;-)
eric256 sun light? what's that? BTW her mother is 3/4 japanese so she basicaly gets tan just walking outside for a minute....while i burn in about half that time. lol 19:25
nothingmuch heh 19:27
nothingmuch has an amazing tanning spectrum
dad is iraqi, mom is austrian
i can be very dark, or very light, depending on how much time i spend outside
eric256 while I on the other hand can be very white or very soar depending on how much time i spend outside. lol 19:28
theorbtwo generally doesn't pay much attention to his own skin tone. 19:31
nothingmuch is thinking too much lately 19:35
eric256 is there a way to catch the output of system commands yet? 19:37
gaal eric, yes, but not standard 19:44
option 1: 19:45
set @INC to src/perl6 and load Prelude, then use openpipe
this is simple and safe, but isn't finalized yet
option 2:
use the underliying Pugs::Internals::runInteractiveCommand 19:46
it returns a list with four values. 3 handles for stdin of the run command, stdout, stderr; and a Process handle which should be a pid on unix. 19:47
option 2 is faster but will certainly change. option 1 is currently a little slow, but the interface is a little less likely to change. (you will not need to say use Prelude in the future) 19:48
oh, actually the function will be renamed to Pipe.open once namespaces are fixed. (t/pugsbugs/namespace.t)
eric256 cool 19:49
nothingmuch feh, yet another p6l post 19:54
i think this will be around the 8th message warnocked in a row
putter nothingmuch: on the upside, 8 are harder to overlook than 1... ;) 20:13
nothingmuch i'm hoping they are dealt with at some point
broquaint Is this a genuine parse error or a parse bug? if ($a,$b) = func() { ... } 20:18
?eval if ($a,$b) = func() { ... } 20:22
evalbot6 Error: unexpected "i" expecting program reserved word
eric256 ?eval if (($a,$b) = func() ) { ... } 20:32
evalbot6 Error: Undeclared variable: "$a"
Aankhen`` ?eval my ($a, $b); if ($a, $b) = list(1, 2, 3) { "Y" } 20:35
evalbot6 Error: unexpected "i" expecting ";" or end of input
Aankhen`` ?eval $?PUGS_VERSION
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.5, May 24, 2005 (r4158)'
Aankhen`` Still r4158?
broquaint Same behaviour on the latest build. 20:36
It'd be very handy to have a pugs debugger now, I seem to have an infinite loop somewhere. I think.
Aankhen`` G'night. 20:37
vcv-- ?eval 'a'~'b' 20:43
evalbot6 'ab'
vcv-- neato
eric256 ?eval [~] ('a' ... 'z') 20:45
evalbot6 Error: unexpected "(" expecting block construct, operator, ")", ":", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input
eric256 ?eval my @a = ('a' ... 'z'); [~] @a; 20:46
evalbot6 Error: unexpected "'" expecting operator or ")"
eric256 hmm. odd
?eval my @a = (1 ... 10); [~] @a;
evalbot6 Error: unexpected "1" expecting operator or ")"
eric256 ?eval my @a = (1...10); [~] @a;
evalbot6 Error: unexpected "1" expecting operator or ")"
eric256 ?eval my @a = (1..10); [~] @a;
evalbot6 '12345678910'
eric256 that seemed odd. parse errors?
?eval my @a = ('a'..'z'); [~] @a; 20:47
evalbot6 'abcdefghijklmnopqrstuvwxyz'
eric256 there we go ! ;). it is getting a bit picky about spacing 20:48
nothingmuch blah 21:13
vcv-- ?eval my @a = ('a'..'z'); @a >>~<< ','; 21:15
evalbot6 ('a,', 'b,', 'c,', 'd,', 'e,', 'f,', 'g,', 'h,', 'i,', 'j,', 'k,', 'l,', 'm,', 'n,', 'o,', 'p,', 'q,', 'r,', 's,', 't,', 'u,', 'v,', 'w,', 'x,', 'y,', 'z,')
eric256 nice 21:20
a join operator ;)
vcv-- ?eval my @a = ('a'..'z'); *(@a >>~<< ','); 21:21
evalbot6 ('a,', 'b,', 'c,', 'd,', 'e,', 'f,', 'g,', 'h,', 'i,', 'j,', 'k,', 'l,', 'm,', 'n,', 'o,', 'p,', 'q,', 'r,', 's,', 't,', 'u,', 'v,', 'w,', 'x,', 'y,', 'z,')
vcv-- darn
one last one
?eval my @a = ('a'..'z'); [~] (@a >>~<< ',');
evalbot6 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,'
pasteling "nothingmuch" at 212.143.91.217 pasted "warnocking =(" (12 lines, 475B) at sial.org/pbot/10595
nothingmuch ?eval sub join (*@strings 21:22
evalbot6 Error: unexpected end of input expecting word character, trait, ",", ":" or ")"
nothingmuch ?eval sub join ($sep, *@strings) { [~] (@a Y ',') }; join(",", 'a'..'z') 21:23
evalbot6 Error: Undeclared variable: "@a"
nothingmuch ?eval sub join ($sep, *@strings) { [~] (@strings Y $string) }; join(",", 'a'..'z')
evalbot6 Error: Undeclared variable: "$string"
nothingmuch ?eval sub join ($sep, *@strings) { [~] (@strings Y $sep) }; join(",", 'a'..'z')
evalbot6 'a,bcdefghijklmnopqrstuvwxyz'
nothingmuch ?eval sub join ($sep, *@strings) { [~]@strings Y ($string xx +@strings) }; join(",", 'a'..'z')
evalbot6 Error: Undeclared variable: "$string"
nothingmuch ?eval sub join ($sep, *@strings) { [~] @strings Y ($sep xx +@strings) }; join(",", 'a'..'z') 21:24
evalbot6 ('abcdefghijklmnopqrstuvwxyz', ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',', undef, ',')
nothingmuch damnit
?eval sub join ($sep, *@strings) { [~] (@strings Y ($sep xx +@strings)) }; join(",", 'a'..'z')
evalbot6 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,'
lathos Urgh.
nothingmuch ?eval sub join ($sep, *@strings) { [~] (@strings Y ($sep xx +@strings - 1)) }; join(",", 'a'..'z') 21:25
evalbot6 'a25bcdefghijklmnopqrstuvwxyz'
nothingmuch there we go.
haha
i think that's a bug
?eval sub join ($sep, *@strings) { [~] (@strings Y ($sep xx (+@strings - 1))) }; join(",", 'a'..'z')
evalbot6 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z'
vcv-- Hm, maybe #pugseval is in order ;) 21:26
nothingmuch =)
evalbot6: ?eval command is only available in public channels 21:27
maybe that fix is better?
vcv-- Yeah, that too :p 21:28
nothingmuch i like defining builtin ops 21:29
eric256 yea. it would seem if they are all implemented in perl then the docs could include the actual definition of it which would help people understand them better. ;) 21:30
nothingmuch sub infix:<*> ($x, $y) { [+] $x xx $y };
not only that
if all the ops are defined in terms of each other
as fallbacks
we can autogenerate roles, by letting the role supply only one of them
and figuring out the rest
especially for math stuff
vcv-- sub infix:<*> ($x, $y) { [+] $x xx $y }; <--is that really a good idea?? 21:31
nothingmuch ordinality stuff
eric256 later
vcv-- so there will be a heavy dependency between the built-in ops
nothingmuch vcv-- i doubt it, but what does it matter? it's nice mental masturbation
vcv--: no, the builtin ones will be implemented in PIR, or even machine code
vcv-- Yes it is.
lathos Also, that screws up overloading. 21:34
nothingmuch lathos: how?
lathos Well, if you're expecting a * method to be called and you get lots of + methods instead, you're not going to be doing the right thing.
vcv-- Hm. So there is no op for join is there? 21:35
nothingmuch if it's really *, then isn't it just a bunch of +?
in theory
or rather, when it's pure 21:36
if it isn't it's your responsibility to do your own *
personally I'm not sure that generic impls are really good in practice
since they are basically junk 21:37
but I don't think that overloading is the reason
anybody got an opinion on mmd.kwid?
perlbot seen autrijus 21:51
svnbot6 r4175, putter++ | Added pugsbugs/lexical_subs.t, showing recent "my sub" regression.
nothingmuch seen autrijus
jabbot nothingmuch: autrijus was seen 11 hours 45 minutes 28 seconds ago
nothingmuch sleepy head
svnbot6 r4176, putter++ | Minor improvement / typo correction. 21:56
r4177, putter++ | Added pugsbugs/rx_perl5_match.t. An unmatched capture returns true. 22:11
r4178, putter++ | Added failing tests to mixed_multi_dimensional.t, showing hash references being decomposed in singleton arrays. 22:27
22:29 Limbic_Region_ is now known as Limbic_Region 22:46 broquaint_ is now known as broquaint
putter This is a bug, yes? pugs> my $u; $u.elems 23:03
1
jql aww crap
Khisanth I think that is a yes
putter I'll add a test to undef.t. 23:05
Thanks for your help.
jql pugs> my @u; [\@u].elems 23:06
0
jql frowns
?eval 1 23:07
evalbot6 1
jql ?eval my @x; [\@x].elems
evalbot6 0
putter jql: I noticed something similar with hashrefs earlier.
jql yeah, we were chatting about it last night too 23:08
putter ?eval my @x = (4,5,6); [\@x].elems
evalbot6 3
jql the auto-flattening issue still needs working out. lotsa tests
Khisanth hrm why are they autovivifying like that? 23:09
jql ?eval my @x; [*@x].elems
evalbot6 0
jql ?eval my @x = (1,2,3); [*@x].elems
evalbot6 3
putter I wonder if it would help to have a TESTS_WANTED file, listing places where testing is known to be weak. 23:10
Folks simply interested in writing tests would then not need to first, explore the test tree, recognize and confirm test gaps, and decide where to put them. Simply "add tests of foo to file bar". 23:11
jql "add tests of list/hash flattening behaviou?r to t/?" 23:12
putter or perhaps even better, add tests of l/h fb (pointer to documentation of same) to t/specific_file. basically separating the work requiring a big picture grasp from the groveling. 23:14
jql I see your point
putter could develop a test community analygous to current dev community... trade one paragraph description of desired tests for test file. ;) 23:15
Darren_Duncan regarding the "my $u; $u.elems" returning 1, what did you expect to happen? 23:26
a scalar is always 1 in size, I think 23:27
whereas a list or array or hash can be zero or up
jql I'm not so concerned about that. I could learn to accept it if it's declared Correct. It's pugs> my @u; [\@u].elems 23:29
that disturbs me
putter Darren_Duncan: are scalars 1-ary sequences? 23:30
Darren_Duncan in my mind they are
putter that's a plausible approach, though there is a bit of friction with array autovivification.
jql I imagine .elems coerces List context on its LHS. $x.elems =:= ($x).elems
Darren_Duncan I never liked autovivification 23:31
jql not that () does anything
just for illustrative purposes there
Juerd Darren_Duncan: Lack of autovivification is the one thing that keeps me from really trying ruby
It's so painful to construct every collection manually.
putter autovivification can be immensely useful. it would also sometimes be immensely useful to turn it _off_. 23:32
Darren_Duncan I prefer to do it manually because it can reduce errors
I liken autovivification use to writing perl without use strict
its like simply using a variable without declaring it first
putter spent a block of time yesterday tracing down where unguarded tests on hashes were mutating them, causing hash lookup failures. :( 23:33
Darren_Duncan its also odd because anywhere else you would get an error trying to dereference an array/hash ref that isn't defined 23:34
putter err, that second "hash" meant "reduce the hash to a ...err, hash, and use it as an index".
Darren_Duncan only in an array of arrays etc will it just create the inner array for you on reference; thats what I see autovivification being
but without the outer array, if you had a scalar instead, it would give an error 23:35
jql my $x; $x[0] = 1; $x[1]<foo> = woot;
Darren_Duncan I see this as inconsistent
I'm refering to p5 behaviour btw
putter ah.
Darren_Duncan and unless I hear otherwise, its as if p6 is emulating it by default
following jql's example, I like to explicitly say "$x[1] ||= {};" between the above two lines 23:37
assuming the hashes weren't known to be made in advance, such as with many dynamic operations 23:38
jql the problem in perl5 was making my $x; for($x<y><z>) { $_ = 10 } work
for some definition of "work"
in perl6, I'd imagine autovivification would be implemented with let() or something 23:39
Darren_Duncan I'm okay with autov being supported, if the user explicitly requests it; by default it should not happen 23:40
autrijus 07:33 < Darren_Duncan> I see this as inconsistent 23:41
Darren_Duncan yup
autrijus well, it is consistent in a way; only undef gets autov. 23:42
that's essentially what it is: a container that is undef is polymorphic over its container type.
obra hey autrijus
autrijus it is potentially a reference for any(Scalar, Array, Hash)
hey obra. I slept 13 hours!
obra autrijus: nice! 23:43
autrijus obra: how's life? 23:46
obra neck hurts.
autrijus ew.
obra glasser got the first version of DBIx::SearchBuilder::SchemaGenerator checked in
so soon, factory dies and the perl becomes canonical for new apps 23:47
autrijus (and my G3 went away during my sleep -- zonble's computer got stolen and I apparently gave it to him when he asked during my dreams)
Darren_Duncan good for 'im
I plan to do SQL::Routine and friends any day now
once LKT is known working
obra (for those playing the home game, we're not talking about perl6)
svnbot6 r4179, autrijus++ | * remove unused variable bindings in Pugs.Types.Scalar.
r4180, autrijus++ | * Pugs.Compile.Pugs2: for releng, before SamB gets next batch
r4180, autrijus++ | of tuits, we comment out all unused var bindings.
obra autrijus: will you be able to test on whiteg's laptop or somesuch? 23:48
clkao hola autrijus
autrijus: hey, take a look at the failing tests in unspecced/p5/ 23:49
Darren_Duncan so autrijus, about that polymorphic undef thing, does that mean I can do this ...
my $foo; $foo[1] =3;
?
SamB hmm, about Pugs.Compile.Pugs2, Language.Haskell.Syntax is quite cumbersome... 23:50
clkao autrijus: btw i've got perl5_apply returning av, you should be able to do stuff in haskell land
Darren_Duncan back shortly
SamB I even tried it with Language.Haskell.Hsx.Build and it was STILL too cumbersome.