Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net Set by stevan on 15 August 2005. |
|||
stevan | putter: pong | 00:20 | |
buu | stevan: Explain that -- | 00:21 | |
stevan | buu: explain what? | ||
buu | stevan: \-1.0 ? | ||
stevan | buu: I have no idea | ||
buu | =[ | 00:22 | |
stevan | ?eval my $a = 0; $a--; | ||
evalbot_7085 | 0 | ||
stevan | ?eval my $a = 2; $a--; | ||
evalbot_7085 | 2 | ||
stevan | ?eval my $a = 2; --$a; | ||
evalbot_7085 | 1 | ||
stevan | buu: the difference in your results can probably be explained by evaluation order | 00:23 | |
as for the why you get \-1.0 I have no idea | |||
buu | stevan: Right, the first one was a mistake. | ||
stevan | buu: I am not sure what the state of type coercien is in Pugs | 00:24 | |
?eval my $a = 2; --$a; $a | |||
evalbot_7085 | \1 | ||
stevan | ?eval my $a = "a"; --$a; $a | ||
evalbot_7085 | \-1.0 | ||
stevan | ?eval my $a = "a"; --$a; | ||
evalbot_7085 | -1.0 | ||
stevan | ?eval my $a = "z"; --$a; | ||
evalbot_7085 | -1.0 | ||
stevan | hard to say, I am not familiar with the internals much these days | 00:25 | |
putter | stevan: pong? | 00:33 | |
stevan | hey putter | ||
putter | hi stevan | ||
stevan | I am looking over Perl6::(Value&Contanier) as well as PIL-Run | 00:34 | |
putter | how much of mm2 works now, compared with mm1? | ||
stevan | well, most of it I think | ||
there are some changes | |||
putter | questions welcome. the code has gotten a bit crufty. | ||
stevan | looks like most of those will effect Perl6::(Value & Container) more though | ||
putter: to be honest, I dont know enough about PIL and all that to really grok what is going on in PIL-Run | 00:35 | ||
putter | I've been trying to keep the P6::V/C interface concentrated in ApiX, but it's leaked out a bit. | ||
well, let's see... | 00:36 | ||
lib6/Test.pm is a simple version of Test, tuned to what is/isnt working in pilrun at any moment. the regular Test.pm is just to complex. | 00:37 | ||
lib6/P5Runtime/PrimP6.pm is just some primitives, implemented in regular p6. the equivalent of pugs's src/perl6/Prelude.pm | |||
svnbot6 | r7086 | putter++ | PIL/Run/ApiX.pm: implemented parameter default value. Param->new() is now called with invocant/lvalue/lazy/named/writable flags, though Code.pm does not yet implement them. | ||
putter | crude_repl.pl is the "main" program. but is mostly just a read-eval-print-loop, and some command line argument handling. | 00:38 | |
lib/PIL/Run/MainX.pm require/use's everything | 00:39 | ||
stevan | EvalX? | ||
it looks like it is doing the PIL -> PIL-Run conversions | |||
putter | lib/PIL/Run/Type/Macro.pm and Object.pm are leftovers from when P6::V/C weren't used. They still dont have a Macro, but one could/should(?) create a Macro is Sub and finish throwing away lib/PIL/Run/Type/. | 00:41 | |
lib/PIL/Run/PrimP5.pm is some primitives writen in mutant p6/p5. the sub arguments are p6, the bodies are p5. | 00:42 | ||
it's the equivalent of Prim.hs | |||
lib/PIL/Run/ApiX.pm provides a bunch of p6_mumble functions, intended to (mostly?) wrap the runtime and mm. to keep design decisions localized, simplify swapping them, etc. | 00:43 | ||
lib/PIL/Run/Root/ is nothing. well, its currently the root of the P6 namespace in p5 space. but no files go there. | 00:44 | ||
stevan | yup I saw that one | 00:45 | |
ok, well I think mm2.0 might be ready for experimentation | |||
I am not sure it has all the features from 1.0 yet | 00:46 | ||
and some things have changed | |||
I was going to try and convert chromatic's Test::Builde to MM2.0 and see what happens | |||
putter | lib/PIL/Run/EvalX.pm has the PIL node classes, which just provide ->expand() which yields p5 code. and a couple of functions at the bottom to take p6, call pugs, get pil, eval it, expand() it, and eval the p5. There is some initialization cruft at the very bottom, which should probably go elsewhere. | 00:47 | |
and just to wrap up, lib/PIL/Run/Match.pm is the Match objects returned by regexp matching. It probably belongs in P6::Value. | 00:48 | ||
ok... | 00:49 | ||
stevan | so what is class support like in PIL | ||
IIRC is wasnt that great | |||
putter | no... | 00:50 | |
the key thing is you find out about classes incrementally. an accessor method shows up. another method. at some point you see a... | |||
stevan | ok, well the MM can support that | 00:51 | |
just dont use the class 'Foo' => { } stuff | 00:52 | ||
putter | &Class::_create('C') or Role::_create or whatever. A hack to tell the runtime its a Role/Class/Package/etc. | ||
stevan | and build the classes manually | ||
One major difference is that I dont use p5 symbol tables for classes | |||
putter | though one could grovel over the pil looking for Mumble::_create('Foo') flags if one needed them ahead of time. | ||
stevan | I am not sure how much of an issue that might be | ||
putter | hmm... currently name lookup works like | 00:54 | |
stevan | it doesnt | ||
classes are just scalars | |||
name lookup can be added | |||
putter | (defined($scalar_xxx)?$scalar_xxx:p6_lookup('scalar_xxx',1)||do{warn "autovivifying scalar_xxx\n" if $main::global_debug;$scalar_xxx = Scalar->new()}) | 00:55 | |
Ie, try a lexical $scalar_xxx or $array_xxx or etc, and if there isnt one, call a package-local-sub p6_lookup(), which then crawls up the package tree looking for it. | 00:56 | ||
and in this case, autovivifies it if it isnt found | |||
stevan | ok | 00:57 | |
putter | so if each class has some package associated with it (which the p6_mangle()r can rename vars to), p6_lookup could hook into the mm. either with the mm providing lookup, or providing a list of package names to check. | 00:58 | |
stevan | mm2.0 implements it's own ::Package | 00:59 | |
putter | ie, in A::B::C, $x is searched first in C, then B, then A, then *. | ||
so if the mm says ['A::B::C','A::B','A','*'], or perhaps their mangled forms, then p6_lookup could take it from there. | 01:00 | ||
stevan | I will need to think about this | 01:01 | |
the MM2.0 really tries not to use any p5 packages at all | |||
all package use is in chaos.pl | |||
putter | though given $X::y , $y has to be searched for in A::B::C::X, A::B::X , "A::X", "X" the last time I checked (a while ago) | 01:02 | |
stevan | it is mostly to either 1) tag types so I can check them with blessed() and 2) provide a place for the dispatcher to exist | ||
putter | that's fine, | ||
stevan | putter: I am not sure I understand the way you are nesting packages | ||
are those scopes? or package namespaces? | 01:03 | ||
stevan thinks maybe he should read more of PIL-Run | |||
putter | pilrun could provide the mm-to-pkg link. like it does now. | ||
re nesting, | |||
my fuzzy recollection of namespaces, perhaps now obsolete as there have been changes, is given package A{package B{package C{say $X::y;}}}, | 01:04 | ||
one looks for $y in... A::B::C::X, A::B::X , A::X, X. | 01:05 | ||
stevan | oh yes,.. I think you are right on that | 01:07 | |
although the Apoc are supposed to be very very out of data | |||
date | |||
and they are very sparse on package/module information | |||
it is not a "fun" topic I think | |||
putter | it would be nice if the mm provided a "list of names of classes in currently lexical stack", or perhaps even better, a "given a variable name, a list of classes to check for it in". that way, when p6l changes things, only the mm needs to be updated :). | ||
right now it's just hardwired into p6_lookup(). check self, parent package, parent's parent, etc, up to root. | 01:08 | ||
s/self/current pkg/ | 01:09 | ||
soo... what does Package etal do in the way of namespace support? vars? subs/methods? multimethods? | 01:10 | ||
stevan | multi-methods are provided by Class::MultiMethods::Pure | ||
putter | our $var;? | 01:11 | |
stevan | all the multis are inside a single sub,.. which makes them easy to deal with | ||
nope | |||
well,.. yes and no | |||
I was talking with autrijus about this | 01:12 | ||
we decided that my's would be block/file scoped | |||
and that the package need not know about them | |||
putter | k | ||
stevan | and our's would be my's which also had an alias in the package namespace | ||
so | |||
this means I only support ours | |||
putter | hmm... are non-code vars importable? | 01:13 | |
stevan | my $FooPkg = $::Package->new('$:name' => 'Foo'); | ||
then you do: | |||
$FooPkg->STORE('&foo' => sub { ... }); | |||
then $FooPkg->FETCH('&foo'); | |||
I do manage the magical $?PACKAGE variable for it with the MM | |||
putter: any type of var is supported | 01:14 | ||
I dont check anything though | |||
so you can stick a hash in a slot with a @sigil | |||
also,.. ::Module, ::Class and ::Role all implement the FETCH and STORE | 01:15 | ||
(actually ::Role doesnt yet, but the stub is there) | |||
putter | our $x; ==> $FooPkg->STORE('$x', ... Scalar->new() ? Int->new() ? | ||
stevan | ::Class->FETCH('$.var') returns the meta-attibute | ||
putter yes, that would be it | |||
actually more like this | 01:16 | ||
package Foo; our $x; | |||
putter | hmm... getting the package name, full and short, back from a package object? | 01:17 | |
stevan | $FooPkg->name gives you the short | ||
putter | and is there any connection between package objects. eg, those for A::B and A? | ||
stevan | Packages dont have long names though | 01:18 | |
putter | err, "A::B::C"? | ||
stevan | $FooPkg->STORE('::Bar' => $::Package->new('$:name' => 'Bar')); | ||
rafl | j #madwifi | ||
putter | ah, ok | ||
rafl | Whops. | ||
putter | :) | ||
ok, so given that Bar Package, can one crawl up link to FooPkg? | 01:19 | ||
or otherwise get "Foo::Bar" | 01:20 | ||
stevan | nope, not really | ||
putter | (the string/name) | ||
stevan | ::Package is not very fleshed out yet | ||
putter | k | ||
stevan | I suppose that could be done | ||
I just need to think about it | |||
putter | ok... so my initial straman idea is to have a package PkgNNNN associated with each Package. PkgNNNN::p6_lookup($var) gets the lexical context, a list of Package's, or their names, from it's associated Package. | 01:23 | |
hmm... but since Package/etal will handle any import issues, I think its FooPkg->give_me_packages_to_look_for('$x') | 01:25 | ||
or better, especially if import does renaming, give me a list of absolute varnames to check. | 01:26 | ||
stevan | Module does the export stuff | 01:27 | |
Package is really just a dumb namespace | |||
putter | so MumbleBar::p6_lookup('$x') calls BarPkg->look_where('$x') and gets back ['$Foo::Bar::x','$Foo::x','$*x'] | 01:28 | |
ok, but hopefully they all have the same api. | |||
stevan | yes, they all use FETCH/STORE | 01:29 | |
though I need some other things to list all the items in the namespace too | |||
putter | ok, let's see.... | 01:30 | |
oh, you mentioned some things had changed from mm1. could you summarize? | |||
api wise | 01:31 | ||
stevan | the lack of packages is a big thing | ||
there is no more MetaClass | |||
Perl6::Object is now $::Object | |||
MetaClass is now $::Class | 01:32 | ||
calling class methods requires the use of a pseudo-package | |||
$Foo->class::bar(); | |||
and $Foo->meta has gone away | |||
$Foo is the meta already | |||
putter | how badly do we loose if for class C{has $.v}, a C::v method is created but no other note is taken of v's existance? | 01:35 | |
actually, looking at the pil, it will be possible to figure out what's an attr. sigh. I look forward to pil2. | 01:37 | ||
re PIL, if you want to see the PIL for anything, you can do | 01:39 | ||
./pugs -B JS | |||
jspugs> :pil.yaml class C{has $.v} | |||
ok, are there any questions I should have asked but haven't? | 01:41 | ||
:) | |||
stevan | :) | ||
no idea | |||
putter | ok... | ||
stevan | I will look over stuff more,.. and think about expanding upon Package's API | ||
putter | I was thinking of enabling method foo() is perl5 { q!print $SELF->name()," in p5 code\n";! } and then generating Int/Num/etc/etc from normal p6 files, with the backend creating the appropriate MM stuff. Rather than using hand edited p5 files. Thoughts? | 01:44 | |
Any downside immediately apparent? | 01:45 | ||
Ie, P6::Value/Container would become a Prelude.p6, with some embedded p5 use. | 01:47 | ||
stevan | putter: I really am not familar enough to answer in any meaninful way | 01:49 | |
and I am being called by my wife,.. movie time | |||
putter: I will read more of the code tomorrow and have some more questions then | |||
stevan & | |||
putter | thanks! | 01:50 | |
thanks stevan. | |||
02:07 | |||
Does p6 oo support preemptive mixins. Ie, class C does/is D, and if there is a conflict, _D_'s version takes priority. Rather than the usual inheritanc C-has-priority, or Rule mixin cry-conflict. | 02:09 | ||
s/\./??/ | 02:10 | ||
It simplifies C is D is CTemplate. Especially if C can be parameterized on D. | 02:12 | ||
&] | 02:19 | ||
buu | ?eval 1 | 03:05 | |
evalbot_7086 | 1 | ||
buu | ?eval say 1 | ||
evalbot_7086 | 1 bool::true | ||
buu | hrm | ||
f0rth | ttttttttt | ||
svnbot6 | r7087 | fglock++ | * perl5/Hash - an Array or a Pair can be stored into a Hash | 03:54 | |
r7087 | fglock++ | %a=(1=>2) works now | |||
KD6PAG | Q: Anyone have know where there's sample code that would allow me to do a POST operation with a type="file"? | 03:55 | |
obra | KD6PAG: see #perlhelp | 04:11 | |
buu | There's a #perlhelp?! | 04:23 | |
xinming_Beijing | buu: hmm, I think you should try #perl | 04:29 | |
buu | Why/ | 04:33 | |
(It turns out there really is a #perlhelp, with all of 3 people) | 04:34 | ||
gaal | morning! ah, missed putter :( | 05:42 | |
autrijus | going to airport in 30 minutes | 05:49 | |
it seems that erik meijer is doing some most amazing work in his language-of-choice that is VB | |||
gaal | autrijus, .es? | 05:50 | |
autrijus | with lambda expressions, query combinators, local type inference, etc | ||
gaal | eirk meijer, isn't he the function guy with the yellow flower? | ||
autrijus | .ee yes | ||
gaal | ee, yeah | ||
autrijus | I don't remember the yellow flower, but likely yes | 05:51 | |
his work is under the LINQ banner | |||
gaal | there's a "Hugs98 for .NET" link on his home page :) | 05:52 | |
autrijus | # msdn.microsoft.com/vbasic/future/de...erview.asp | ||
also the equivalent of $obj.$method | 05:53 | ||
05:54
xinming_Beijing is now known as xinming
|
|||
xinming | autrijus: Hi. :-) | 05:54 | |
autrijus | hi xinming | 05:55 | |
GeJ | heya all. | 05:56 | |
gaal | any general tips on debugging monadic code? | ||
autrijus | gaal: isolate them into small functions and write unit or quickcheck tests for their behaviour? | 05:57 | |
xinming | autrijus: I've brought A3E in BeiJing. :'( There is no M2C or M2N left for me... | ||
autrijus | failing that, liftIO (print) | ||
gaal | autrijus: that you can do Select in the language is quite amazing | ||
autrijus | xinming: aw. does it work okay? | ||
gaal: it's just sugar for .Select(c => c.foo) | |||
gaal | well! that's something too (to get Dim to answer to .Select) | 05:58 | |
xinming | autrijus: hmm, Well, Except the speed... I think It performs much poor than yours. :'( | ||
autrijus: by the way, How much does your laptop cost? | |||
autrijus | .select:{.foo, .bar}.where:{.val < 10}.orde_rby:{.baz} | ||
xinming: ntd$40k I think | 05:59 | ||
xinming | autrijus: I've just done setting up the Linux System... Might be back for soon... | ||
autrijus | gaal: the amazing thing to me is that they made the query combinator range over objects, XML and relational DB as domains | ||
it's like Class::DBI done right ;) | |||
xinming | autrijus: ??? How much Us dollars? :-S | ||
obra | autrijus: sample code? | ||
xinming: divide by 33 | |||
autrijus | obra: msdn.microsoft.com/vcsharp/future/linqsamples/ | 06:00 | |
obra just got suckered into the new laptop game too :) | |||
autrijus | they are in C# but it's just sugar; the underlying dynamism and inferrence works for all CLR languages | ||
erik mentioned on LtU that most of the stuff is ported en masse from HaXml and HaskellDB etc | 06:01 | ||
which, if true, is very exciting. | |||
xinming | I bought my laptop too expensive maybe... - -b | 06:02 | |
obra gets excited for hot new language features | 06:04 | ||
autrijus | oh, apparently they range over WinFS too | ||
gaal | why not XPath? | 06:05 | |
they have sometihng like template::extract to query xml | |||
autrijus | gaal: this to xpath is like XML::Twig to xpath | ||
gaal | re: your remrk autrijus from the other day about parsers not being symmetrical with queries | ||
(hoping i got that right) | 06:06 | ||
autrijus | nod. I remember XQuery | ||
but you can't use XPath/XQuery as a templating language | |||
you need XSLT for that which is nonreversible | 06:07 | ||
gaal | I'm not sure I understand the analogy viz. XML::Twig.. | 06:08 | |
they have the example Dim CountriesWithCapital As XElement = (reverse template) | |||
i should study what they're doing more, probably, | 06:09 | ||
but if it's a *query* then a reverse template is certainly quick to write, but an xpath expression is probably more powerful? | |||
but never moose, I'll read this more carefully while you're on the plane :) | 06:10 | ||
autrijus | moose :) | 06:11 | |
gaal | soon in an Acme::MetaSyntactic module near you :-) | ||
masak | :) | 06:16 | |
masak still hasn't really figured out what this "moose" is | 06:17 | ||
gaal | forum2.org/moose/ | ||
masak reads | |||
weird | 06:19 | ||
and i don't really see how it relates to XSLT :) | 06:21 | ||
or is "never moose" just a silly expression? yeah, probably | |||
ok, never moose :P | 06:22 | ||
gaal | meditate on it and you'll see it | ||
you're certainly getting there :-) | |||
hcchien | I saw the control quickref, and interesting in "for @foo -> $x, $y, $x { ... }". how does it work? | ||
autrijus | hcchien: it counts arity of the lambda argument, see 3, then take 3 a time | 06:23 | |
hcchien | autrijus: yes. I think so. but $x will be 1, 4, 7 if the array = (1..10) | ||
won't 3, 6, 9 overwrite the $x? | 06:24 | ||
autrijus | I think it should be an error myself :) | ||
masak | nod | 06:25 | |
having the same argument twice leads to insanity | |||
and why would one want to? | |||
gaal | i can imagine using undef to skip args | 06:26 | |
hcchien | if I just want to skip the first one? :-) | ||
autrijus | or _ | ||
but undef is more perl6ish | |||
I mean perlish | |||
but I need to run | 06:27 | ||
see ya again in a day | |||
gaal | for @foo -> undef, $x, $y -> { ... } | ||
autrijus waves & | |||
gaal | bye a | ||
_ will end up synonymous with undef :) | |||
(actually, no, undef in some places, Any in others...) | 06:28 | ||
masak | ?eval my @a = 1..10; for @a -> $x, $y, $x { say $x } | 06:29 | |
evalbot_7087 | 1 4 7 Error: Insufficient number of required parameters: 1 actual, 2 expected | ||
masak | ha-haa! | ||
?eval my @a = 1..10; for @a -> undef, $y, $x { say $x } | |||
evalbot_7087 | Error: unexpected "f" expecting ";", statements or end of input reserved word | ||
masak | aww :( | ||
add a test? :) | 06:30 | ||
hcchien | hmm...., _ doesn't work for me. | ||
masak | hcchien: i don't think it should | 06:31 | |
gaal | i think it's not specced, so p6-l it first? (better check the synopses first) | ||
masak | all of them? that's like, O(n) | ||
gaal | hccien, it shouldn't work... it's how that kind of thing is spelled in haskell | ||
masak, heh, no, s04 should be enough :) | 06:32 | ||
hcchien | oh, right. so autrijus said that undef is more perl6ish. | ||
masak | gaal: oki :) | ||
hcchien | but evalbot doesn't like undef.... :-) | ||
gaal | hccien, right, i was joking about how p6-l posts from people like yuval and luke are getting haskellish | 06:33 | |
masak, `The "for" statement` doesn't mention it.. i'd look for the definition of pointy subs, maybe s06 | 06:34 | ||
masak | hcchien: no, it's not a feature that's in perl6, yet. i'm going to suggest it on the mailing list | ||
gaal: oki | |||
gaal | .....which doesn't mention it either :) p6-l query time i think. | ||
masak | yep, i'm on it :) | ||
gaal | masak++ | ||
hcchien | masak++ | 06:35 | |
and pugs won't supprt for (;;) anymore? | 06:38 | ||
gaal | oh, see the "loop" statement | 06:42 | |
in s04 i believe. | |||
yes, s04. loop $i = 0; $i < 10; $i++ { ... } | 06:43 | ||
you can also spell infinite loops as loop { ... } | |||
hcchien | oh, ok. I saw that. | 06:44 | |
masak | gaal: henceforth, i will mercilessly exploit you as my index for synopses :P | ||
at least s04 and s06 which you seem to know well | 06:45 | ||
gaal laughs | |||
masak | does @_ still contain all the arguments in a sub in p6? | 07:05 | |
if i write a sub which sometimes takes a hashref as a first argument, and sometimes not, is that a good time to use a multi sub? | 07:09 | ||
gaal | masak: @_ still contains them all | ||
and probably yes :) | 07:10 | ||
but currently at least, @_ is only defined if you don't provide an explicit signature | |||
i don't know if this is specced actually. | 07:11 | ||
but s06 will tell you :) | |||
masak | :) | 07:12 | |
reason i'm asking is, i've started to look at GetOptions in Getopt::Long, and it does a lot of @_ checking | 07:13 | ||
i'm thinking of the best way to p6ify those idioms | |||
gaal | that's a sure sign you want multis with explicit args. | ||
masak | i think so too | ||
a lot of code will just disappear into signatures :) | |||
gaal | i gave a talk in my local pm group about p6 for p5 programmers | 07:14 | |
the warmup was about function sigs | |||
shooting fish in a barell | |||
barrel even. | 07:15 | ||
GeJ | gaal: in your post yesterday you suggested that one might not expect the arguments/options to parse to not necessarily belong to @ARGV, I'm a little lost there. Do you have an example in mind? | 07:16 | |
masak | shooting fish in barrel? is that a classic example? | ||
GeJ | s/belong to/come from/ | ||
gaal | GeJ, one example is tests. you want to enter the getoptions function many times; setting a global var each time is, well, quaint but not pretty. | 07:17 | |
another example is when you provide a CLI of your own from within a tool | |||
eg., something with a "console". | |||
masak, what i meant is that the talk was intended to show people who already like p5 why p6 is better/needed | 07:18 | ||
and we've developed blindness to many quirks and misfeatures | |||
nothingmuch | morning | 07:19 | |
GeJ | morning nm | ||
masak | morning | ||
gaal | function sigs save you (well, me) from the stupidest bugs, and save lots of typing | ||
they have other benefits as well of course :) | |||
(reflection) | |||
heya nuffin | |||
GeJ | gaal: hum, I see... interesting, didn't think about this one. Something I'll have to keep in mind as I'm considering doing a small CLI client for a project I'm working on. | 07:20 | |
gaal | so take a bunch of "we're doing just fine" p5 programmers, who might be worried about their significant investment in p5 | ||
and get them to like p6 | 07:21 | ||
masak | gaal: luke palmer took your _ joke seriously. that's sort of funny in itself | ||
gaal | not hard really, since p6 really is wonderful :) | ||
'tis. :) | |||
GeJ | Well, I know that to some people around here, damian is not the more popular person in the world, but his IO::Prompt seem sexy enough to give it a try. I wonder how he handles this. | 07:22 | |
gaal | Damian's great! His code's just hard for mortals to understand. | 07:24 | |
GeJ nods | |||
gaal | GeJ: you can completely frontend GetOptions with something that does the @ARGV localization for you. Trivial code, makes your client code much prettier | 07:26 | |
in a p6 version we'll just have multi sub GetOptions(%spec, ?@source = @*ARGS is rw) returns Getopt::Long | 07:28 | ||
GeJ | masak: you're on this? | 07:29 | |
gaal | hmm, need to be clever with the other variant so that GetOptions(opt1 => $target.... source=>@*ARGS) doesn't preclude an option called "source" | 07:30 | |
masak | GeJ: sort of, still muddling over it, but yes | 07:32 | |
GeJ | m'kay | 07:33 | |
gaal | [very off topic] say, anyone know the reason for the naming of java's reflection "forName" method? what does "for" signify there anyway? | 07:35 | |
nothingmuch | Base64.t still hangs | ||
GeJ | I saw that Mister A. set the 6.2.10's poem. A release schedule is planned already? | 07:37 | |
gaal doesn't know | |||
GeJ | Just to be sure, a Haskell guru will implement stevan's MM2 into Pugs, and then all (or most of if @Larry decide to change things) the OOP syntax will be available. Am I correct? | 07:41 | |
That's the way I understood it. MM and then MM2 was sort of a blueprint for autrijus to code it in Haskell. But I'm prolly wrong. | 07:43 | ||
gaal | yes and no; having much of the implementation in Perl means other compiler implementations can reuse it | 07:45 | |
nothingmuch coughs | 07:47 | ||
gaal | what? | 07:50 | |
nothingmuch | the Blondie project is all about that | 07:51 | |
have the language define the prelude by itself | |||
(horribly inefficient, but reusable and useful) | |||
and have the compilers provide builtins for prelude functions as they see fit | |||
gaal | is it clear that all of the MM can be expressed in the prelude? | ||
nothingmuch | i don't know, but most of it can | 07:52 | |
gaal | putting aside circularity for a moment. | ||
nothingmuch | and the stuff that can't can be stubbed | ||
forcing the compiler to provide a version | |||
as for circularity - it's also useful | |||
gaal | sure | ||
but it's a different problem. | |||
nothingmuch | if the prelude is defined circularly, the compiler can choose where to break the circle | ||
gaal | bbiab | 07:55 | |
07:57
xinming_Beijing is now known as xinming
|
|||
gaal | nothingmuch: i acknowledge this is cool and potentially very useful | 08:00 | |
i'm just saying, it's an experiment, and if it turns out to be too hard | 08:01 | ||
or too slow | |||
pugs can still do OO prims in haskell | |||
nothingmuch | it's actually both easy and fast | ||
gaal | good :) | 08:02 | |
dada | pugs build is borked | ||
nothingmuch | (the output... I don't know about compilation yet. It works reasonably fast, but it's not optimizing, or anything) | ||
gaal | dada, error? | ||
dada | NMAKE : fatal error U1073: don't know how to make 'pugs.exe' | ||
Stop. | |||
gaal | oh, that's annoying frontend stuuf again. | 08:03 | |
nothingmuch | (the process itself is very simple though - take the hash of each node being applied, and see if it can be replaced) | ||
gaal | dada: make sure you have a file called "pugs" (no extentsion) | ||
that's a perl5 sctipt | |||
then, create a file "pugs.exe", never mind what's in it | |||
dada | yes, I have it | ||
gaal | then run nmake again | ||
dada | let's try | 08:04 | |
seems to be working | 08:07 | ||
gaal | this is a weird extension thing happening on win32 since `pugs` has been made a script | 08:11 | |
i'm trying to catch putter to see how bad we need this script... i can see that it saves work, but it also causes problems | 08:12 | ||
following autrijus' mention of LINQ, this is an interesting and well-written paper: research.microsoft.com/~emeijer/Pap...l2003.html | 08:40 | ||
autrijus | rehi from CKS airport | 08:48 | |
boarding in two hours :) | 08:49 | ||
GeJ | rehi :) | ||
clkao | Mr Tang | 08:50 | |
autrijus | Mr Cow | ||
clkao | Mad Tang | ||
autrijus | :) | 08:51 | |
rafl | How about a release timeline for 6.2.10? Is there anything known? | 08:52 | |
autrijus | I wonder if I can do that en route to estonia | 08:53 | |
but more realistically, it will be on time for euro oscon | |||
since I have ~2wk of time | |||
gaal | cool, i have a talk about pugs on 6 oct | 08:54 | |
rafl | Fine. I thought the release was already planed for the beginning of this month.. | ||
gaal: Where? | |||
gaal | maybe we can release then :) | ||
my local pm group | |||
tel-aviv | 08:55 | ||
rafl | Ah, OK. | ||
gaal | autrijus, was the flight delayed, or were you just very lucky with check-in and that stuff? | 08:56 | |
rafl | Maybe someone of you is from germany and wants to give a pugs/perl6 talk as well? I'm co-organizing a linux-conference here. | ||
gaal | iblech maybe? | ||
autrijus | gaal: no, I misremembered the time | 08:57 | |
fortunately on the right direction | |||
gaal | heh | ||
rafl | gaal: Hm, havent seem him for a while.. | ||
gaal | i know a chronic latecomer who sometimes manages to fool himself by setting his clock wrong | ||
autrijus, can you maybe take a look at the lexical pragma thingie? | 08:58 | ||
the idea is that in BEGIN time i gather pragmas to be installed | |||
and the parser puts them in the AST | |||
autrijus | which test is that? | ||
gaal | but it's putting it in the wrong place | 08:59 | |
t/packages/lexical_pragmas.t | |||
nothingmuch | autrijus: remember what happenned with my flight? | ||
;-) | |||
gaal | nothingmuch: i met a girl in mongolia who didn't understand how come her visa to china was so much longer than everyone else's | 09:00 | |
turned out she read the expiry date as dd-mm-yy | |||
it was yy-mm-dd | |||
nothingmuch | oh crap | ||
gaal | yeah, she had to leave in a hurry | 09:01 | |
GeJ | rafl: where are you from? | ||
nothingmuch | china is not the place to be doing that, is it? | ||
gaal | luckily she had two days left | ||
nothingmuch | phew | ||
nothingmuch finished the setup bug... that was a pain | |||
rafl | GeJ: Germany, Saxony, Chemnitz. | ||
gaal | she wouldn't have gotten into any *real* trouble: | ||
just denied reentry, and have to wait a bit longer in mongolia to get a new visa | 09:02 | ||
costly, but mongolia is not a bad place to be in :) | |||
in the meanwhile that is. | |||
nothingmuch | aye | ||
nothingmuch would like to hike/bike in mongolia | |||
GeJ | rafl: ok. Germany, Bayern, Munich myself. | ||
dada | !!! | 09:03 | |
rafl | GeJ: That's next to where iblech lives, afaik. | ||
dada | "pugs.exe is not a valid Win32 application." :-) | ||
gaal | daad: yeah, run pugs_bin.exe | ||
s/ad/da/ | |||
we have to sort that out :) | 09:04 | ||
dada | sheesh | ||
gaal | alternatively, perl pugs | ||
dada | doesn't work either | ||
Can't exec /bin/sh at pugs line 1. | |||
gaal | beh | ||
perl -X pugs | 09:05 | ||
dada | same | ||
gaal | sorry, lowecase -x | ||
dada | oh yes, works now | 09:07 | |
sort of... | |||
I see intermixed shell and pugs prompts! | |||
and when I quit pugs with :q, the shell closes! | 09:08 | ||
gaal | autrijus: oh, t/packages/lexical_pragmas.t won't parse now, change the install local func in Paser:913 to install in the local env rather than the caller | ||
that isn't right either, but at least the test will run :-/ | |||
dada, then run pugs_bin.exe directly :( | 09:09 | ||
dada | gaal: yes, that's what I'm doing | ||
autrijus | k | 09:11 | |
hm, maybe we should make a pugs.bat | |||
dada | oh well, nmake test doesn't work either | ||
autrijus | for win32 | ||
dada | or just: copy pugs_bin.exe pugs.exe | 09:12 | |
autrijus | but that will prevent pugs/perl5 from running | ||
which is the raison d'etre | |||
nothingmuch | has anyone seen iblech lately? | ||
autrijus | another thought is move the wrapper into haskell space | ||
Main.hs | |||
gaal | nothingmuch: not on channel, but he has made some commits | ||
autrijus: that's what i thought - is it just command line parsing the wrapper is trying to avoid? | 09:13 | ||
autrijus | yes | ||
nothingmuch wants to get people to help with Blondie | |||
any volunteers for learning? | |||
autrijus | gaal: you can probably do that? | ||
dada | who's Blondie? | ||
nothingmuch | dada: an intermediate language that i'm developing to prototype some compilation approaches | ||
gaal | autrijus: i'll give it a whirl; wanted to talk with putter to make sure i understood the motivation first | 09:14 | |
nothingmuch | type inferrence based pessimistic unboxing | ||
and selective replacement of prelude | |||
autrijus | gaal: the motivation is -BPerl5 | ||
nothingmuch has problems with the wrapper | |||
it should be built by the makefile to use $^X | 09:15 | ||
not base on $PATH like it does now, or /usr/bin/perl like it did before | |||
gaal | nothingmuch: it'll still have problems on w32 then | ||
and anyway there should not be a perl5 interpreter involved for most programs | |||
autrijus | right | ||
gaal | i bet this slows down smokes by a lot | ||
dada | $^X is ok on win32 | 09:16 | |
svnbot6 | r7088 | autrijus++ | * Import GHC.Exts for DrIFT.Perl5; that's the only change required by GHC 6.4.1-release | ||
dada | it always returns the full path to perl.exe | ||
autrijus | C:\work\pugs>perl pugs | ||
Can't exec /bin/sh at pugs line 1. | |||
dada | autrijus: perl -x pugs | ||
gaal | autrijus: so the underlying motivation was to get p5 $^X in pugs? we can sure throw that into haskellspace during the build too. | 09:17 | |
nothingmuch | yes, and we should | ||
the perl that the user selects to run Makefile.PL should be consistently used | |||
not guessed later | |||
gaal++ | |||
autrijus | yes | 09:18 | |
dada: not acceptable really | |||
as old versions of pugs will have a pugs.exe installed | |||
gaal | what's the helper named perl5 anyway? i don't have an executable with that name on my system | ||
dada | autrijus: you mean the copy is not acceptable? | 09:19 | |
autrijus | "perl -x pugs" is not | ||
gaal: mm? it's perl5/PIL-Run that runs perl5 helper | |||
dada | oh well, I did a pugs.bat which contains "perl -x pugs" | 09:20 | |
seems to work | |||
autrijus | dada: will it win over .exe? | ||
dada | I deleted the fake .exe, of course | ||
autrijus | no it would not | ||
gaal | a .com might win... :-p | 09:22 | |
nothingmuch | eep | ||
gaal | what? .com is great | ||
load to ram, execute | |||
no header muckiness | |||
gaal hides | |||
autrijus | riight | ||
gaal | (p5 $^X in pugs coming up as soon as this sanity build finishes) | 09:23 | |
dada | I can't come up with a proper name for a pugsbugs test | 09:24 | |
gaal | btw: i can't seem to build a pugs with precomp prelude and with -O0 -- ghc dies horribly in the second phase, apparently because an unoptimized precomp prelude is huge | 09:25 | |
dada | ohhhhhhhh wait wait | ||
gaal | wait actually | ||
why should it be any different in size? | |||
dada | t/examples/examples.t is borked! | ||
it looks for pugs.exe, hardcoded in the file | |||
now that I have pugs.bat, it miserably fails | 09:26 | ||
nothingmuch | www.instructables.com/ | ||
autrijus | mm I'm seeing | 09:27 | |
C:\work\pugs>pugs_bin t\01-sanity\08-test.t | |||
pugs_bin: user error (*** | |||
unexpected ":" | |||
expecting operator or "!!" | |||
at C:\Perl6\lib/Test.pm line 100, column 40 | |||
t\01-sanity\08-test.t line 1, column 1) | |||
probably bad old c:\perl6 | |||
aye | 09:28 | ||
dada | I don't have 08-test.t there | 09:29 | |
svn up again? | |||
mmm no, is there | |||
1..1 | 09:30 | ||
ok 1 | |||
ok, what are pugsbugs tests supposed to do? fail if they hit the bug? | 09:34 | ||
svnbot6 | r7089 | gaal++ | add perl5path to config (contains the $^X of the building perl5) | ||
r7090 | gaal++ | add tests asserting a module is loaded once, but &[un]?import hooks get called many times | |||
gaal | you can :todo<bug> them | 09:35 | |
make sure they do pass once the bug is fixed | |||
it's okay to put parsefailing bugs there, usually in a file of their own | 09:36 | ||
though in the release they'll probably be skipped. | |||
autrijus | "nmake smoke" on win32 fails due to the missing pugs.exe | 09:37 | |
gaal | i haven't tried a smoke since before my vacation ;-) | ||
we really have to unwrap pugs | 09:38 | ||
i'll work on it today. | |||
autrijus | wonderful | 09:39 | |
seeing that people maybe interested to svn co and try it out in 48 hours | |||
that's none too soon :) | |||
dada | wow, committed :-) | ||
autrijus | You probably don't want to export an operator name; instead | ||
define a new variant on the new operator (eg. multi sub *infix:<+>):"&infix:%" | |||
at "blib6/lib/Set/Symbols.pm" line 145 column 1 | |||
gaal | eep, why are installbin and other config directives pointed at perl(5) paths? | 09:43 | |
please nobody `make install` :-) | |||
autrijus | @x = (a => %x, b => %y) | 09:44 | |
svnbot6 | r7091 | dada++ | added test for bug: bool::false not parsed correctly on LHS of an operator | ||
autrijus | this is kosher right? no need to | ||
(a => hash(%x)) or (a => \%x) or whatnot | 09:45 | ||
gaal | i hope so? doesn't => impose Item context? | 09:46 | |
autrijus | right | ||
fixed | |||
gaal hopes to pick up that "be blazingly fast" trick while autrijus is in .il :) | 09:47 | ||
so, Pugs.Main:84 already had run ("-B":backend:file:_) = slurpFile file >>= doCompileRun backend file | 09:48 | ||
what was wrong with that? just the $^X? or something else? | |||
ahhh, the comment in /pugs:41 about the hack needing FindBin? | 09:49 | ||
svnbot6 | r7092 | autrijus++ | * NameGen: Hash in pair value position is just fine as => imposes Item context | 09:50 | |
nothingmuch goes to have lunch | 10:00 | ||
autrijus | gaal: yes, precisely that | 10:11 | |
also the runtimes needs to be installed from perl5/ | |||
but that is somewhat orthogonal | |||
gaal | i've probably no time to sort out the perl5 installation path issues - please someone take a look, this is critical. | 10:12 | |
azuroth | how do I go about getting a job in melbourne? | 10:13 | |
gaal | autrijus: i'll definitely do the unwrappage. | ||
autrijus | gaal: wunderbar. | ||
the perl5 installation foo needs a rethink | |||
I think we don't want relocate perl5 | |||
yet separate Makefile.PL sucks | 10:14 | ||
so probably sometihng intelligent in the mainMakefile.PL | |||
gaal | why is there any perl5 installation info at all? very scary :) | ||
autrijus | mm? | ||
gaal | why does pugs contain any perl5 paths, except for the $^X it was built against? | 10:15 | |
i mean right now it just looks like a bug someone accidentally injected: | |||
./pugs_bin.exe -V:installsitebin | |||
installsitebin: c:\perl\bin | 10:16 | ||
make install will do terrible things again | |||
autrijus | right... it's a bug | ||
though it's somewhat fine, as it only installs .exe files | |||
and iirc has been like that for a while | |||
gaal | if we avoid reusing these names, we can maybe avoid that scenario | ||
oh? | |||
autrijus | I agree it's wrong | ||
OT: is there some way, via CSS | 10:17 | ||
to scale fonts so that it stretch to fit? | |||
gaal | i hope we get an alternative to EU::MM for p6 anyway (though i ain't working on it :-) | ||
not that i know. you are going for takahashi eh? :) | 10:19 | ||
autrijus | yes. :) | ||
gaal | (my css-fu is very limited) | ||
autrijus | nod | ||
gaal | that ruby presentation used images, 'fcourse | ||
autrijus | mm font-size-adjust, font-stretch | ||
gaal | wow, zvon.org do it again | 10:21 | |
they have references for so many interesting things :) | |||
nnunley phears Blondie. | |||
gaal | autrijus: those properties don't seem to work on my browser (firefox 1.06/win32) | 10:23 | |
autrijus | apparently font-size-adjust is the way to go | 10:24 | |
ok, so a Font::AFM and font-size-adjust is totally the way to go | 10:25 | ||
either precalculated or via javascript | |||
I should be working on the content but yet I'm hacking away at the style | 10:26 | ||
what's wrong with me :-/ | |||
gaal | you must be human! | 10:27 | |
careful, that's mildly contagious and eventually lethal | 10:28 | ||
autrijus purrs | 10:31 | ||
GeJ | hum, don't want to sound like an ass or something, but : xAB[10:49] <autrijus> boarding in two hours :)xBB and it's 12:40. | 10:40 | |
Happy hacking in an airport is fun, but missing the plane is a pain. | |||
just my $0.02 though | |||
autrijus | 16:55 < autrijus> gaal: no, I misremembered the time | ||
GeJ | Oh, oki. My mistake. Sorry for the noise :) | 10:41 | |
autrijus | np :) | ||
I'm downloading visual haskell | |||
hopefully will finish on time | |||
gaal | visual haskell!? | 10:44 | |
visual haskell++#6 :-) | 10:45 | ||
autrijus: when in a rush on shared media, decrease everybody elses MSS! and tcpkill their connections! be ruthless! we don't need ruths! :-p | 10:46 | ||
autrijus | ROFL | 10:48 | |
nothingmuch returns from lunch | 10:49 | ||
nnunley: want to get involved? | 10:50 | ||
azuroth | what sort of things need porting to perl 6? | 10:57 | |
nnunley | nothingmuch: Would love to | ||
autrijus | azuroth: your favourite program :) | ||
nothingmuch | azuroth: Getopt | 10:58 | |
azuroth | masak's working on getopt, I think | ||
nothingmuch | nnunley: what do you know? | ||
azuroth: in that case, XML::SAX on steroids | |||
the perl 6 object model lets us do such things more cleanly | |||
azuroth | hokay. I'll look into it | ||
nothingmuch | another option is taking the lessons learned from DBIx::Class, and trying to consult stevan on a CDBI persistence layer based on the metamodel | 10:59 | |
such that the meta class gives the persistence, instead of the super class | |||
nnunley | nothingmuch: Be more specific. :) I have some basic compiler theory under my belt. A long time ago I looked at doing an AST based reduce/apply engine, but didn't get that far. | ||
nothingmuch | nnunley: i mean specific to blondie | ||
the blondie todo: | |||
nnunley | nothingmuch: Ahh. I've just been tracking it since you added it. | 11:00 | |
nothingmuch | refactor Param into Thunk | ||
make the type inferrencer support higher order functions | |||
and compile to PIR | |||
oh, and support union types (it can be either this or that, we can only find out at runtime) | |||
do any of these interest you? | 11:01 | ||
nnunley | nothingmuch: Union types, ala SSA? | ||
nothingmuch | if so i can help you get started... i'd really love for someone without my bias to look at the code | ||
i dunno | |||
let me find out | |||
what's ssa? | |||
autrijus | mm 463 fails, a mild releng challenging | ||
nothingmuch | structures semantic analysis? | 11:02 | |
nnunley | nothingmuch: Single Static Assignment, IIR the acronym correctly. | ||
nothingmuch | ah | ||
autrijus | "tagged" union types? | ||
aka variant types | |||
nothingmuch | we don't have assignments yet | ||
autrijus | because there are also untagged union types aka (+) | ||
nothingmuch | i think you could say that blondie is already SSA | 11:03 | |
nnunley | nothingmuch: en.wikipedia.org/wiki/Static_single...nment_form | ||
nothingmuch | because parameter binding is | ||
autrijus plugs ANF in stead of the isomorphic SSA | |||
nothingmuch | so what does a union type have to do with SSA? | 11:04 | |
gaal | (i must do some $work, will only be able to commit the unwrapping later) | ||
nothingmuch | en.wikipedia.org/wiki/ANF | ||
autrijus: please fill it in | |||
autrijus | nothingmuch: A Functional Perspective on SSA Optimisation Algorithms | 11:05 | |
nnunley | nothingmuch: it seems to be similar in intent to the theta operator for SSA. | ||
autrijus | it's the functional equivalent of SSA | ||
it's much happier than SSA because all it has is binding and lambda | |||
PIL was glorified ANF. | |||
nothingmuch cannot find theta on the ssa page | |||
autrijus: what is the TLA? | |||
autrijus | Administrative Normal Form | ||
nnunley | Err... Sorry, Phi, not theta. | 11:06 | |
nothingmuch | nnunley: please wait, reading | ||
autrijus: please put a link in this page: en.wikipedia.org/w/index.php?title=...ction=edit | 11:07 | ||
autrijus | nothingmuch: I'm boarding _right now_ | ||
nothingmuch | oh, okay | ||
autrijus | so probably not this moment | ||
gaal | have a nice flight! | ||
autrijus | ask #haskell to fill it in | ||
gaal | "Administrative Normal Form"!? probably in triplicate. | ||
nothingmuch | autrijus: don't crash or anything | 11:08 | |
autrijus | aka A-normal form | ||
nothingmuch: | |||
maybe I'll land to an island with fiber optic network etc | |||
nothingmuch | hah | 11:09 | |
nnunley: no, not really like phi | 11:10 | ||
simpler | |||
nnunley | Ok. | ||
nothingmuch | assume you assign a value into the array element 1 | ||
and a value of another type into element #2 | |||
then you take out element i | |||
the compiler cannot know (unless the compiler is really crazy) what type willc ome out of the array | 11:11 | ||
so the array must return boxed types | |||
as for phi - the moment we have assignment we will add ssa ;-) | 11:12 | ||
nnunley | Couldn't the type be widened until it encompases both the types of elements 1 and 2? (Of course, I'm making this a 'simple matter of coding') | ||
nothingmuch: Got it. | |||
nothingmuch | yes | ||
that's the point of the excercise | |||
the type of the array becomes [PV|IV] if the array is assigned 1 and "foo" | 11:13 | ||
and every value coming out of the array must be checked for at runtime | |||
nothingmuch doesn't like acm | 11:16 | ||
they should give me all their articles for free | |||
nnunley | They definitely should. It's a nice big black hole. | ||
I guess that's why I almost always hit citeseer first for research. | |||
nothingmuch was just clicking on links | 11:17 | ||
the problem is that most articles are unaccessible to me | |||
i lack the vocabulary | |||
so it's really not worth $10 to figure out that I don't understand the language | 11:18 | ||
nnunley | nothingmuch: Right. Same issue with me. I have to muddle through the notation. Which is one of the reasons why citeseer is nice -- it's free. | ||
Aankhen`` | Hi. | 11:19 | |
nnunley | But i guess it would be good to try to put together a primer. | ||
nothingmuch | citeseer.ist.psu.edu/cis?q=administ...s&cs=1 | ||
Aankhen`` | What is CiteSeer? | ||
The search engine? | |||
I see. | |||
nothingmuch | nnunley: so, what would like to do for Blondie? | ||
Aankhen`` | Don't mind me, just talking to myself. | ||
nothingmuch | hola autrijus | ||
err | |||
Aankhen``: | |||
nnunley | Aankhen``: ok. ;) | ||
Aankhen`` | Hi. :-) | ||
Aankhen`` strangles nnunley. | 11:20 | ||
nnunley | nothingmuch: Good question. What are you having problems with? | ||
nothingmuch | nnunley: nothing really, except lack of time | 11:21 | |
nnunley | nothingmuch: Got it. | ||
nothingmuch | and the fact that I'm the sole author of Blondie | ||
which means that i get no code level critique | |||
and the truck number is high (this is dangerous with me, i tend to burn out) | |||
nnunley nods. | |||
nothingmuch | err, low | 11:22 | |
Aankhen`` | Argh... how do I stop the Parrot bugs from being e-mailed to me? | ||
nothingmuch | Aankhen``: procmail? | ||
Aankhen`` | No, try again. :-P | ||
Oh. Unsubscribe from p6i. | 11:23 | ||
nothingmuch | aha | ||
citeseer.ist.psu.edu/flanagan93essence.html | |||
nnunley | nothingmuch: Where is your todo document? | ||
nothingmuch | nowhere | ||
i'll commit one | |||
nnunley | Good good. | 11:24 | |
Hrm. So you have several placeholder nodes in Nodes? | 11:27 | ||
nothingmuch | huh? | ||
nnunley | Sorry, reading through Blondie::Nodes | 11:28 | |
nothingmuch | one second, i'll figure out what you're talking about ;-) | ||
what placeholders? | 11:29 | ||
Stub is an unimplemented thunk | |||
and the placeholder type is used by the type inferrencer to pass types from syms to params | |||
nnunley | Sorry, I'm probably going to make you explain it to me like I'm a 2 year old. The Blondie nodes file's intent is to create a reasonibly direct mapping into PIL? | 11:31 | |
nothingmuch | nope | ||
it has nothing to do with PIL | |||
the Nodes file defines the nodes of the blondie AST | |||
they are documented in Blondie.pm | |||
nnunley rereads. | 11:32 | ||
Hrm. So why the pattern of Thunk(Stub())? | 11:36 | ||
Instead of just Stub? | |||
Hrm. The flanagan paper is definitely pretty good. | 11:38 | ||
'Oooo. Shiny.' | 11:39 | ||
nnunley prints it out. | 11:50 | ||
svnbot6 | r7093 | nothingmuch++ | r8223@syeeda: nothingmuch | 2005-09-22 14:45:34 +0300 | 11:51 | |
r7093 | nothingmuch++ | TODO for blondie | |||
nnunley | nothingmuch++ Thanks. | 11:53 | |
nothingmuch: BTW, minor grammatical nit (I'm sure you'll catch me in many) -- "its" is possessive, "it's" is a contraction of "it is" or "it has" | 11:55 | ||
masak | what should the signature be of a function that is called like this: Getopt('a' => 'b', 'c' => 'd')? | 12:00 | |
There can be any number of pairs (I assume those are pairs) in the argument list. | |||
nothingmuch returns | 12:15 | ||
Thunk(Stub()) is because... errm | 12:16 | ||
i forget | |||
bottom line: because a stub thunk can take params for the purpose of type checking | |||
(it doesn't right now, because this info is thrown away too early) | 12:17 | ||
and a stub is mearly something that the compiler should refuse to pass on | |||
think of Stub as the '...' operator | |||
you son't say 'my &foo = ...;' | |||
you say 'sub foo { ... }' | |||
masak: a list | 12:18 | ||
for the getopt sig | |||
*@pairs | |||
hola kolibrie | 12:19 | ||
kolibrie | hola nothingmuch | ||
svnbot6 | r7094 | nothingmuch++ | s/it's/its/ | 12:20 | |
masak | nm: thx | ||
nothingmuch | masak: ? | 12:21 | |
oh, oops | |||
masak | for the signature | ||
nothingmuch | i confused you with nnunley | ||
masak | but the answer was for me, right? | ||
nnunley grins. | 12:22 | ||
masak | nothingmuch: anyway, it didn't work :) | ||
kolibrie | so, I'm trying to port HOP make_lexer (section 8.1.3 page 374) to Perl 6 | ||
I'm having prototype problems, I think | |||
nothingmuch | yes, it was | ||
and I'm sorry ;-) | |||
kolibrie: is can you link to the online code sample? | 12:23 | ||
kolibrie | the original? /me looks for url | ||
nothingmuch | aye | ||
kolibrie | hop.perl.plover.com/Examples/ALL/Lexer.pm | 12:24 | |
nothingmuch | kolibrie: please explain in a few words roughly what it does | 12:25 | |
masak | aha! | ||
masak discovers 'is export' | |||
nothingmuch | aha! | ||
masak | :) | ||
now everything works | 12:26 | ||
kolibrie | the tokens subroutine expects an input iterator, and then a token definition containing label and regex | ||
masak | or rather, all my tests fail instead of not running | ||
nothingmuch | =) | ||
what is a label? | 12:27 | ||
kolibrie | the make_lexer subroutine takes an input iterator, and a list of token definitions, and strings a bunch of calls to 'tokens' together | ||
the label is a string identifier | |||
anything you want | |||
nothingmuch | okay | ||
oh, i see | 12:28 | ||
make_lexer stacks tokenizations on top of each other | |||
kolibrie | my problem is figuring out how to prototype make_lexer, and then to appropriately pass to tokens | ||
correct | |||
I have something like: sub tokens ($input, $label, $pattern, ?$make_token = sub { ... }) { ... } | 12:29 | ||
nothingmuch | sub make_lexer ($lexer is copy, *@definitions) { for @definitions -> $args ( $lexer = tokens($lexer, @$args) }; return $lexer } | ||
yes, that's about right | 12:30 | ||
kolibrie | that looks pretty | ||
nothingmuch | oh wait | 12:31 | |
svnbot6 | r7095 | iblech++ | * Usual svn props. | ||
r7095 | iblech++ | * New t/var/autoref.t: $arrayref = @array, (key => @array), etc. | |||
r7095 | iblech++ | * t/pugsbugs/parsing_bool.t: s/eval/try/ so other backends no capable of eval() | |||
r7095 | iblech++ | have a chance of passing this test. | |||
nothingmuch | you need to flatten *@args | ||
i forgot how | |||
to allow it to be positionated ;-) | |||
(make an array into a list of positionals) | |||
kolibrie | S04? says *@$args | ||
nothingmuch | right | ||
kolibrie | or **@$args | ||
nothingmuch | i'd go with *@args | ||
no need to steamroll | 12:32 | ||
kolibrie | :) | ||
nothingmuch | just explode | ||
kolibrie | does that compile for you? I get an error | ||
ah, just a s/<'('>/{/ | 12:36 | ||
svnbot6 | r7096 | masak++ | number of tests in plan corrected in gol-linkage.t | ||
nothingmuch | oops... sorry =) | 12:40 | |
kolibrie | at least your's compiles now | 12:41 | |
I can't remember what I had, but it kept not compiling | |||
ah, now I'm getting a runtime error: *** No compatible subroutine found: "&tokens" | 12:47 | ||
how is that? | 12:48 | ||
nothingmuch | nopaste the code? | 12:52 | |
kolibrie | in feather.perl6.nl:/home/kolibrie, see Lexer.pm, and pugs extract_date.p6 test_date.txt | ||
nothingmuch | try giving tokens a prototype | 12:55 | |
oh wait | |||
do away with the 'sub tokens { ... }' | |||
i think it's confusing ppugs | |||
kolibrie | hmm. same error still | 12:58 | |
svnbot6 | r7097 | nothingmuch++ | more todo | 12:59 | |
nothingmuch | een.wikipedia.org/wiki/GENERIC # i want to compile to this after PIR | 13:02 | |
and also another interpreted backend | |||
kolibrie | oooh, that would be nice | ||
nothingmuch | the more backends Blondie has the more we can learn about what is the true role of an AST as high or low level as Blondie | ||
and give this knowlege back to PIL | 13:03 | ||
nothingmuch is going to to a blondie interpreter in C later | |||
it shouldn't be too much of a mess | |||
gaal | nothingmuch: re your reply to masak: we can do better and specify it's a list of pairs, no? i think the syntax is `*@list of Pair` but have no idea if it works :) | 13:04 | |
rehi btw :) | |||
nothingmuch | right | ||
hi ho =) | |||
nothingmuch leaves right about now | |||
gaal | bye nothingmuch. | 13:10 | |
interesting idea for build speedup: | 13:45 | ||
# www.isi.edu/~hdaume/HAllInOne/ | |||
creates one big file instead of many source modules | 13:46 | ||
doesn't support ghc extensions yet | |||
obviously, not good for when you hack on one file a lot | 13:47 | ||
but something to follow and possibly enable in releases one day. | |||
13:49
khisanth_ is now known as Khisanth
|
|||
autrijus | nod | 13:55 | |
hi from .hk btw | |||
xinming_Beijing | autrijus: are you in a aeroplane? | 13:58 | |
autrijus | no, in .hk for transit | 14:00 | |
gaal | hello! :) | 14:02 | |
Khisanth | you are at that giant HK airport? :) | 14:03 | |
xinming_Beijing | cool... the wireless lan is really cool. :-P | 14:05 | |
gaal | how long is your connection? how long is your next flight? | 14:06 | |
nothingmuch | ftp://gcc.gnu.org/pub/gcc/summit/2003/GENERIC%20and%20GIMPLE.pdf | ||
autrijus | Khisanth: aye | ||
nothingmuch | autrijus: please put a note in your journal, that blondie is looking for backend ideas | 14:07 | |
nnunley | nothingmuch: I was under the impression that GENERIC wasn't exposed. | ||
autrijus | nothingmuch: you can write my journal for me in docs/journal/ :) | ||
or you can wait for two days... | |||
nothingmuch | i want to try as many backends as possible so that we force Blondie into a reusable shape and then throw that away | ||
nnunley | nothingmuch: LLVM could be a good target. AS would JASMIN | ||
nothingmuch | and reimplement our knowlege in PIL | ||
autrijus | nothingmuch: okay. I nominate YARV | 14:08 | |
nothingmuch | nnunley: link for jasmin? | ||
gaal | the unwrapping stuff, by the way, is needing a reasonable way to handle pathnames in haskell :-( | ||
autrijus | the standin for parrot in my mind -- after clr that is | ||
gaal: Distribution.Compat.FilePath | |||
nnunley | jasmin.sourceforge.net/ | 14:09 | |
autrijus | my flight is in 1hr | ||
I'm finally starting to write slides | |||
nnunley | I'm sure there's a better java assembler out there, but that's the one I remember. | 14:10 | |
gaal | autrijus: i'm getting errors about that being "locked", asking on #haskell | ||
nothingmuch | is YARV stack based? | ||
nnunley | nothingmuch: Yes. | 14:11 | |
autrijus | yup. | ||
nothingmuch | good | ||
nnunley | www.atdot.net/yarv/insnstbl.html | ||
autrijus | but has first class continuation support | ||
nothingmuch | ooh | ||
autrijus | has to, since ruby has callcc | 14:12 | |
bbiab | 14:13 | ||
back | |||
kolibrie | anyone want to diagnose my: *** No compatible subroutine found: "&tokens" | 14:21 | |
on feather.perl6.nl:/home/kolibrie | 14:22 | ||
pugs extract_date.p6 test_date.txt | |||
fire alarm & | |||
autrijus | try to get some electricity & | 14:31 | |
svnbot6 | r7098 | autrijus++ | * first few bits of CUFP talk. | 14:39 | |
Juerd | Anyone with me on the issue of interpolation and stringification resulting in different values being a bad idea? | 14:44 | |
nothingmuch | yes, me | 14:45 | |
QtPlatypus | Juerd: Can you give me an example? | ||
Khisanth | QtPlatypus: well $foobar1 = "foo"~$bar and $foobar2 = "foo$bar" and $foobar1 ne $foobar2 :) | 14:48 | |
nothingmuch | Juerd: who's idea is it to separate the two? | 14:55 | |
svnbot6 | r7099 | nothingmuch++ | Blondie propaganda | 14:57 | |
kolibrie | back | ||
nothingmuch | autrijus: journal/2005-09-22.kwdi | ||
Juerd | nothingmuch: Damian's | 15:07 | |
nothingmuch suspects that Damian is a double agent | |||
Juerd | Message-ID: [email@hidden.address] | ||
nothingmuch | by adding insane enough semantics he will force us all to use C# eventually | 15:08 | |
Juerd | So far, I have more confidence in Damian than in Larry | 15:09 | |
Khisanth | is there suppose to be some advantage in making them different? | 15:11 | |
Juerd | Just that they can return different values | ||
I think that this "advantage" is a very big disadvantage. | 15:12 | ||
I think ~$foo, "$foo" and $foo.as(Str) should all return the same thing | |||
And, of course Str($foo) | |||
Khisanth agrees | 15:13 | ||
Juerd | Anyway, please do participate in the p6l discussion if you have an opinion | ||
nothingmuch | "bah $foo moose" should be a special form to make stuff into "bah " ~ ~$foo ~ "moose" | ||
Juerd | Where the unary ~ is redundant | ||
Because binary ~ already forces Str context | |||
nothingmuch was only making a point | 15:14 | ||
nothingmuch still can't think of any scenario where "$foo" and "" ~ $foo ~ "" should behave differrently | 15:18 | ||
or ~$foo for that matter | |||
kolibrie | if you want a different context, couldn't you: "" ~ +$foo ~ "" | 15:31 | |
nothingmuch | yes | ||
kolibrie | so ~ should definitely always be string context, like "$foot" | ||
"$foo", that is | |||
svnbot6 | r7100 | stevan++ | Perl6::MetaModel 2.0 - | 15:33 | |
r7100 | stevan++ | * A (mostly) complete port of Perl 6 Test::Builder to the MM 2.0 | |||
r7100 | stevan++ | - including tests as well | |||
Juerd | Read [email@hidden.address] about pairs stringifying differently in string context than they interpolate | 15:35 | |
nothingmuch | i disagree with that | 15:37 | |
svnbot6 | r7101 | stevan++ | Perl6::MetaModel 2.0 - | 15:39 | |
r7101 | stevan++ | * some minor changes to support the Test::Builder port | |||
kolibrie | if you want different interpolation semantics: "hello { +$foo } " | 15:40 | |
nothingmuch | errm, what about just | ||
"hello { $foo.as(...) }" ? | 15:41 | ||
kolibrie | that works too | 15:44 | |
nothingmuch | Juerd: i sent some protest with some heavy reasoning | 15:48 | |
i hope it helps | |||
svnbot6 | r7102 | stevan++ | - docs/journal/ -> adding information about the Test::Builder port | 15:50 | |
r7102 | stevan++ | - Test::Builder - fixing a bug I found while porting | |||
expeditio | hi. is this a perl help channel? if not, where is there one? thanks. | 16:00 | |
nothingmuch | #perl | ||
this a genera perl 6 channel | |||
expeditio | k, thnx | 16:01 | |
svnbot6 | r7103 | stevan++ | Perl6::MetaModel 2.0 - fixing attribute accessor and $:singleton property of Test::Builder | 16:38 | |
nothingmuch is addicted to wikipedia | |||
s/addicted/destructively addicted/ | 16:39 | ||
putter | hi all | 16:52 | |
briefly... | |||
nothingmuch | hi ho | ||
putter | gaal: ./pugs does not currently well support Win, as I lack that platform. Two possibilities: | 16:53 | |
It is not possible to portably write a CPAN module which installs perl scripts. That seems unlikely, but I supposed is just borderline possible. Then unwrapping is definitely needed. | 16:54 | ||
If it is possible, then, well, someone needs to read man MakeMaker or whatever we are using and _write it_. | |||
Sorry if I was unclear. | 16:55 | ||
fglock | hi putter | 16:56 | |
putter | Though writing the haskell infrastructure to do argument handling et al could also be done. Seems a long way around to do it though | ||
hi fglock | |||
But haskellizing it does have advantages. | 16:57 | ||
Your call. | |||
fglock | Hash is fixed now - what is the url to check the smoke test? | ||
putter | Bye all & back ... | 16:58 | |
fglock: | |||
m19s28.vlinux.de/cgi-bin/pugs-smokeserv.pl has smokes, but you have to contribute them yourself | |||
unit testing is easier, just ./pugs -B perl5 -Iperl5/PIL-Run/lib6 t/whatever.t | 16:59 | ||
fglock | ok, thanks | ||
putter | running smoke-perl5 still requires some hoop jumping, as some tests non-terminate (a couple even with timeout set). some may still exhaust memory unless one externally sets a memory limit. | 17:01 | |
fglock | np, I'm testing specific things (not fully automated) | 17:02 | |
putter | ok. notes added to README. | 17:08 | |
svnbot6 | r7104 | putter++ | PIL-Run/README: added notes on the hoop jumping currently required to run make smoke-perl5. | ||
putter | fglock: all set? | ||
fglock | yes - most things work :) | ||
putter | I'll be back in 48 hrs or so. | 17:09 | |
! :) | |||
fglock | :( | ||
putter | I noticed the most recent test had some regressions. Haven't gotten a chance to look at it. Both the "latest" and the "high water mark" are on the smoke serv. | 17:10 | |
fglock | are there any higher priority bugs? | ||
putter | nothing comes to mind | 17:11 | |
fglock | ok, I'll create some :) | 17:12 | |
putter | might try the mm2 switch. stevan said that's becoming plausible, though there may still be gaps/problems. he was starting to explore switchover. | 17:13 | |
fglock++ stevan++ gaal++ | 17:14 | ||
bye all & | 17:15 | ||
stevan | fglock: re: putter's comments on MM2 | 17:16 | |
fglock | hi stevan | ||
stevan | I just commited a port of the perl 6 version of Test::Builder,.. that is probably a good place to start looking to see how things have changed | ||
hey fglock :) | |||
stevan is finding it really hard to concentrate on $work today | 17:17 | ||
fglock | :) | ||
gaal | oh, crap, just missed putter again | 17:18 | |
rehi btw | |||
stevan | hey gaal | 17:19 | |
gaal | stevan :) | ||
fglock tries to convince a debian package to install in a different dir and port | |||
hi gaal | |||
gaal | hey fglock! | 17:20 | |
gaal fights haskell file path libs | |||
arg, anyone remember how to allow the c preprocessor in .hs source files? | |||
ah, -cpp. how simple :) | 17:21 | ||
nothingmuch | dum dee dum | 17:23 | |
gaal | time for tea! | 17:25 | |
eric256 | hola....are there any known issues with building pugs on windows? i mean new issues...while compiling Pugs.Run GHC crashes with an access violoation error | 17:28 | |
gaal | eric256 - welcome, long time no see - you are running out of ram i think | 17:29 | |
fglock | I can't build it in Windows - I get a makefile error | ||
gaal | are you using the optimized build? which run is it, first or second? | ||
eric256 | hmm could be...yea life got busy, moved to a new state then bought a house. ;) takes a bit of time and energy | 17:30 | |
gaal | fglock: "can't make pugs.exe?" | ||
eric256 | unoptimized | ||
gaal | unoptimized no longer works for me on win32 when precompiling. | ||
fglock | gaal: checking the error message - will take a while to get there | ||
eric256 | hmm i can try optimized then | ||
gaal | fglock: it's the wrapping issue. create a file with that name, never mind the content | 17:31 | |
fglock: when pugs builds use pugs_bin.exe | |||
"pugs" has been made a script but it causes problems. i'm working on it. | |||
nothingmuch | nnunley: ping | ||
eric256 | thast not a very friends out of memory error for GHC to throw. ;) | 17:32 | |
"NMAKE : fatal error U1073: don't know how to make 'pugs.exe'" | |||
i'm cleanings and starting over. | |||
nothingmuch | any volunteers for blondie pair programming or coordinated hacking? | 17:33 | |
fglock | gaal - this is a very slow computer, XP + antivirus + slow disk, leave only 10% CPU available, I think | ||
nothingmuch | heh | ||
eric256 | blondie? isn't that a band? ;) | ||
fglock | eric256 - same message here | ||
nothingmuch | eric256: no, it's anAST | ||
eric256 | nm: yea i know. ;) | 17:34 | |
fglock | gaal - create a file with which name? | ||
eric256 | hmm. clean build same error. | ||
nothingmuch | anyone? | ||
pleease? | |||
eric256 for one has no idea what you are even asking nm | 17:35 | ||
stevan | nothingmuch: what do you want to do? | ||
eric256 | fglock i did "cat test > pugs.exe" and now it seems to be building | ||
nothingmuch | the todo is long | ||
make a pick | |||
fglock | nothingmuch: I'd like to, but I'm on $work now - not enough spare cicles | ||
nothingmuch | svn.openfoundry.org/pugs/perl5/Blondie/TODO | ||
eric256: i want help on Blondie | 17:36 | ||
gaal | fglock, sorry, what eric256 said | ||
nothingmuch: i have my hands full | |||
stevan | nothingmuch: anything I can do which does not involve re-reading all the compiler theory books I have | ||
fglock | ah, ok - you create a new file, and then nmake ignores it | 17:37 | |
gaal | fglock: yes, clever innit. | ||
nothingmuch | stevan: you've already got an advantage over me | ||
if i could get this far you can help too =) | |||
eric256 | nm....just curious...but why do you want to build another AST? this whole thing with javascript backends and all that confused me. I'm assuming there is a benefit i am just too dense to crasp un aided | ||
;) | |||
nothingmuch | eric256: PIL/Perl6 is too big to be rapidly prototyped on multiple backends | ||
i'm trying to explore less of the what needs to be done to make a backend, and more the how it can be done | 17:38 | ||
so Blondie is per definition minimalistic (dumb, hence the name blondie) | |||
eric256 | but why? | ||
nothingmuch | to learn | ||
eric256 | ahh... ok | ||
nothingmuch | learning with PIL is a bit too hard right now | ||
but once we've learned we can backport | |||
it's essentially a compilation prototype | 17:39 | ||
eric256 | so its just a way for you to sharpen your skills to then attack pugs/pil/parrot/perl6 ? | ||
nothingmuch | a bit more than sharpen our skills... we're (i'm) trying to implement two ideas which are not so well explored | ||
one is a circular prelude | 17:40 | ||
for the benefit of portability | |||
and correctness | |||
and the other is dynamic/static type inferrence | |||
svnbot6 | r7105 | nothingmuch++ | s/seemless/seamless/ | ||
nothingmuch | evalbot should check if system(qw/cmp pugs.new pugs.old/) | 17:41 | |
eric256 | well i'd help if it wasn't entirely over my head. ;) | ||
nothingmuch | eric256: it isn't, I promise | ||
i'll gladly walk you through | |||
i want others involved in addition to myself | |||
eric256 | learning through teaching. ;) | ||
freack GHC died agian...how much memory do you need!!! and why did it balloon up to where i can't manage it? | 17:42 | ||
nothingmuch | it needs a lot of memory | 17:43 | |
hundreds of MBs | |||
eric256 | didn't use to kill my machine though. | ||
nothingmuch | Pugs.Run isn't that big though... *puzzled* | ||
eric256 | i've got 350mb free when i start nmake | 17:45 | |
gaal | nothingmuch: it #includes the precomp prelude | 17:46 | |
nothingmuch | oi | ||
heh | |||
eric256 | i'm guessing that is large? | ||
dduncan | I've found that GHC runs but slowing the whole machine down under 256M ... runs very well on a 768M machine | ||
fglock | meeting & | 17:48 | |
eric256 | down to 260mb and falling. lol....240mb......230mb | ||
so if this doesn't work i can turn of precompiled prelude and be okay? | 17:49 | ||
gaal | yes, but you really need the precompiled prelude :( | ||
eric256 | then i hope i freed enough memory. | 17:50 | |
gaal | :223 | ||
eric256 | is there any work that can be done to reduce that? | ||
gaal | oops, wrong window | ||
not anything i know how to do :( | |||
eric256 | compile perl6 requirments....2gig of memory. ;) | ||
so are the OO changes occuring in pugs? or is it still perl5 based modules? | 17:52 | ||
gaal | well eventually -CPugs output will be binary with DriFT, but we need one of the hardcode labmdaheads for that. | ||
integral | is there no possibility to serialise the prelude as perhaps binary, and then recreate the actual tree at runtime, so that GHC isn't trying to optimise all those compiler? | ||
gaal | integral: be a hardcode labmdahead! :) | ||
eric256 | just dropped below 100mb of memory and ghc "encountered a problem" | 17:53 | |
i've got the error report window up...anything in there that can help? | |||
integral | hmm, afaik all the DRiFT output stuff is working, it's just that there's nothing in place to load the stuff, right? | 17:54 | |
gaal | integral: i don't know, it was all done when i was away. DriFT.Binary exists, fwiw, but i don't know if it's lossy or not. | ||
oh no, if we don't use perl5 to wrap pugs then we need to use pugs to wrap perl5 when -BJS and -BPerl5... but "exec" isn't portable | 17:56 | ||
gaal sighs | |||
eric256 | Prelude.pm doesn't seem that big. | 17:58 | |
Juerd | The scary part is it being monolithic | 17:59 | |
I hope that's just a bootstrapping thing | |||
integral | perl code is a very efficient way of encoding very big ASTs :-P | ||
Juerd | integral: Except it's hard to parse :) | ||
eric256 gives nmake unoptimized one last chance just for kicks | 18:00 | ||
would it fit in memory better if it were broken into parts? or does the world not work that way? | |||
integral | hmm, this looks like it may not be *too* difficult! | 18:01 | |
the actual machinery seems to be there in PIL1.hs, and Binary.hs | 18:02 | ||
eric256 | here we go...300mb free when it hit compile Pugs.Run for the second time...might actualy make it | 18:03 | |
isn't it odd for that to be an out of memory error when there is still 100mb show as avialable? | 18:04 | ||
wow...and now 86mb and the same error....must mean its lunch time ;) | 18:05 | ||
putter | whew. ride running late... | 18:06 | |
gaal: ping? | |||
any windows perl usersers / CPAN contributers about? is runperl.bat the current state of the art in perl scripts? | 18:07 | ||
gaal | putter! hi :) | ||
putter | hi gaal :) | ||
gaal | pugs-the-script is a pain - but i can see what pain it prevented :) | 18:08 | |
putter | my hope was that someone more familiar with windows than I would do the "obvious right thing", whatever that was, to make the pugs script work there. doesnt seem to have happened. | ||
a quick google suggests runperl.bat might be the "state of the art". but I have no first-hand experience. | 18:09 | ||
integral | bother. the precompiled prelude isn't PIL1, it's AST | ||
gaal | putter, even if we could use runperl - which i'm not sure is the case - a wrapper would be a huge hit on smokes | 18:10 | |
putter | oh, btw, I saw a "how much memory does ghc use" go buy. I recently noticed an oddball, where some p6 code (unfortunately not easily isolatable) resulted in a practically unbounded (killed at > 1GB) memory usage. a small (1 line) code change avoided the problem. but this is on an old ghc development snapshot, so the experience is likely not relevant to any current problems. | 18:11 | |
gaal: re huge hit, really? that seems surprising. | 18:13 | ||
Juerd | There exists spamming software that uses mail.domain.com to send mail to domain.com, without checking any mx record. | 18:14 | |
gaal | why? you have 7000 tests, that means 7000 perl5 runtime inits | ||
Juerd | Hatefuly. | ||
s/y// | |||
My mx is mx1 - mail I use for customers, who authenticate | 18:15 | ||
But, of course, mail accepted mail for the domain unauthenticated as well, as it's a standard qmail setup | |||
putter | On an optimized build, a 01-sanity test file which _doesnt_ use Test takes about 1sec to run at 1GHz. running perl on the same machine is 2 or 3 orders of magnitude faster. | ||
Juerd | Now, I am manually hacking qmail to always deny relying | ||
putter | hmm, perhaps I have some aspect of perl swapped in... | 18:16 | |
gaal | as you're likely to do if you run it 7k times ;-) | 18:17 | |
Juerd | Fortunately, qmail is very well written and easy to hack. | ||
Pfew. | |||
gaal | so you're saying this is noise | ||
putter | gaal: 7k times? err, we have <500 test files...? | ||
gaal | and that i'm worrying too much about something that doesn't matter? | ||
oh, right, i was confusing tests with test files | 18:18 | ||
duh | |||
okay, how about... | |||
we write the wrapper in c? :) | |||
i don't know how to fix the who-gets-invoked-first problem | 18:19 | ||
putter | ok, with an alternate version of perl which I'm sure isnt cached, the first run took 1/10 sec. and I imagine the .bat file game will take some time. any idea how long the runperl.bat hook takes? (eg, running a .bat file) | 18:21 | |
gaal | not sure i even have one | 18:22 | |
let me look | |||
putter | Its in the perl distrib as of ... something. | ||
apparently | |||
gaal | right, lessee | 18:23 | |
ugh, how do you time on windows? | |||
putter | at 1/10 sec overhead, 1 min on a 1 hr smoke, its clearly not a problem. At 1sec, it would be. Does perl take 1sec to start up on windows? It seems unlikely, but... | ||
actually, does runperl.bat take 1 sec to start perl on windows. there may be path searches in there... | 18:24 | ||
gaal: re time on windows. I have so no idea. anyone? | 18:25 | ||
dada | I benchmarked something on win32 | ||
gaal | runperl is a BAT hit, sometimes another CMD hit, and a perl.exe hit -- before the pugs Perl5 wrapper | ||
but i agree that performance may not be the first priority here. | |||
putter | perl -MTime::HiRes -e '... system("..." :) | 18:26 | |
dada | dada.perl.it/shootout/hello.html | ||
putter: I've used some Win32::API trickery | |||
gaal | ew, my path contains c:\perl\bin which is where runperl.bat is, but runperl.bat refuses to run! | 18:27 | |
dada | a simple "hello world" 200 times takes 6.13 secs with Perl, in contrast to 1.10 secs with a C-compiled executable | ||
take it for what it is | |||
(note this is the startup time for perl.exe itself, not for the .bat trick) | 18:28 | ||
putter | is the fs cache wiped between calls? | 18:29 | |
dada | no, not really | ||
putter | gaal: apparently you rename runperl.bat to say pugs.bat which would call the pugs script | ||
dada | but you aren't going to wipe the fs cache while you're smoking, no? :-) | ||
putter | search.cpan.org/~nwclark/perl-5.8.7...runperl.pl | 18:30 | |
true. I was thinking worst case. Perhaps meaninglessly worst. | |||
dada | anyway, putter: exec() behaves like _evil_ under win32 | ||
putter | as long as someone else has incanted the circle of protection, np ;) | 18:31 | |
err, and it doesnt leak | |||
dada | struggle to avoid it if you can | ||
putter | dada: so, is runperl.bat not the right thing? | 18:32 | |
dada | I don't know exactly what it dows | ||
does | |||
oh, now I know | 18:33 | ||
and it doesn't look right | |||
I guess "pl2bat pugs" is better | 18:35 | ||
putter | the things I briefly surfed suggested runperl is the new-better thing. no? | 18:37 | |
dada | not for potentially interactive scripts like pugs | 18:38 | |
the fact is that exec()ing messes the I/O of the script with the I/O of the console itself | 18:39 | ||
let me show you | 18:41 | ||
pasteling | "dada" at 85.35.33.226 pasted "bat things happen!" (48 lines, 1.4K) at sial.org/pbot/13253 | 18:42 | |
dada | after that, I have to kill the command prompt window with the X | ||
putter | gaal, dada: can you guys take care of this? either haskellize ./pugs script, or add pl2bat to Makefile.PL? or someone? | 18:43 | |
err, data, does your example actually use pl2bat? | 18:44 | ||
dada | putter: no, it uses the pugs script, which does exec() | ||
and my nick is *dada* :-) | |||
putter | oops :) | ||
dada | so, well, you're doomed anyway | 18:45 | |
gaal | ...and execing from pugs is not easy too | 18:46 | |
is this facade really that important, though? | |||
first of all we can unify jspugs.pl and runjs.pl | 18:47 | ||
haven't looked at either of them, but i'm sure it should be possible...? | |||
oh, is the importance for alternate smokes? | 18:48 | ||
too bad :( Also, i'm starting to run out of wakies | 18:49 | ||
putter | gaal: pugs_bin doesnt do much command line argument processing. that would have to be written. and if exec() itself doesnt work, and I cant imagine hs's exec working better than perl's (no?), then getting the js/perl5 interactive repls wont work. | 18:51 | |
so if exec() is broken on some (how many?) windowses, then a unified pugs interface, at least for interactive work, isnt going to fly. | 18:52 | ||
gaal | putter: i already wrote much of the cmdline stuff it into pugs | ||
only then i realized there was the exec problem | |||
putter: where is the unified interface used now? do we really need it? was i right that it's to make the smoke test invocations simpler? | 18:54 | ||
putter | It would seem unfortunate for some (how many?) broken windoeses to force the api changes. | ||
gaal | well, when the api changed it wasn't tested on windows in the first place :) | 18:55 | |
putter | I'd suggest waiting until we have someone who understands perl/doze well enough to say "it effects N% of perl windows installs" or some such. If its just that some installs are broken, then we just say "get a non-broken one". | ||
gaal | it seems to affect all windows *builds*, already. | 18:56 | |
putter | exec() doesnt work on _any_ perl windows installs? that seems inconsistent with what I've read. | ||
gaal | and (see the "don't know how to make" make error in the backlog) | ||
s/and // | |||
putter | I have to go in about 3 min. | 18:57 | |
dada | putter: I'm not saying that it doesn't work. it just behaves stupidly, and AFAIK it does so on any windoze I've seen | ||
gaal | `perl -x pugs -e "say <hi>"` does not work for me, fwiw. | 18:58 | |
well, it flashes a terminal | |||
nope, it doesn't work at all: | 18:59 | ||
`perl -x pugs -e "say <hi>; sleep 1000"` doesn't show anything either. | |||
dada | gaal: try this: perl -x pugs -e "say<hi>;" | 19:00 | |
putter | perlrun.bat manpage says | ||
It relies on the exec() operator, so you will need to make sure that works in your perl. | |||
gaal | dada: nope. | 19:01 | |
(why would there be any difference?) | |||
putter | since the page is only for win, exec() must work on some win(). | ||
dada | gaal: it works for me | ||
putter | I have go in < 3 min | ||
dada | C:\dada\pugs>perl -x pugs -e "say<hi>;" | ||
C:\dada\pugs>hi | |||
(sort.. of.. works) | |||
putter: there is a difference between "work" and "work well like it does in Unix" | 19:02 | ||
gaal | putter: i don't know... i have the feeling that this should be reverted, because we don't know how to make it to work right now | ||
and it seriously breaks things. | |||
putter | dada: you might try removing the cruft at the top of pugs and replacing it with a simple #!/usr/bin/perl | ||
dada | no, it won't help | ||
it doesn't, in fact | 19:03 | ||
putter | but experimentally trying to recover portability info, from two boxes, which is in someones brain, seems... suboptimal | ||
gaal | at least in the next 48 hours, and again if we don't figure it out for the release | ||
dada | gaal: the difference is the space in the argument | 19:04 | |
putter | feel free to break PIL-Run. never been really announced. no sign anyone uses. should check with iblech however to make sure he doesnt depend on it now. | ||
gaal | dada: neither workforme. | ||
dada | that's strange | 19:05 | |
gaal | putter: sorry :( | ||
dada | which windows? | ||
gaal | xpsp2, native perl compiled here with vc++2003 | ||
dada | same windows here, using activeperl | ||
xp pro, no home edition, right? | 19:06 | ||
gaal | oh wait | ||
i'm blind | |||
sorry! | |||
dada | hehee | ||
putter wonders "is windows really that broken?", or do we just lack the experience. | |||
dada | the "hi" is on the prompt line? | ||
gaal | dada: it only works *sometimes* though. there must be a race condition? | 19:07 | |
dada | no, I get consistently "hi" on the next prompt | ||
gaal | ah, no, there it is: you're right, the spaces are what break it | ||
putter | eep. bye | ||
& | |||
gaal is too tired to hack, unfortunately | 19:08 | ||
dada is going home too | |||
eric256 returns from lunch. | 19:14 | ||
now to remember how to stop precompliing prelude | |||
dada | bye | 19:15 | |
eric256 considers maybe he should just use a feather accoutn to play with pugs and forget compiling it on windows | 19:19 | ||
dunno if anyone is still around.....finaly got it to compile by changing my configy.yaml to no precompile prelude...in the past when you then ran pugs it would say "loading prelude" but now it doesn't...should i be concerned? | 19:20 | ||
masak | i also have a late-night question: does $^W still exist in perl6? | 19:22 | |
eric256 | could setting the ghc_heap_size too large in config.yml make a big difference? is | 19:25 | |
gaal | eric256: it doesn't load the prelude because it has no prelude. maybe we need to revive the inlined source prelude as an interim measure. | 19:27 | |
masak: no, but you'll have 'use warnings' | 19:28 | ||
eric256: try making do with pugs -MPrelude | |||
eric256 | i'm sorry gaal i think i missed something there. what is Perlude.pm then? | ||
gaal | eric256: you need to copy it to your @*INC first though | ||
eric256: it's just a file that isn't automatically loaded | 19:29 | ||
eric256 | ohh i think i see...well i changed the GHC heap size, maybe it'll compile now..i had it set at 320mb | ||
gaal | it used to be inlined into the pugs image as source code, and evalled at runtime | ||
eric256 | didn't it use to load that for you if you didnt' compile it in? | ||
ahh | |||
gotcha. | |||
thanks | 19:30 | ||
out of curiosity...why did they stop doing that? | |||
gaal | i forget, do you do haskell? i think we left some of the mechanism for this in, but commented out: if you want to do it, go ahead | ||
eric256: there used to be no need: precompiling worked for everyone. | |||
eric256 | i know no haskel....unfortunatly, and i'm not sure i have the strength to learn it right now. ;) | 19:31 | |
gaal | and we wanted to avoid bloat. | ||
eric256 | gotcha. the heap size change seems to be working...its at least getting farther | ||
gaal | Run on the second pass is the critical step. | ||
eric256 | yea. i spoke too soon. | 19:32 | |
its realy annoying to have a program crash when you are out of memory...seems rude. ;) | |||
gaal | well, this is me for tonight. things are messy but i'm not focused enough to fix anything :-( | 19:33 | |
see ya tomorrow & | |||
eric256 | later | ||
hmmm....are we positive that its a memory issue i'm having? could it be an bad version of GHC or something else? I'm never getting withni 50mb of being out of memory, unless its trying to allocate a huge chucnk just all the sudden that doesn't seem like the right condition for running out of memory | 19:52 | ||
eric256 's computer looks like a NASA launch controlloer...scrolling text in one window and two sets of graphs constantly changing...jsut makes you feel important. LOL ;) | 19:54 | ||
geoffb | hello, all | 19:59 | |
eric256 | hey | ||
eric256 crosses his fingers and tries to complie with GHC 6.4.1 | 20:27 | ||
arg | 20:30 | ||
"ghc.exe: internal error: update_fwd: unknown/strange object 0" | 20:59 | ||
putter | hi. | 21:16 | |
fglock | hi | ||
svnbot6 | r7106 | putter++ | pugs: Attempt to placate windows. Created pugs.bat with perl 5.9's pl2bat. ./pugs now uses system() rather than exec() on windows. Hopefully that will permit interactive ./pugs. This may all be scrapped for a haskell-only implementation. | ||
putter | could someone on windows try running "perl -x ./pugs", with either the pugs from r7106, or an older one with exec() changed to system()? | 21:17 | |
fglock | sorry, I just recompiled - and I've moved the files around in order to make it work | 21:18 | |
putter | Err, ideally first checking that the version with exec() is _not_ working for you. | 21:19 | |
fglock: the key question is whether perl -e 'system("pugs_bin")' works, even when perl -e 'exec("pugs_bin")' doesnt | 21:20 | ||
hmm.. and I think those two commands are a sufficient test. | |||
fglock | testing | ||
eric256 | i would but sadly i can't get a compile....and now i'm getting that last error i posted..;( | ||
putter backlogs | |||
fglock | putter: both work for me | 21:21 | |
putter | oh, drat. | 21:22 | |
fglock: you used the resulting interactive pugs and everything was fine? | |||
is there anyone online for whom perl -e 'exec("pugs_bin")' doesn't work? | |||
dada. gaal: when you get a chance, please try perl -e 'exec("pugs_bin")' and perl -e 'system("pugs_bin")'. hopefully the first will have the problems you encountered, and the second wont. | 21:23 | ||
eric256: what cpu and version of ghc? | 21:24 | ||
fglock | putter: my .pl files are associated with the editor - so pugs -BPerl5 opens crude_repl.pl in the editor :) | 21:25 | |
putter | oh.. well, that's a separate problem... but the normal pugs interactive works? | ||
fglock | yes, it does | ||
version 7086 | 21:26 | ||
putter | on both exec() and system()? dada/gaal reported seeing what looked like a mix of command shell and pugs output. | ||
eric256 | 6.4.1 on a Windows XP Pro SP 2 with a Pentium 4 2.4GH and 504mb ram | ||
putter | apparently exec() is broken on some windows boxes but not on others. need someone with a broken one to tell me if replacing it with system() works, or whether they are both busted. | 21:27 | |
fglock | oops - yes, I see it - it looks like it has forked a new process, and both are reading from the windows terminal | ||
cmd.exe + pugs.exe | |||
putter | fglock: is that with system() too? | ||
fglock | testing again | 21:28 | |
putter | eric256: has 6.4.1 been released? if you have an old snapshot, especially an unstable one, you might try a new one. | ||
fglock | system works, exec has this problem | ||
putter | whoot. | 21:29 | |
eric256 | just downloaded it today | ||
putter | ok. so, hypothetically, r7106 should work under windows. | ||
eric256 | because 6.4 was giving me the same problem | ||
putter | eric256: oh, drat. | ||
eric256 | your telling me. lol | 21:30 | |
putter | fglock: could you try pugs.bat from r7106? | 21:31 | |
fglock | ok | ||
putter | (note that r7106 touched Makefile.PL... just in case that's a problem for you) | ||
eric256: did you check ghc bugzilla? | 21:32 | ||
svnbot6 | r7107 | stevan++ | Perl6::MetaModel 2.0 - | ||
r7107 | stevan++ | * Test::Builder port now takes case of loading paths for @INC | |||
r7107 | stevan++ | - (it makes running the tests easier) | |||
r7107 | stevan++ | * removed calls to resolve() in Shapes example, they are not needed anymore | |||
r7107 | stevan++ | * 32_parameterized_classes.t now calls does() as well as isa() to check types | |||
r7107 | stevan++ | to make chromatic happy ;) | |||
r7107 | stevan++ | * added new 33_BUILD.t test to check attribute handling | |||
r7107 | stevan++ | * added another parameterized classes test to test things like: | |||
r7107 | stevan++ | - Array of Array of Int | |||
eric256 | no. i was busy with realy work. lol. keep hoping i'll get just the right combination of settings...but i am about out of hope.. | 21:33 | |
putter | the ghc folks actively maintain and lookat and fix problems in bug manager. there's a link off the ghc homepage. | 21:34 | |
if it's not a known problem, lets help the ghc folks out by reporting it. I seen quick turnaround. and it would be nice to have 6.4.1 robust enough to run pugs without problem, thus escaping from the "to run pugs, ... big involved cruft re ghc ..." to a simple "ghc 6.4.1 required and sufficient". | 21:36 | ||
eric256 | i;ll check it out | ||
fglock | putter: the new pugs.bat works - it gives an error message ("No such file or directory at pugs.bat line 53") when pugs_bin terminates | 21:37 | |
putter | works... as in you can interactively use pugs_bin? | 21:38 | |
fglock | yes - note that the line number is for pl2bat'ed version | ||
putter | oops, doh. I left the post-exec() die outside the if(win){system}else{exec} fixing... | 21:39 | |
fglock: ok, hopefully fixed. | 21:47 | ||
hmm... or... I don't think I really understand the error message. could you try the new version? | 21:48 | ||
svnbot6 | r7108 | putter++ | pugs.bat: corrected bogus error message. fglock++ | 21:50 | |
fglock | testing | ||
ok - the error is gone :) | 21:51 | ||
putter | so... it's all working... ????!??? | ||
fglock | let me try with system($0,$bin,...) - this might fix the crude-to-editor problem | 21:53 | |
nothingmuch | TSa is making me tired | 21:54 | |
svnbot6 | r7109 | putter++ | pugs.bat: improved error checking/reporting | 21:56 | |
fglock | putter: I will probably need to use findbin to get 'perl.exe' before crude_repl.pl in the system() call | 22:02 | |
nothingmuch | MEANADJ-->FURLIKE on the BODYLOCATION | ||
from search.cpan.org/src/MSCHWERN/Bone-E...y/Rules.pm | |||
QUESTION-->do you have a sister who isn't so MEANADJ | 22:03 | ||
COITUS-->give my FURLIKE dog AILMENT | 22:04 | ||
AILMENT-->ADJ lovin' | |||
ADJ-->retarded | |||
give my hairy dog retarted loving | |||
putter | fglock: from brief and superficial scan of windows perl literature (eg, man perlwin32), it seems the usual thing to do is have .pl (hmm... bleeding on keyboard... where did that come from...?) configured for execution, rather that editing... | 22:05 | |
fglock | PxPerl asks what you want to do on installation - and I usually edit programs more often than I execute :) | 22:06 | |
just adding 'perl' works for me | |||
it shouldn't hurt, since most people have perl in the path | 22:07 | ||
putter | gaal: so using system() rather than exec() may work in the haskell version too. | ||
fglock | "pugs.bat -Cperl5" is working fine now | 22:08 | |
putter | what about pugs -Cperl5 , no .bat | 22:09 | |
fglock | after "rm pugs.exe" - it works fine | ||
oops - it is not compiling the lines: I get "Unrecognized char \x90 at ...\pugs_bin.exe line 1." | 22:11 | ||
putter | gaal: the currently contemplated "work around foo.pl triggering editor" hoop jumping is the kind of thing I thought might go more easily in pl than hs... | ||
but it has its own disadds. might be worth doing a tradeoff list | 22:12 | ||
err, what? | 22:14 | ||
fglock | the error is cause by something like "perl pugs_bin.exe" - but I have no idea why this is happening - is it because I "fixed" pugs.bat? | ||
putter | oh, you tried just putting in perl to the system call...? no, it also system()'s pugs_bin... | 22:15 | |
you would have to do something like unshift(@args,"perl") if $bin =~ /\.pl$/; | 22:17 | ||
fglock | ok | ||
putter | when PxPerl asked edit-or-exec, did it give a default? | 22:19 | |
putter womders just how common this case is... | |||
fglock | I don't remember - but I think it recommended the editor - I find it safer this way (if I want to make it executable, I can make a PAR or bat) | 22:20 | |
cool - it works now | |||
(that's because I almost always call perl programs from the command line) | 22:21 | ||
(and edit using double-click) | 22:22 | ||
putter | hows this | 22:26 | |
my(@args)=($bin, split($v, $_)); | |||
# PxPerl is said to give a choice, at installation, of the .pl suffix | |||
# triggering either execution, or an editor. This works around that. | |||
unshift(@args,$^X) if $bin =~ /\.pl$/; | |||
# exec() is broken on some windows. Interactive use of pugs_bin gets | |||
# command interpreter output mixed in. So we use system(). | 22:27 | ||
if( system(@args) == 0 ) { | |||
? | |||
fglock | ok (windows only, maybe) - it is nice to comment why you are doing that | 22:28 | |
time to leave! bye & | 22:29 | ||
putter | & | 22:30 | |
thanks for your help | |||
yet more that wouldnt have gotten done without it | 22:31 | ||
svnbot6 | r7110 | putter++ | pugs.bat: invoke $^X explicitly when calling .pl helpers, to avoid .pl suffix configuration issues. The pugs-as-a-script should now be working correctly on Windows. gaal++ dada++ fglock++ et.al. | 22:44 | |
nothingmuch | wow | ||
if i was a superhero i'd call myself aqualad | 22:45 | ||
en.wikipedia.org/wiki/Aqualad | |||
putter | nothingmuch: TSa? | ||
nothingmuch | tomas sandlass | ||
nothingmuch didn't understand a word from his previous email | 22:46 | ||
putter | wikipedia... Encyclopedia Galactica in the making... | ||
Khisanth | the number of people in that group seems to be growing :) | ||
nothingmuch | Khisanth: it's not that it went right over my head | 22:47 | |
i didn't understand the sentance structures | |||
nothingmuch is probably too tired | |||
Khisanth | I already guessed that! :) | ||
pasteling | "putter" at 66.30.119.55 pasted "a non-executable quick experiment" (2176 lines, 62.7K) at sial.org/pbot/13260 | 22:51 | |
putter | fglock, stevan: as a quick experimental hack last night, I explored what a "entire pilrun prelude in one file, in source-filtered psuedo-p6" would look like. | 22:53 | |
the motivation was | 22:54 | ||
G2 | When's Perl6 out? ;-) | 22:56 | |
G2 ducks | |||
putter | the right thing would be to use real p6, and a :p5 trait, so one has method foo () :p5 { q! ... ! }. but without pil2, pugs just isnt up to it. so the idea was to source filter psuedo-p6, extracting from it the equivalent of Perl6::Value/Container, PrimP5.pm, and PrimP6.pm. | ||
I was hoping the p6 would be sufficiently less verbose than explicit p5 metamodel that things would be come notably smaller and more manageable. | 22:57 | ||
It basically worked for the mm parts, but I didnt realize how much pure p5 code was in P6::V/C. It looked like there was some posibility of compressing that aswell, but I didnt try. | 22:58 | ||
The core idea was to move everthing into one place/(terse)form, where one could see and work with the whole thing. I'm not sure if it's a win or not. | 23:00 | ||
Regardless, comments would be welcome on the type hierarchy at the top. We'll need to implement that regardless of form. | 23:01 | ||
any thoughts? | 23:02 | ||
If one were to pursue the idea for real, the pasted file probably shouldnt be used as a basis. I played a bit fast-and-loose with the conversion. Just wanted to see roughly what it would look like. | 23:03 | ||
G2: unclear. speed of progress has varied a great deal. in part based on how much of autrijus's time we get. but we weren't able to dig up $3k/mo, so he's now at best part time. at one point I thought something plausible could be running by end of year. now it's less clear - timing is now more a social/economic issue than a technical one. | 23:06 | ||
s/in part based/in large part based/ | 23:07 | ||
joao | Hi | 23:09 | |
putter | hello | ||
joao | my @array = ("a","b"); $last_index = @array.last; print $last_index; -> this should work, or am I mistaken? | 23:10 | |
putter | ?eval my @array = ("a","b"); $last_index = @array.last; $last_index | 23:11 | |
evalbot_7110 | Error: Undeclared variable: "$last_index" | ||
joao | sorry | ||
putter | ?eval my @array = ("a","b"); my $last_index = @array.last; $last_index | ||
joao | I forgot the my :) | ||
evalbot_7110 | Error: cannot last() outside a loop | ||
putter | ?eval my @array = ("a","b"); my $last_index = @array; $last_index | ||
evalbot_7110 | ['a', 'b'] | ||
putter | ?eval my @array = ("a","b"); my $last_index = +@array; $last_index | ||
evalbot_7110 | \2 | ||
joao | well, I'm reading "Perl 6 and Parrot" and they give the @array.last example | ||
saying that it gives the highest index in an array | 23:12 | ||
putter, can you explain me, please? :) | 23:13 | ||
putter | Two posibilities - the language continues to evolve, so the book is already significantly out of date; and pugs is not a complete implementation of p6 yet. I'm pretty sure this is an example of the first case. | ||
joao | Oh | ||
?eval my @array = ("a","b"); my $size = @array.elems; $size | 23:14 | ||
evalbot_7110 | \2 | ||
putter | hmm... anyone want to write a "book compatibility" module? method last (Array @self:) { +@self } etc... | 23:15 | |
oh, yes, there is that. better. | |||
joao | nothingmuch, it's different | ||
elems give the number of elements | |||
putter | yes | 23:16 | |
joao | last should give elems-1 | ||
:) | |||
nothingmuch | huh? | ||
joao | the last index? | ||
putter | "Perl 6 and Parrot" apparently speaks of a .last method on arrays, equivalent to p5 $#array | ||
joao | yaps | 23:17 | |
page 26 O:) | |||
$#array gives the number of elements or the last index? | |||
putter | I'm off. Be back in 40 hrs or so. Cheers. Thanks again to gaal, dada, fglock, etal for their help. | 23:18 | |
joao: in perl5, yes. | |||
joao | putter, thank you | 23:19 | |
putter | err, yes, last index. | ||
joao | yes, I've checked :) | ||
buu | joao: Last index. | ||
Note that $#! is illegal! | |||
But @! isn't. | |||
The mind boggles. | |||
joao | What other methods do arrays have? | 23:20 | |
putter | So, I believe the recipe for pugs svn up and build, is... first delete "pugs" and "pugs.exe", and then everything should work. | 23:21 | |
bye all & | |||
joao | ?eval :1(2) | 23:28 | |
evalbot_7110 | ('1' => 2) | ||
joao | ?eval :1('a') | ||
evalbot_7110 | ('1' => 'a') | ||
joao | ;) | ||
QtPlatypus | ?eval (1=>2) => (3 => 4) | 23:32 | |
evalbot_7110 | ((1 => 2) => (3 => 4)) | ||
joao | hmmm :: ((Int,Int),(Int,Int)) | 23:33 | |
Pair of pairs? | |||
?eval :1(2) => 1(2) | |||
evalbot_7110 | Error: cannot cast from VInt 1 to Pugs.AST.Internals.VCode (VCode) | ||
joao | ?eval :1(2) => :1(2) | ||
evalbot_7110 | (('1' => 2) => ('1' => 2)) | ||
joao | :key(value) <- key can't be int? | 23:34 | |
QtPlatypus | ?eval ('root' => ('left of root' => ('Leftmost leaf') => ("Middle leaf)) => ( ('Right of node')=> ('Middle leaf') => ('Rightmost leaf') ) | 23:45 | |
evalbot_7110 | Error: unexpected "M" expecting block, "\\", "$!", "$/", "$" or "\"" | ||
QtPlatypus | ?eval ('root' => ('left of root' => ('Leftmost leaf') => ("Middle leaf")) => ( ('Right of node')=> ('Middle leaf') => ('Rightmost leaf') ) | 23:46 | |
evalbot_7110 | Error: unexpected end of input expecting term postfix, operator, ">>=><<", "\187=>\171", "=>", "::=", "**=", "xx=", "||=", "&&=", "//=", "^^=", "+&=", "+|=", "+^=", "~&=", "~|=", "~^=", "?|=", "?^=", ":=", "~=", "+=", "-=", "*=", "/=", "%=", "x=", "Y=", "\165=", "|=", "^=", "&=", "=" or ")" | ||
QtPlatypus | ?eval ('root' => ('left of root' => ('Leftmost leaf') => ("Middle leaf")) => ( ('Right of node')=> ('Middle leaf') => ('Rightmost leaf') )) | ||
evalbot_7110 | ('root' => (('left of root' => ('Leftmost leaf' => 'Middle leaf')) => ('Right of node' => ('Middle leaf' => 'Rightmost leaf')))) | ||
kolibrie | I'm having prototyping problems | 23:48 | |
I have a subroutine that I can call normally like this: | |||
my $lexer = tokens($input, 'date', rx /(\d\d\d\d)/) | |||
with a prototype like this: | 23:49 | ||
sub tokens ($input, $label, $pattern, ?$maketoken = sub ($label, $value) { [$label, $value] }) { ... } | |||
and that works great | |||
when I try to call that subroutine from somewhere else, like this: | 23:50 | ||
$lexer = tokens($lexer, *@$args) | |||
then the subroutine is not found | |||
*** No compatible subroutine found: "&tokens" | 23:51 | ||
if I add an asterix in the prototype before the first two args | |||
the subroutine is found, but the code ref is an undefined scalar | 23:52 | ||
any ideas? | 23:53 |