Run Perl6 Now! & pugscode.org ('Overview', 'Journal') & pugs.kwiki.org & channel log: xrl.us/e98m & < autrijus> damn, my journal keeps getting obsoleted by #perl6.
Set by Juerd_ on 12 March 2005.
jabbot pugs - 774 - added my IRC handle to AUTHORS (as if it 00:12
Steve_p stevan++ # testing Test :) 00:21
Great! not() was fixed :) 00:25
Limbic_Region . o O ( so ) 00:26
nothingmuch evening
Steve_p It had been broken for a while
Limbic_Region Steve_p - you missed my joke 00:28
so() is the opposite of not()
Steve_p Ohhhhh
I must have missed that discussion 00:29
Khisanth there is a so()?
Steve_p So so() converts other types to the correct boolean then?
nothingmuch darcs get nothingmuch.woobling.org/rssgrowl # uses growl to display new feed items on osx 00:30
Steve_p Larry melts my brain :O 00:33
theorb He used to do that to me, steve_p... sometimes, though, my brain thaws back into new and interesting patterns. 00:34
Other times, it just ends up as a puddle on the floor.
Steve_p heh 00:35
theorb, who are you right now? :)
theorb I am me.
Steve_p heh
theorb James Michael Mastros, at your service, good sir. 00:36
Steve_p I could remember how the orb/castaway nicks worked :) 00:38
s/the orb/theorb/ :)
theorb Quite simple: theorb, theorbtwo are me.
castaway is my girlfriend. 00:39
Steve_p OK :)
theorb Jessica Ann Robinson, by name.
(Though she very much prefers Jess.) 00:40
nothingmuch =( 00:43
whether is much better than so for poetry
so is not something i'd use for a sub name, though, so i'd rather that be the builtin
Steve_p so true ;) 00:46
nothingmuch damnit
Steve_p heh
nothingmuch anything tainted by a fh is not lazy
if it is lazy it's broken
if a user wants lazy interaction with the world, they have to work a bit harder than = 00:47
it is worse than not using strict in bad whether
Steve_p Oh, I thought you were damning "so true" :)
nothingmuch this is sooooo asking for trouble
nothingmuch wants taint mode generalization re-reviewed 00:48
it could be useful for control laziness in a good way
theorb Hm, both sound like good ideas to me. 01:08
Though I'm not convinced we don't have taint generalization.
That, or I don't quite understand what you mean by it.
nothingmuch theorb: i mean that tainting is controlled by traits that leak on assignment 01:09
or on interaction
theorb Was that a new rulling of Larry's, or did you just suggest that?
nothingmuch i suggested it to p6l
no one ever answered
p5 taint mode is just
my $data is tainted; 01:10
but automatically, from certain sources
then we could have the is eager taint;
theorb You can do that yourself with MMD, can't you?
nothingmuch if either side of an assignment is eager, the expression is unlazified
you could also have weirder things
a nice example i came up with is data sterility
my $data is private($handle); 01:11
my $other_data is private($other_handle);
since not($handle :=: $other_handle);
any place where $data and $other_date;
a
or their tainted deriviatives
interact with each other, is a fatal error
this is very useful from a security point of view
etc etc 01:12
the point is that these traits can be written as roles or something, i dunno my terms
and you have an infect multimethod
which is called with a $source and a $target
as a sort of, err, instantiator 01:13
and that is called automatically whenever objects touch each other
by objects i really mean values 01:14
theorb Hm, I see ways to do it, but not without it touching a lot of different things.
nothingmuch i would at least like someone to comment on it, but no one has =(
theorb ...it does sound very interesting
nothingmuch one thing i'd like to use it for is to make sure data doesn't leak out 01:15
my $templater is private($user);
my DBI::Objectivier $object->auto_private("secret_column_name")
without explicit sanitization, i.e., a single point where this data is fudged
theorb ...so you make sure that data tagged with $users{theorb} can't touch filehandles tagged $users{nothingmuch}.
nothingmuch explicitl
it would be a fatal error to print that error 01:16
uhuh
01:16 safrican is now known as evilSafrican, evilSafrican is now known as safrican
nothingmuch it could also be useful for debugging data flow, along side control flow 01:16
theorb I can certianly see the use of it.
nothingmuch a much more concise trace, having to do with the consequences of using x or y 01:17
theorb ...otoh, that method is going to see a /lot/ of calls.
nothingmuch and the process that brought it there
it's not meant to be something you use all the time =)
taint mode does these kinds of checks
theorb Also, data flow and control flow aren't the disseperate things you think they are.
nothingmuch the slowdown is bearable
data flow as i see it is a subset of control flow i'm usually more interested in 01:18
theorb I know, but taint mode is done with a perl-level global.
if (length $theorb->{password} < 5) {$flag=1} else {$flag=0};
Should $flag be tagged with $theorb->{password}'s privateness? 01:19
nothingmuch that's another discussion, i think
taintmode in p5 is/was documented in a way that you weren't really sure if flag was tainted or not
presumably this could be dealt with when defining the trait
how contageous is it?
does it leak across whole sub/method calls? 01:20
theorb Note that that code is semantically equif to $flag = length $theorb->{password} < 5 ?? 1 :: 0;
nothingmuch does it leak across single statements?
only by direct assignment?
in that case you are still not assigning $theorb->{password}
contageousness could also be degenerating in this case
theorb The def in p5 is vauge in no small part to allow details of optimization to change without going against what had been said about taints.
...because trinary and if are very much the same thing in p5. 01:21
nothingmuch uhuh
the performance issue is probably tough to deal with
but given important data
theorb Not terribly, actually. 01:22
nothingmuch i bet a company is willing to chuck an extra 20% for hardware $$$ to get added security
if that's what it takes
theorb It's MMD on two arguments, with the default being NOP. It's a problem that will have to be delt with a lot anyway.
The problem
The problem is that you always get the overhead. 01:23
Because there's no way to tell if anybody, anywhere, is interested in it.
Or will become interested in it.
nothingmuch what if it's a 'use plague'?
theorb Eh?
nothingmuch well behaved modules will make it's loading optional 01:24
theorb Hmm, I take that back.
Hmm.
nothingmuch it's an overhead that many modules deal with anyway: maknig everyone happy
configure to use x, but not do it if it's not necessary, because it's slow
see the bajillion lazyloaders on cpan
see various BEGIN { if () { require, ->import } }
theorb The reason, now that I think about it more, that -T in p5 has to be a command-line argument is that it needs to change things very early on. 01:25
nothingmuch theoretically, only the outer layers need to be aware of this, too
the points where data goes in and out of the system should be guarded, optionally
obra perl5 taint is also way too big a hammer
theorb ...so that %ENV is tainted, and everything that depends on %ENV before even the first line is checked for #! and that magic.
nothingmuch and for this to be configurable is not not very difficult
theorb I don't know about that; in many ways it is too small a hammer. 01:26
You can print out tainted data, for example.
And give it out to exec in some circumstances, IIRC.
nothingmuch what i would like to see with generalization is factoring into policies
theorb I think you mean compartments.
nothingmuch is it fatal? for what parts is it fatal?
what kind of ops auto taint? input? 01:27
only from tainted places?
what are we allowed to do with this?
this will all go into the taint trait
which is backwards compatible and a bit more to p5
using the same ideas to provide a little more control
like -t and -T in the same script
while other more complete, and costly alternatives may arise 01:28
choice is why we are better than x y z (insert php, python, java)
obra I'd like to _not_ taint filehandles in a web app, for example 01:29
nothingmuch ... because they are mostly logs and such?
err, my bad
input files on the webserver, which is not evil
theorb I'd like to taint only some filehandles in a web app. To whit, the three STD handles.
Er, actually, by your description of taint, it's more complicated then that. 01:30
nothingmuch btw: look at DBI and it's tainting policy... i don't think this has seriously hurt anyone, complexity or performance wise
theorb STD* and all other handles should both be tained, but in different compartments, and never the twain shall meet.
obra yeah, most everyone turns off taint in production.
theorb I'll admit to just not using it. 01:31
nothingmuch same
but i do see uses for it
theorb Oh, so do I.
nothingmuch taint mode is to me, something that can be resolved by proper abstraction 01:32
theorb But as far as I can tell, at present, it's pretty useless.
nothingmuch if i make sure that by design, naughty data does not go into something that gets sensitive data, i'm fine
plus i've never needed to develop apps where this is important
mugwump it has its niche. but I think p6 has other ways of achieving the same result, no?
obra With 6, would it be possible to create a TaintedScalar type?
mugwump would that be a trait?
obra er sorry 01:33
TaintedStr.
so that when I pass in tainted data, it just gets magically validated and untainted if safe
or it's not actually a TaintedStr and I have a prototype failure
nothingmuch obra: interesting idea 01:34
i don't recall tainting ever discussed
but then again, i haven't been really around perl at all when p6 started booming
theorb obra, you mean you say $foo is matching(/\d+/), and all assignments to $foo check if they match \d+, and die if not? 01:36
That'll be possible, but obnixious, I think. 01:37
mugwump obra: pugs.kwiki.org/?KwidSpecJihad
also ingy
theorb Larry's got a thing against reasonable lvalue subs.
obra mugwump: :) 01:39
theorb: I think that's what I mean
but basically being able to specify type validation in perl, yeah
mugwump that stuff should tack onto the metamodel really 01:40
nothingmuch what is the metamodel?
theorb: i don't think it's much different than the 'my $var will ...' stuff
mugwump My favourite word for the collection of classes that includes "Class", "Method", "Trait", etc. 01:41
nothingmuch ah
mugwump Hopefully there is enough information in S10-S12 to write a haskell Meta-Meta-Model that these Meta-Model classes can be defined in 01:42
Then, they can also define themselves. 01:43
obra that's getting a little meta, sam ;)
mugwump Basically the meta-model is the only one you're interested in, apart from for bootstrapping
alright, I'll admit it. I just like using the "meta-meta-model" at every opportunity 01:44
theorb He says, as if bootstrapping were easy.
mugwump It's a commonly solved problem in the world of CASE
nothingmuch <shameless_plug>Object::Meta::Plugin</shameless_plug> 01:45
;-)
mugwump nothingmuch++ # gratuitous combination of three abstract terms, including Meta
nothingmuch it's basically a system of inheritenece that works with perl's native one, which is supposed to ease the composition of meta-objects from composable pluggable ones 01:46
s/basically// 01:47
mugwump yeah. that stuff is just ugly in p5
you can get the structure right but the semantics usually suck
nothingmuch i was actually rather pleased with the semantics 01:48
it took a lot of effort
mugwump raises an eyebrow and looks on cpan
nothingmuch it's purpose was to help make a system which is very, err
not systemy
the user tells some interface how to build the app
which componenents to include in the runtime 01:49
but i never got around to using it
i took up a job instead
mugwump heh
nothingmuch it's usefulness is that it helps build paradgims like pipelines and filter chains, and capability based dispatching 01:50
without getting in the way of normal p5 oop
i wouldn't recommend using it though, unless it exactly fills your niche requirement, so YMMV =) 01:51
theorb And let's hear it for p5 OOP; may the blessed hashref never die.
nothingmuch hoorah! 01:52
though for performance reasons i used array refs there, to do some faking
because they are less popular
the array is tied
everything else is overloaded
mugwump bless sub { ... }, "Hooray!"
theorb Wait... you used a tied array... for /more/ performance? 01:53
nothingmuch well
mugwump heh. it's only as bad as a method call
nothingmuch one of the data types had to be fudged
either array access, or hash access, or scalar access, or...
i chose arrays because anyone using them is probably not serious
and stuck them with the slowest, least convenient solution 01:54
anyway, you don't want to know
it's about namespace separation between the plugin-objects
theorb I more or less remember, nm.
nothingmuch which pretend to be one object with their peers, but also distinct, at the same time, in a sane way
well anyway, i must be off 01:58
theorb OK, after some consideration, I think I'm calling it a night, rather then getting up and going into the other room to test this.
Oh. Good timing; goodnight.
nothingmuch thanks for a good conversation, everyone!
Steve_p What port do I open on my firewall for SubEthaEdit? 02:03
cls_bsd autrijus: I found it should set -L${PREFIX}/lib in Makefile.PL to get ghc 6.4 linking pugs 02:12
jabbot pugs - 775 - Add Andrew Savige's case for non short c 02:22
Alias_ Don't suppose anyone has a HTML diff thingy do they
Might be interesting for people if there were visible examples of the Algorithm::Dependency code before/after p6ificiation 02:23
jabbot pugs - 776 - Add Bryan Donlan's return in while test 02:32
crysflame where is CPAN for Perl6? 02:33
mugwump in the pugs dist under ext/ :)
02:34 _metaperl is now known as metaperl
crysflame so Alias's perl6 Algorithm::Depdendency is there too? 02:34
mugwump I think so
Alias_ yes
crysflame heh, cool
Alias_ It's the same, but "different"
A bit wordier than I expected, and it feels sort of inside-out
But otherwise very good porting example 02:35
I'm a bit worried about the Kwid idea... 03:49
I'm looking at pugs/ext/Kwid/t/README and for something that is supposed to be more readable as source, it doesn't look very readable to me 03:50
oh wait... that's the Kwid bytecode... 03:51
obra heh 03:55
Alias_ But still, concerns persist... like the fact that it uses all of the normal perl characters as markup 03:56
How would one replicate..
=head2 method $param [, $optional ]
or deal with C< something something blah and then you install to the /etc/foo/bar directory, assuming it exists > 03:57
I have to \/etc/foo/bar all the time? 03:58
Steve_p Isn't it `/etc/foo/bar`? 04:00
Shoot, no, it changed :-/ 04:01
jabbot pugs - 778 - * be more specific in 'setting LANG to U 04:02
pugs - 777 - * remove unneccassary 'return' from Test
ingy fyi, for those following along at home, there is no need to escape /etc/foo/bar 04:36
because it breaks the hugging rule 04:37
ingy looksaround fo Alias 04:38
=head2 method $param [, $optional ] also breaks the hugging rule for that matter 04:40
jabbot pugs - 779 - * AlDep: beginning to adopt the Selfless 04:42
lucs Don't break the hugging rule! (wti) 05:18
lucs hugs ingy 05:20
lucs pugs autrijus
ingy tugs lucs 05:21
jabbot pugs - 780 - * Introduce VThunk (not yet available to 05:22
lucs ingy: Any chance you'll be at YAPC Toronto?
ingy lucs: there is always a chance... 05:23
but not planning on it yet
lucs Oh :/
ingy I go to YAPC Taiwan next week 05:24
and I hate the Toronto airport fwiw!
lucs Go by train ;)
ingy customs there is a nightmare
lucs Customs, nightmare, I wonder why that is... 05:25
;)
jabbot pugs - 781 - * really fix 'nor' 05:42
pugs - 782 - * work VThunk into Prim.hs's op2Logical 05:52
06:00 Adam_ is now known as Alias_
autrijus greetings \camels! 06:18
obra hi autrijus
autrijus hey obra. 06:19
obra what's up?
autrijus just woke up and fixed a bunch of bugs
obra is about to post a summer internship job posting
jabbot pugs - 783 - Adding t/op/trenary.t and moving some te 06:20
Alias_ how does jabbot work? polling the repository, or triggered _by_ the repository? 06:22
Khisanth probably polling, since multiple revisions are sometimes printed backwards here 06:25
autrijus polling. 06:26
jabbot pugs - 786 - * also s/trenary/ternary/ in comment 06:30
pugs - 785 - * s/trenary/ternary/
pugs - 784 - Missing commit.
scw Thanks for correction. 06:37
autrijus np :) thanks for the tests 06:38
scw: so ?? :: is all happy now, I gather?
scw autrijus: I think so. I tried to crash it but failed :p
autrijus XD 06:39
scw However, do you think we should revert r606?
autrijus rulePostTernary is gone anyway 06:41
so the question become one of rulePostConditional.
i.e.
1 if 2 if 3 if 4
scw Ya, and (1 if 2)
autrijus which, barring a larry rulling, I'm inclined to keep.
i.e. I consider it sane
(I was surprised when I first learn perl that it could not be so used) 06:42
but if there's a ruling against it I'm willing to drop it also.
scw I always want to write something like say "haha" if $_ for @things 06:43
autrijus ooh, postfix for. I had not implemented that.
let me do that. you willing to write a test that exercises it? :)
scw sure :) 06:44
cls_bsd autrijus: do you have the same problem? # nopaste.snit.ch:8001/2050
in ghc 6.4 06:45
autrijus ... implemented.
cls_bsd: I think you need to depend on libgmp 06:46
scw autrijus: Err, don't you think you do it so fast? :p
autrijus /usr/ports/math/libgmp4
cls_bsd autrijus: yes, and check this :)
autrijus: www.freebsd.org/cgi/cvsweb.cgi/port....2&f=h 06:47
in FreeBSD with ghc 6.4, I need to specify -L${PREFIX}/lib in Makefile.PL
otherwise failed to link
autrijus: so I'm not sure if it's general to modfiy Makefile.PL or just patch it in FreeBSD 06:48
autrijus I think just patch it in freebsd for now 06:49
we'll know if other people run into trouble
debian people seems happy as-is
cls_bsd ok
autrijus scw: ok, I see why "if" should not be nested inside expresisons. 06:59
say $_ if 5
will be parsed as
say ($_ if 5)
because expressions is tighter bound.
so, I've finished "while", "until", "for" and moved postcond into statement level
committed. enjoy & 07:00
obra later
jabbot pugs - 787 - * postfix while/until/for; postfix modif
Khisanth so say($_) if 5 would work or no? 07:01
scw WoW 07:03
hoowa in perl6 i call a subroutine is $return = %hash{getvariables} and call a string is $return = %hash{'getvariables'} that's right??? 07:11
jabbot pugs - 788 - t/base/post.t tests post form of if/unle 07:30
nothingmuch morning 07:53
hola larsen 08:18
larsen Good morning. 08:19
autrijus greetings. 08:25
obra autrijus, have you seen www.cs.huji.ac.il/~yweiss/Colorization/
Not at all related to your specializations. But pretty.
autrijus insanely cool. 08:26
nothingmuch autrijus: bug in zip 08:27
according to the s29 draft, it should put undefs for values of arrays which aren't long enough
autrijus so it matches the longest?
there goes the useful idiom of `zip` 1..Inf 08:28
obra testing people. A crazy idea: a nopaste bot that fills in the perl6 test magic.
autrijus obra: elaborate?
obra or even a sample test script. so that people demonstrating buggy behaviour can just fill in their code
nothingmuch autrijus: yes
obra rather than people say "hey. i found a bug"
nothingmuch autrijus: i'lll write tests, but then I'd like to fix it myself
obra just a way to more easily turn bug reports into tests. 08:29
autrijus hoowa: right, %hash{foo} now means %hash{'foo'}
hoowa: to quote foo, use %hash<foo>
to interpolate foo, use %hash<<foo>>
obra but really, 3:30am
autrijus nothingmuch: ok. then you need to fix transpose.
nothingmuch: just see its Prelude definition and rewrite it so it matches the longest. 08:30
nothingmuch what do i fill in for undefs?
autrijus VUndef
nothingmuch ok
autrijus alternatively, get the length of inputs 08:31
and manually match them to the longest one 08:32
but that won't work
because you need to be able to zip multiple infinite lists
nothingmuch =( 08:35
autrijus ?
lightstep it can work. you can do xs ++ (repeat VUndef)
nothingmuch nevermind, btb
brb
autrijus lightstep: err.
the problem is that perl6's (zip) matches to longest 08:36
not shortest
we can't blindly tackle repat VUndef to both arguments.
s/both/all/
because that will make them all infinite.
lightstep oh. stupid me
autrijus so I just told nothingmuch to hack transpose.
we were using transpose as the implementation; now we just need to let it undef-fill missing columns. 08:37
lightstep yeah, i know, i followed on the log before joining
autrijus ok.
lightstep having the logs is cool
autrijus yup
hoowa autrijus i have a question for hashlist context. can i ask u with chinese in perlchina room?
autrijus sure
08:42 _metaperl is now known as metaperl
lightstep what should 'abc'[0] evaluate to? 08:47
some test implies that is should be 'abc' 08:48
autrijus that makes sense.
'abc'[0] is the same as 'abc'.[0] 08:49
which is the same as ('abc').[0]
I don't know for sure if it's correct though.
it is never 'a'.
it's either 'abc' or syntax error.
lightstep currently, it somehow becomes ('abc') 08:50
autrijus that is what I expected.
but that's wrong 08:51
[0] should become a scalar
[0,] is the list form.
I'm not sure if we have a test for that.
scw but @a[0,] not even parsed 08:52
autrijus right, as is any trailing comma.
is there a test for them?
that is actually an easy-ish Parser.hs fix if you are interested 08:53
lightstep they are tested implicitly in reverse.t. some of the test there don't relate to reversing, as far as i can see
i'll want to look at it, to learn about Parser.hs 08:54
btw, i'll also change the suspicious foldr on line 600 08:58
autrijus hm? 08:59
oh, foldl it instead?
lightstep i'll be more efficient and lower order
autrijus fine by me
you can probably tell that I was a one-month-old haskell newbie when I started pugs :) 09:00
so, lots of cargo cults
lightstep what is the name of the range thingy inside an array subscript? 09:04
(i need to name the parser)
autrijus indice? 09:05
hmm, GHC 6.4 is out to most platform now 09:13
think we can drop GHC 6.2 support by Pugs 6.2.0? 09:14
that way we gain native Version objects 09:15
and Graph, and more efficient Data.Map etc
lightstep Pugs 6.2.0 seems really close
autrijus ...or even dropping GHC 6.2.2 support by next week's 6.0.12...
cls_bsd gogogo 09:16
autrijus cls_bsd: you say that because ports has ghc 6.4 now :-/
but debian etc is not updated, is it?
lightstep 6.2: Basic IO and control flow elements; mutable variables; assignment.
we have some of those
autrijus lightstep: we have all of those.
some still buggy :-)
steveq There's no ghc 6.4 in Debian yet as far as I can see
lightstep there is 09:17
not in the official mirror, though
steveq ah right
autrijus ok. we'll wait a bit more then.
once all committers can upgrade to 6.4 without much difficulty
we'll drop 6.2 support
I wonder if STM can be exposed at pugs level. 09:18
should be fun. :-)
cls_bsd push debian~~~
cls_bsd over some pugs to debian
autrijus wonders if porting parrot to C-- makes sense. 09:19
probably not by this stage.
lightstep i will make the subscript work, without changing the parser, i think. i'll just take the indices in list context 09:21
autrijus uh no. 09:22
[0] # scalar context
[0,] # list context
larry ruling.
basically it is list context if it's a Syn ","
lightstep @3d_slice = @array[ !($_ % 2) ; 0..9:3; ?test($_) ];
if i implement some, why not all?
autrijus or if it's an expression that 'looks like' a list.
sure, go ahead :)
lightstep i don't even know what that means 09:23
autrijus heh
see dev.perl.org/perl6/synopsis/S09.html
lightstep odds on first dimension, 0,3,6,9 on second, indices passing test on 3rd?
autrijus exactly. 09:24
lightstep but nothing else in the current parser supports `;'. how will i signal the pilots? 09:25
autrijus theoreically ';' is parsed as Syn
but only inside brackets.
i.e. [] and ()
outside brackets 09:26
it is statement-ending stuff.
that makes it tricky to parse; basically we need to add ';' to ruleExpression's big table
udner loostOperators
but in ruleStatement, we can't use that.
s/loost/loose/
in ruleStatement, we have to use the expression table that does not include ';'.
I hope I'm making sense. 09:27
lightstep you do, until i notice that ; isn't in looseOperators, it's in operators, and it's commented out 09:28
autrijus yeah because it breaks ruleExpression level parsing. 09:29
see ternaryOp for an example
in ternaryOp we only use tight
and ignore loose
so by the same vein
in brackets we allow semicolon ("extra loose")
and outside brackets we pretend it doesn't exist. 09:30
meaj guys i need a php and mysql registration and login tutorial
autrijus meaj: try www.google.com/ ?
or try #php :)
meaj common
i've tried that
autrijus lightstep: don't assume the ?test($_) form (autothunking) yet 09:32
lightstep: I'm writing to ask larry.
lightstep ok 09:33
and i'll also not assume x..y:z, but will use only standard parsing routines 09:34
autrijus right.
x..y:z should work
but it's in the range operator signature
gaal hi all.
autrijus has nothing to do with slices.
greetings, bold gaal
gaal oh, my, this client is playing mind games with me.
meaj www.onlamp.com 09:35
rgs my eyes hurt. /mode +c
gaal and the nickserv doesn't like me.
autrijus yay. not bold now.
what are you using as an irc client? telnet?
gaal yeah, sorry about that. no, trillian.
autrijus oh ok :)
gaal netcat to potr 6667 :-p 09:36
meaj hey!
i need some perl tutorials
gaal and i need some luvin'.
autrijus meaj: learn.perl.org/
meaj thanks
autrijus meaj: but really, you probably want perl 5 tutorials, in which #perl6 is not the place :)
it will be another few weeks before we can write full-fledged login and registration web applications in perl 6 :) 09:37
so in the mean time, try perl5
it's really not a bad language for that task
steveq Anyone started porting the CGI suite to perl6 yet? ;-)
autrijus steveq: no, wanna try? :)
steveq if only I had that much spare time 09:38
autrijus :)
steveq It shouldn't be difficult, it doesn't do anything too complicated, it's just HUGE
autrijus exactly. 09:39
steveq I guess it's not possible to do the OO interface yet
autrijus so, may I interest you in learning PPI and write PPI -> PugsAST translator? :)
lightstep what is Inf in Pugs?
autrijus lightstep: Inf in Pugs is Inf.
steveq What's PPI?
autrijus steveq: search.cpan.org/dist/PPI/
it's a parser for perl 5.
steveq ah
autrijus it generates a tree that can be translated to pugs tree. 09:40
dada hola
lightstep oh, i now see that dotdotdotLiteral fails 09:41
autrijus greetings!
lightstep are there test for the list literal? 09:42
s/test/tests/
viirya autrijus: have anyone report you the failure of Makefile on Windows? 09:43
autrijus viirya: yes, several in fact.
I can't duplicate any of them :-/
viirya autrijus: I just found one, but have no idea of why it's wrong. 09:44
dada just tried, the Makefile seems fine on Windows 09:45
autrijus ingy: win32 hates your magicks :-/
viirya dada: do you modify manually any thing?
I comment some lines to make it works.
autrijus viirya: oh?
viirya autrijus: one of two pure_all declaration. 09:46
autrijus !.
mail Makefile to me? 09:47
and Cc ingy
viirya ok.
autrijus: do you have mail of ingy? 09:48
autrijus ingy at cpan dot org
dada viirya: no, I didn't modify anything
viirya weird. 09:49
dada I'm using nmake 7.10.3077, BTW
(the one from Visual Studio .NET) 09:50
autrijus I'm using the free nmake15.
viirya same with autrijus's version.
autrijus dada: also send your Makefile to me. 09:51
viirya: if you comment out the build_subdirs line 09:52
does it then work?
lightstep (1;2) isn't a list, is it?
dada autrijus: where? 09:53
jabbot dada: where is your conscious
autrijus dada: autrijus at autrijus dot org
lightstep: it is not.
lightstep: it is a tuple into a 2-dimentional Array.
lightstep huh? 09:54
autrijus s/into/that slices/
say we have a matrix
[ 0 1 2 ]
[ 3 4 5 ]
[ 6 7 8 ]
lightstep S09 implies that it's a value in its own
and not used only for slicing 09:55
(it doesn't specify other uses, though)
autrijus well, let me put it this way
";" is a list op
or rather, list-associative op
viirya autrijus: sent. I'm trying for build_subdirs. 09:56
lightstep which evaluates to some list-of-lists, which doesn't exist yet in pugs?
autrijus inside [] brackets, it merely serves as the non-concating ","
pugs has list of lists.
VList [ VList [1,2], VList [3,4] ]
is one such thing.
viirya autrijus: works smoothly after commenting it. 09:57
dada so, isn't (1;2) a shorthand for ([1], [2])?
which, in fact, is a list
autrijus dada: inside [] brackets, yet.
dada are you sure autrijus? 09:58
lightstep isn't [1] the same is (1) ?
dada lightstep: no
lightstep oh, dear
autrijus lightstep: they are the same under scalar context.
dada lightstep: note that $a = [1] and $a = (1) do the same thing
autrijus under list context, [1] is ([1]) and (1) is (1).
dada ...as autrijus said 09:59
lightstep ok
autrijus so ((1,2),(3,4)) is (1,2,3,4)
but [[1,2],[3,4]] is never [1,2,3,4].
that's one of the fundamentally weird thing about perl6. 10:00
takes some time to get used to it.
lightstep [[1,2],[3,4]] is the list of lists (1,2) and (3,4) ?
autrijus yes.
steveq I'm slightly surprised that ((1,2),(3,4)) is (1,2,3,4)
autrijus steveq: because it's list context all the way
steveq seems to me that it is a list that contains two lists
autrijus and () flattens inside list context. 10:01
lightstep and ([1,2],(3,4)) is ([1,2],3,4) ?
autrijus lightstep: yes.
lightstep at least haskell nested list syntax still works
autrijus sure.
welcome to the world of cryptocontexs! 10:02
cryptocontext, even
dada autrijus: I'm not sure that ; is allowed only inside [] brackets 10:05
autrijus dada: I'm sure it's allowed elsewhere.
my $a = (1;2;3);
that also works. 10:06
my point is merely that
my $a = 1;2;3;
is something very different.
lightstep so semicolons-as-listops are context dependent. i think that is breaks the boundaries of buildExpressionParser. i could create another expression parser, for inside parens&brackets
autrijus also,
my $a = {1;2;3};
uses ';' as statement specifiers.
lightstep: that is a good idea. I think you can put Y and ; to that category. 10:07
lightstep but why not dispose of expression parsers, and just descent recursively? 10:08
*descend
english is so confusing these days
autrijus oh, never mind, Y does not belong in the same category as ; 10:09
hrm, or maybe it does. decisions decisions 10:10
lightstep i think it doesn't
autrijus but the current ";" in the bottom
is not the slicing ;
lightstep well, it does, but Y is in both parsers, and ; is only in one
autrijus I'm thinking that
my $a = 3 Y 4;
nvm. it should be parsed (my $a = 3) Y (4) anyway. 10:11
lightstep really?
autrijus look at the table in S03...
= is tighter than Y
but then, "Y" is listed at the same level as ","
and
my $a = 3,4;
clearly means 10:12
my $a = (3,4);
lightstep and they won't fix it even after you pointed it out?
autrijus but in perl5 it means
(my $a = 3), (4);
so I think it applies to Y too.
lightstep: I think that's actually intensional.
i.e. not a bug, a feature.
so, back to recdescent.
if you are up to rewrite Parser.hs to be recdescent, sure! 10:13
although I think the ';' case can be fixed by introducing extra-loose
lightstep we have this env threading thingy which i don't know how to do: are the bindings there always global?
autrijus if you think recdescent is the way to go, I'm all for it
you mean Env as state? 10:14
lightstep yes
autrijus I don't think it's actively used.
Parsec will be made into Eval anyway.
so it's just there as a stub.
once parsec is in eval, bindings in there can be local.
consider:
if (...) {
my sub infix:<ZZZ> { ... } 10:15
$a ZZZ $b;
}
it's clear that the operator table needs to parse ZZZ
but only lexically.
that is the reason why Rule.hs must be moved inside Eval monad.
lightstep so there are no separate parsing and evaling stages in perl6 10:16
autrijus there is a bit parsing
a bit evalling
but all inside the same monadic environment.
lightstep and it's supposed to be compilable?
autrijus it si.
it is.
scary enough yet? 10:17
autrijus points to hs-plugins and TH for prior art
lightstep are all the infix operators resolvable from the ast?
autrijus or rather, lisp.
no; some may be randomly generated.
think nethack.
err. 10:18
lightstep i don't know how th works, but lisp runtimes come with an evaluator
autrijus yes, and perl6 must too.
there is this eval "" primitive.
so dynamic recompilation
and/or a bundled bytecode interpreter.
so maybe eval"" is always interpreted.
or maybe eval"" does a recompilation on the fly, hs-plugins style. 10:19
lightstep i can imagine how it would be compiled, without precompilation. the expressions will be closures parameterised by their unresolved infix operators
s/pre/re/
autrijus sure! it will be a set of cascading recompilation.
that has always been the plan, iirc.
since perl6 macros is written in perl6 itself
and can affect parsing simply by swapping out the parser grammar in midst of tokens. 10:20
i.e. one can declare, lexically, that ";" now stands for ",".
lightstep how is precedence figured out?
autrijus when you declare a rule, you must assign it a precedence via "is equiv", "is looser" or "is tighter"
it defaults to something sensible. 10:21
see dev.perl.org/perl6/synopsis/S06.html "subroutine traits".
when people ask why perl6 parsing spec took ~3 years to arrive, I usually point to that as the answer 10:22
lightstep the parser must read an expresion before evaluating it, and some parts of the expression might declare new infix operators with unexpected precedence. even figuring out the dwimmy semantics is hard 10:24
autrijus aye.
lightstep even befunge is compilable, though, and it has real self-modifying code 10:25
autrijus I think every interpretable language is compilable by definition; the boundary is merely how small a RTS you can make.
the underlying thing is always a church, I mean turing, machine ;) 10:26
lightstep you mean a jot machine
autrijus maybe a wayback machine. 10:27
or a game of life machine, or rule 110 ;)
lightstep how are the operators extracted from the environment? are they the variables that are subs that have been declared infix? 10:28
autrijus aye. 10:30
actually, even prefix subs affects parsing.
unary subs consumes only one thing
and makes "," lowprec than it 10:31
list subs consumes as many "," as possible.
actually, we already support that for our unary primitives in Parser.hs 10:32
as you can see, perl is a very dwimmingly dynamic language by tradition, and larry & co is making it even more so. 10:34
oh, and the parser needs to be transcribed into Perl6 Rules at some point.
lightstep aren't rules only good for matching and stuff? 10:35
where stuff is parsing non-perl languages
autrijus uh, no. 10:36
rules is designed to parse perl.
it is recdescent but with arbitary backtracking/lookaround
and one of perl 6.0.0's TODO is to parse perl with perl rules 10:37
so you can easily tweak the parser by modifying the main grammar.
where the grammar is a perl 6 module.
I will not comment on the sanity of this, only that it is what needs to happen :)
lightstep so why is implementing the parser in rules part of the pugs project? shouldn't it be part of the language definition (like the derived syntax in scheme)?
autrijus yes, in fact the person responsible for it is the grammar engine guy
the one Patrick Michaud (pmichaud around here) 10:38
lightstep and is it progressing?
autrijus it is; he is working on a C compiler that compiles rules into parrot
so rules can at least run.
the problem with perl6 before was that there was nothing parses perl
and until the PGE (the thing in C that compiles rules to parrot assembly) is finished, nothing could 10:39
and PGE was blocking on parrot
etc etc.
so Pugs is sort of just replacing PGE with parsec, parrot with GHC RTS, and go from there.
lightstep oh
autrijus pmichaud says a fully working PGE next week. 10:40
lightstep wow
he might beat us to it
autrijus which is fine 10:41
we can then use FFI to link PGE
and let PGE compile rules into some primitive haskell
either parsec, or something in Eval.
alternatively, port PGE over to haskell.
either way will save lots of work.
autrijus stresses that pugs is in no way a competition with PGE and Parrot :) 10:42
lightstep i meant is as admiration 10:43
autrijus ah. ok :)
lightstep as in "pmichaud signle-handedly beat ten gorillas"
autrijus er. it is maybe worth nothing that PGE was in the works for the past half year or so :)
lightstep fodd & 10:44
elmex just checkedout the latest svn, build and run the tests. is it ok if a few tests fail? 11:04
autrijus yes; I'm looking into it.
it is generally okay for tests to fail inbetween releases. 11:05
elmex i got Failed 4/99 test scripts, 95.96% okay. 10/1691 subtests failed, 99.41% okay
autrijus nod.
elmex ok
just wanted to look at the synopses and try out perl6 ;) after waiting so long for parrot and perl6 to 'finish' 11:07
autrijus I hope you like what we have so far :) 11:09
elmex it's impressive what amount is already implemented.... and haskell is a language i like much myself, just that i never write much code in haskell and my .hs skills are a bit rusty.. 11:11
autrijus elmex: that's okay. you can practice it here :)
may I strike your fancy in implementing more primitives? :D
elmex what kind of primitives? 11:12
autrijus primitive functions;
basically take "perldoc perlfunc"
and start filling in missing ones.
we just got index(). 11:13
maybe you will be interested in substr()? :)
or easier, rindex() ?
glob()? :)
elmex oh ah... well..err ;) i don't think my skills are good enough to produce working haskell code :) but i will see whether i can contribute anything useful :) 11:15
autrijus new tests are always welcome too :)
or port your fav perl5 module :)
elmex heh 11:16
are all perl5 prims in perlfunc going to be implemented in perl6?
autrijus some as modules
and maybe some as library code
but yeah.
elmex hmm,ok 11:17
gaal which reminds me, was ingy serious about ".yaml" (analogously to ".perl")?
rgs evern reset().
autrijus gaal: I'm fine with YAML.pm providing that
not fine with a prim. 11:18
gaal how do you install a global method? i don't remember, is there a UNIVERSAL in perl6
elmex woa... first time i'm seeing reset ()... 11:19
gaal ?
autrijus gaal: you install it by declaring a multisub.
with * as part of its name.
multi sub &*yaml { ... }
gaal cool 11:20
nothingmuch btw, how is method dispatch going to become faster in p6? 11:22
and where are the tradeoffs going to be, if at all?
autrijus uh. are you asking me as pugs author or asking me as parrot spectator? :) 11:24
elmex *g*
nothingmuch either or
autrijus (|)
nothingmuch what does perl6 expect to get?
autrijus p6 expect to dispatch methods at compile time
as much as possible.
without expensive lookups. 11:25
nothingmuch based on optional strong types?
autrijus optional types help.
inference helps.
nothingmuch like, my
autrijus but ultimately, because there is a compiler.
nothingmuch $fh = <get a handle>
autrijus p5's compiler probably doesn't do anything.
except some peephold optimizing 11:26
so all lookup is runtime.
nothingmuch look at the immediate window
what is peephole optimizing, btw?
and fix it up a bit?
$i++ -> ++$i in void context, etc?
autrijus right. and I wonder why your sentences are in the wrong order
nothingmuch because i talk funny 11:27
autrijus ah. like jabbot
but yes.
nothingmuch anyway, $fh = <get a handle>
now the compiler can assume certain calls are dispatch to it
and MMD is partially resolved at compile time?
and are subs with types on the params really just MMD in disguise?
autrijus malarie didn't run index.t with perl5 ;) 11:29
otherwise he'd seen that there is one test case that was wrong. 11:30
index("Hello", "", 999) # this is 5, not -1
lightstep f(@a;@b) <- is f unary of binary? 11:31
autrijus unary. 11:32
lightstep cool
autrijus which is why larry used ';'.
to avoid misparsing vs ','
lightstep `,' could be made to work there, i think, but it would have bad interactions 11:33
autrijus very bad interactions.
cls_bsd: :-/ 11:37
freebsd's ghc doesn't depend on libunicode
so unicode is all borken
no Han character identifiers for you!
kungfuftr unicode on freebsd borken? 11:39
autrijus no, just not linked.
I bet some linuxes aren't either.
kungfuftr ah, okay... so that's why that no work 11:40
is it a ports make option?
autrijus no, you simply have to make libunicode before making ghc
that's annoying. :-/
jabbot pugs - 789 - * fix index() so it agrees with p5.
kungfuftr rebuilds ghc 11:41
autrijus you think it's worth a send-pr?
i.e. make ghc depend on libunicode
it's not like it's a large dependency
kungfuftr add it as an optional make option
autrijus :-/ but then it will hurt because most people get ghc as pkg 11:42
building ghc is too painful
kungfuftr yeah, true... but i wouldn't like the idea of enforcing having to use unicode on everyone else
autrijus well, it should not break anyone's code.
it's an additional capability, not something differently implemented. 11:43
lightstep and some don't want that capability
autrijus indeed? hmm. 11:44
lightstep some only work with ascii
autrijus but haskell report mandates unicode semantics.
so arguably, without libunicode, ghc does not comply.
lightstep howcome? it's not like gthChar specifies some encoding 11:45
autrijus haskell.org/onlinereport/char.html
please grep for "Unicode". 11:46
without libunicode, ghc can't comply with that section, I think.
kungfuftr: it's not seeing the wint definition after libunicode. I'm tracing 11:49
kungfuftr *blink* 11:52
autrijus apparently Dimitry Golubovsky has a patchset.
kungfuftr plus it's libtool13 that now takes over from libunicode iirc
autrijus yeah.
kungfuftr has a few ports he needs to update too... shit 11:53
autrijus hm, so support is there in libc. 11:55
no need for libunicode
there goes the dependency problem.
now, how to hook it in...
can't quite believe I'm patching the monser ;)
monster, even
kungfuftr bigfoot cut his knee? 11:56
kungfuftr waits for someone to write a flash based subethaedit clone 12:01
jabbot pugs - 791 - * remove non-latin1 parts from unicode t 12:10
pugs - 790 - * make print encode utf8 by default. jar
autrijus the full sentence beginning with "jar" is "jarkko, here I come" 12:18
jabbot pugs - 792 - Added t/op/time.t, tests time,times,loca 12:20
autrijus anyone know how to do 12:35
goto &ok();
in perl6?
I want to call ok()
but let the ?CALLER work
oh. call() 12:38
eww. scary 12:39
scary but fun. let me implement that
hi xern! 12:46
autrijus writes p6l before implementing call()
xern hi! 12:51
autrijus xern: got time to put your p6 slides into use? :)
poll: 12:52
larry said "123abc" numifies to 123
"Inf" to Inf
xern u wanna do it by urself? i have limited time online
autrijus "Infamy" to 0
now, any guess about what "0o789" and "3e4d5" numifies to? 12:53
xern: sure :)
still very busy?
xern but it seems that i have lost my slides long long ago.
autrijus to Perl 6
xern i'm also doing bioinfo-related things during my off hours
autrijus xern.perlmonk.org/Perl6/
xern ah, sure!
autrijus took some time but we are finnally running it :) 12:54
steveq I was wondering, can a subroutine I write find out if it was called in a numeric or string context?
autrijus steveq: sure! 12:55
see S06, wanr
want
steveq aha, I realised it could scalar/list
autrijus when Num, when Str 12:56
xern autrijus: buy my source is gone. u need to do copy'n'paste by urself :-/
autrijus same thing.
:/ ok
kungfuftr autrijus: any luck with ghc and unicode? 13:00
autrijus kungfuftr: aye. writing to ask 13:01
kungfuftr: we can include a table by ourselves as the last course 13:02
kungfuftr ah, k
autrijus alternatively, I want to push GHC 6.4.1 to come with a builtin tables
kungfuftr autrijus: lang/ghc right? not lang/ghc6 ? 13:03
autrijus there's no ghc6 here
just ghc
kungfuftr whoops, my mistake mis-read a character
autrijus bah. it's not like it's a hard thing. I'll just roll my own. 13:04
eta 10 mins
webmind wonders if perl6 could perform operations between more then lists? like objects or hashes ? 13:09
steveq You can overload operators for objects 13:10
webmind overload ?
how is that ? 13:11
steveq well, I could make '+' do something for objects of two classes i've created
dev.perl.org/perl6/synopsis/S13.html 13:13
lightstep when i commit (using svn), does it update my tree on my place at the same time? 13:21
autrijus yes 13:22
in fact, it has no notion of a local tree.
svk does, svn does not.
svn's local tree is merely a snapshot 13:23
you cannot query "svn log" when offline.
steveq yeah, that's annoying
autrijus in that regard it is merely cvs with a snapshot for the checked out revision.
we found that annoying and clkao went ahead to write svk :)
webmind steveq, like add methods to objects ? 13:27
steveq Just like adding methods you can add infix operators, I presume that's what you were asking about 13:28
webmind and infix operators are? 13:29
sorry.. rather bad with the lingo
steveq +, -, ~
webmind just wodnering if you could do stuff like merge 2 objectsa
-a
autrijus I've finished Unicode.hs 13:51
but it's too slow to be useful. hrm
autrijus tries -O3
autrijus tries -O 13:57
stevan: I like Test.pm interface :) 14:07
and your decision is as good as mine :)
stevan autrijus: ok :) 14:08
I assume you mean perl6 Test.pm
autrijus yup.
stevan I was going to refactor the error reporting today when I have time 14:09
autrijus: do we have CATCH yet BTW?
autrijus not yet. 14:10
stevan but die strings are put into $! right?
autrijus I'm wasting my time trying to implement Unicode semantics :-/
inside eval? I think so
stevan ok
unicode is important (tedious and annoying at times) but important 14:11
autrijus yeah. 14:12
fortunately haskell let me inline C code. 14:15
cls_bsd autrijus: should ghc depends on libunicode? 14:19
I'll try
autrijus cls_bsd: no no 14:20
won't help
ghc is broken
no need to try anymore
cls_bsd ghc is broken? 6.4?
or?
jabbot cls_bsd: or is env a sort of unification
cls_bsd ...
jabbot: forget or
jabbot cls_bsd: ok
autrijus no, ghc can't find wchar.h on freebsd. 14:21
just a sec
cls_bsd maybe 5.x? 14:22
autrijus I grepped ML
the mailing list archive indicates ghc never supportted freebsd's libc's unicode 14:23
cls_bsd oh, that's great 14:36
autrijus that's fine. I'm rolling my own Unicode.c ;)
almost done now.
sad, eh
cls_bsd autrijus++ 14:43
how can we live w/o you \o/
clkao autrijus: help the innocent soul on #svk that would help package win32 binaries! 14:48
autrijus ok. now I _really_ want testers. 14:50
theorbtwo Of what, exactly?
jabbot pugs - 793 - * Unicode.hsc -- consistent unicode sema 14:51
autrijus t/syntax/unicode.t should now unconditionally pass.
across any platform :)
theorbtwo Thanks for fixing my assert_ghc problem from the other day.
dada autrijus: it doesn't even build for me 14:52
autrijus theorbtwo: np
theorbtwo src/Internals.hs: Can't find module `Unicode' (use -v to see a list of the files searched for)
autrijus uh oh. did you rerun Makefile.PL ?
dada yes
theorbtwo Yes.
(It reruns itself.)
dada (I have the same error as theorbtwo, BTW) 14:53
autrijus hm.
"make src/Unicode.hs" ?
also, up to r795.
autrijus crosses fingers 14:54
Gruber Compiling Unicode ( src/Unicode.hs, src/Unicode.o )
/tmp/ghc98505.hc:5:21: Unicode.c: No such file or directory
/tmp/ghc98505.hc: In function `s86u_entry':
/tmp/ghc98505.hc:80: warning: implicit declaration of function `isSpaceC'
...
theorbtwo Still doesn't work; /tmp/ghc13371.hc:5:21: Unicode.c: No such file or directory...
steveq I get the same problem at 795 of "Can't find module `Unicode'"
theorbtwo Er, same as Gruber.
autrijus but there is a src/Unicode.c ? 14:55
theorbtwo I'm betting on rel pathname problem.
Gruber yes
steveq autrijus: yes
theorbtwo .c and .hs
That's on the main make, not the make src/Unicode.c
steveq Unicode.hsc, and Unicode.c here
14:55 lhooq is now known as dadanother
theorbtwo .c, .hi, .hs, and .hsc, I should say. 14:55
dadanother works for me with r795 and 'nmake src/Unicode.hs'
steveq This is Gnu make 14:56
autrijus ok, try r796
I added -Isrc
dada: woot. unicode.t passes? 14:57
steveq the command run is: "ghc --make -Isrc -isrc -static -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing -o pugs src/Main.hs"
src/Internals.hs:
Can't find module `Unicode'
theorbtwo Some warnings, but compiles.
dadanother autrijus: yes, 18 tests ok
autrijus steveq: ok I think I got it.
dadanother I have one warning when compiling
src/Internals.hs:16:
Warning: `digitToInt' is exported by `module Unicode' and `module Data.Char'
theorbtwo 18 pass, before had "ghc not unicode" and skip. 14:58
lightstep cannot find module Unicode (imported from Rule/Char.hs)
autrijus r797 should fix it.
lightstep yuppy
steveq yay 14:59
autrijus I guess the missing signature warning can be squashed with a proper Unicode.h or something.
but I can't duplicate it here.
mm, the runtime seems as fast as before.
so, no performance penalty
yay for sensible FFI interface!
lightstep thought now digitToInt is now imported more than once in Internals (from Unicode and Data.Char)
*though 15:00
autrijus fixed.
dadanother autrijus: you should add Unicode.hs to make clean maybe?
autrijus good idea.
jabbot pugs - 798 - * digitToInt is Unicode's domain.
pugs - 797 - * explicitly require Unicode.hs
pugs - 796 - * -Isrc should help
pugs - 795 - * try again...
pugs - 794 - * Unicode should always pass.
autrijus done. 15:01
rjbs updates. 15:02
ack, I lost my ghc install. silly os upgrade. 15:05
dadanother everything's fine here (Makefile.PL, nmake, nmake clean, unicode.t)
autrijus woot woot
so, tibetan variable names all over the land.
rjbs finally! 15:06
autrijus whew.
rjbs time to rewrite my esperanto dictionary in perl 6. in esperanto.
dadanother time to find an editor that can actually *show* these characters :-(
rjbs vim! 15:07
dadanother mmm...
theorbtwo My xemacs seems to do well enough, after M-x prefer-coding-system UTF-8. 15:08
Though for some reason hebrew comes out very very very small.
autrijus must be a font issue.
theorbtwo I know, but I'm not very motivated to fix it. 15:09
Since I can't actually read anything other then English anyway, and a very little bit of German.
dadanother is "ok(eval 'my $Ć£~A~D; 1', "japanese declaration");" supposed to mean something?
(note that "~A~D" is blue in my vim :-) 15:10
autrijus dadanother: don't think so
rjbs your encoding is probably wrong. those are probably kana in utf-8, and it's declaring a ja-named variable
rgs dadanother: try set encoding=utf8
jabbot pugs - 799 - * Unicode.hs is now cleaned
autrijus "恄" means "it is" according to babelfish
dadanother rgs: now it beeps several times when I open the file :-) 15:11
rjbs dadanother: check values of tenc and fenc
dadanother fileencodings=ucs-bom,utf-8,latin1
lightstep in hebrew, "it is" and "this" are the same word 15:12
autrijus hrm, vim in gnome-terminal doesn't do BiDi.
not very surprising.
dadanother but I can't find termencoding...
autrijus tenc ?
rjbs Is it unset, or is it missing?
lightstep vim never does bidi 15:13
dadanother unset, apparently
autrijus Eclipse does :)
dadanother it doesn't even show with :set all
theorbtwo Hm, last I checked, cat in gnome-terminal seemed to bidi OK, so I'm blaming it on vim.
rjbs dadanother: you're comiled with +multi_byte ?
lightstep theorbtwo, probably gnome-terminal does it in line mode itself, and doesn't on the mode that vi uses 15:14
dadanother rjbs: it's the cygwin binary distro, dunno how's compiled 15:18
rjbs dadanother: consult :ver
dadanother yes, +multi_byte is there
ingy hola 15:20
jabbot pugs - 800 - * restore basic.t to sanity
autrijus ingy: unicode varnames etc works consistently everywhere :) 15:21
ingy yow!
autrijus++
autrijus: what is up with win32?
autrijus ingy: it seems that some of Kwid's paths is not nativized to \ 15:22
also, somehow after subdir is built, it does a "cd .." and fails
but I can reproduce neither.
so is kind of hard to debug 15:23
would be better if some failing person can provide vnc or telnet
ingy my win2k box is broked. who reported it?
autrijus viirya did 15:24
as did dvergin on my use.perl journal
and a random CPAN bug person
and someone else I forgot
it's failing all over the place with different symptoms
ingy hmmm. I can review for File::Specedness
autrijus but all works when I tell them to comment out the subdirs.
ingy but ext/Test is a subdir, no? 15:25
autrijus sure, so "works" as in "builds pugs" 15:26
ingy I see 15:27
I wonder if abs_path might help here
autrijus it might. hard to test without a failing case tho.
ingy aye
autrijus so maybe ignore that and work on Kwid.pm or Yaml.hs? :)
autrijus grins 15:28
hi malaire! I fixed your index() :)
ingy sure!
malaire hi. what was broken?
rjbs Hm. Can no longer compile...
autrijus malaire: index("Hello", "", 999) is 5
malaire err, isn't that correct? 15:29
autrijus you had it at -1 :)
should've run the test with perl5 first :)
malaire I asked here, and someone suggested I should just implement as -1, because perl5 behavious seems to be bug
autrijus oh!
malaire I first did it as perl5 does
autrijus sorry, I totally missed that.
apologies.
malaire at least I think -1 makes more sense 15:30
autrijus if so, ask on p6l? :)
I don't have a strong opinion either way
malaire ok, I'll make quick question
autrijus also I refactored to use isPrefixOf 15:31
pasteling "pugsmonk" at 192.168.0.2 pasted "Various new bugs" (20 lines, 647B) at sial.org/pbot/8246
autrijus .perl doesn't do MVal correctly yet. known bug; please write a test 15:32
"123".[0]; # this may very well be "123".
a quick question on p6l may work.
lightstep why is the third one failing? 15:34
autrijus lightstep: because hash assigning into hash doesn't yet work. 15:36
hrm it works 15:37
so the content is right 15:38
no idea. you interested in tracing it?
<- working on a translation job
lightstep sure
autrijus also, it is better written as
my %a = (a => 1); %a{'a'} = %a; %a<a><a> 15:39
a parser bug maybe that caused
my %a = (a => 1); %a<a> = %a; %a<a><a>
to not work. tracing welcome
lightstep => no autoquotes? cool! 15:41
s/no/now/
autrijus :)
Parser.hs, pairLiteral 15:42
theorbtwo Allo, Limbic, lumi. 15:43
autrijus greetings.
pasteling "pugsmonk" at 192.168.0.2 pasted "Other Hash bug regarding .<>" (10 lines, 354B) at sial.org/pbot/8248 15:44
lightstep what does \\ do? 15:46
autrijus \ takes a reference.
lightstep oh, of course 15:47
it's escaped
autrijus yeah.
Limbic_Region salutations theorbtwo
lightstep and what does \(1,2,3) mean? 15:49
or \@list ?
autrijus it means a scalar that refers to a list. 15:50
lightstep ok
autrijus you can dereference it by using list dereferencing.
lightstep can every value be an index in a hash, or only strings?
autrijus by default only strings.
but it can be parameterised with shape().
currently pugs is misimplemented; it assumes shape(Any) 15:51
but the default is shape(Scalar).
so maybe our FiniteMap Val Val wants to be FiniteMap Str Val for now.
lightstep and what is %a<b c d> ?
autrijus err, I mean Shape(Str).
%a<b c d> means %a{'b c d'}.
Limbic_Region autrijus - use.perl.org/~dvergin/journal/23673 # more pugs/perl6 feedback from dvergin
lightstep pugs thinks it's indexed with ('b','c','d')
autrijus danke.
then, maybe a bug. I'm not terribly sure
bbiab. & 15:53
lightstep so <> is perl6' ||
theorbtwo <> and {} are perl6's {} -- <> always quotes; {} never quotes. 15:54
lightstep i mean that <funky name> in perl6 is like |funky name| in lisp
Limbic_Region autrijus - it looks like dvergin has enabled replies btw 15:56
theorbtwo Oh.
autrijus ingy: a concrete case: use.perl.org/~dvergin/journal/23673 15:58
ingy: no rush, but take a look when you got cycles
mattc Hi all, anything I should know before I write some todo tests for the "caller" builtin? 15:59
autrijus caller is an object. we don't have objects, so make all your tests todo_ :) 16:00
otherwise, thanks, read S06 and start coding
mattc ok, was just going to port the current perl5 tests... ok
autrijus are you a committer? 16:01
mattc yep
as of yesterday :)
autrijus ah, you're campbell?
mattc yeah
hello
ingy autrijus: this looks suspect:
autrijus hi. nice to meet you :)
ingy ghc --make -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing -
o ./kwid.exe ./src\Main.hs -i"./src"
mattc you too
autrijus ingy: yeah, it looks like the "" and the \ is all borked
ingy should be nativeized
autrijus aye. 16:02
but I really really need to finish this translation
or the editor-in-chief hcchien will kill me
so, see you in a bit
ingy I submit a nativeized patch
autrijus ok, will test on win32
autrijus goes offline to $wr0k &
ingy where does dvergin hang out? 16:03
I get the problem now 16:04
malaire autrijus: what is FFI? (from your earlier comment today:) 16:05
>we can then use FFI to link PGE
>and let PGE compile rules into some primitive haskell
theorbtwo The XS of haskell.
Except, as I understand it, not so evil.
lightstep what's the difference between 'anything$%&!#^' and <anything$%&!#^> ? 16:06
integral If you look in src/Unicode.{c,hsc} you'll see how unevil it is :-)
kungfuftr c/hs == evil
lightstep malaire, foreign function interface
theorbtwo Well, it's pretty easy to be less evil then XS.
Limbic_Region ingy - the only place I see him regularly is at the Monastery 16:08
lightstep theorbtwo, i totally misundestood your earlier explanation about <> and {}. can you try again? isn't {} a closure and <> a string? 16:09
theorbtwo Depends on the context and on how detailed you want to get.
lightstep on which context does it not work?
the way i described it?
theorbtwo %foo{shift}, the {} are doing double-duty as a hash element operator, and %foo<shift> is just a string. 16:10
lightstep ok
theorbtwo But as a plain expression, <shift>; is, AFAIK, meaningless. {shift}, OTOH, is indeed a closure (that gets run immediately in void context).
lightstep but when they are "just values", they aren't even alike
theorbtwo Right. 16:11
steveq I read somethign before about adding tests, I've lost it though now, what do i need to do once i have my .t file?
theorbtwo AFAICR, anyway.
lightstep currently pugs parses <> as strings. i'll leave it like that for now.
dada steveq: are you already a committer? 16:14
steveq no, I just want to run my test right now 16:15
dada ah
steveq I'm just working out how to do the stuff first
dada you need to set PERL6LIB=blib6/lib
and then: pugs t/blah/blah.t
steveq ta
lightstep should %a<x>=%a create a cycle? 16:23
ie, should assignments to hash table fields retain the lvalue status of the rhs? 16:25
(store references and stuff)
theorbtwo I think it should.
lightstep and %a<b>=%c<d> ? 16:26
should this also keep the rhs as a reference?
pjcj Wouldn't that be the job of %a<b> := %c<d> ? 16:30
lightstep i was wondering when is = lazy and when not
towards making pugs behave right 16:31
theorbtwo Hm, what does lazyness have to do with it? It should still assign whatever value the RHS had at the time, lazy or no, no?
I should think %a<b>=%c<d> would assign the contents of %c<d> -- a reference IFF %c<d> contains a reference. 16:32
lightstep pugsmonk said earlier that %a<x>=%a not creating a cycle is a bu
*bug
pjcj Were you thinking of COW? 16:33
lightstep no
about a real pointer-chasing cycle
theorbtwo That's because %a is a reference, in scalar context.
lightstep ok 16:34
theorbtwo %c<d>='42'; %a<b>=%c<d>; say %a<b> # gives '42'
lightstep and the contents of the reference aren't touched during the coercion?
theorbtwo Not sure what you mean by that. 16:35
lightstep the hash maps from scalars to scaclars
on the domain, there are some references
theorbtwo Right; that's the default shape of a hash.
lightstep when doing %a<x>=%a
theorbtwo No, the domain is x; the range is %a. (Which is a reference.) 16:36
lightstep is the reference to the variable %a or to a copy of its contentts?
theorbtwo To the variable %a.
lightstep i think i got it now
stupid identity
pjcj $a{x} = \%x; in p5, right?
theorbtwo %c<d> = %a; %a<b>='42'; is(%c<d><b> , 42) 16:37
Yeah, pjcj.
nothingmuch hopes to succeed at getting drunk tonight, contrary to last week, and the week before 16:39
theorbtwo P5 -> P6 rules: $a[1] --> @a[1], $a{'key'} --> %a{'key} # when you take an element of a hash or array, you keep the sigil of the hash/array, rather then using $. 16:40
The key in $a{key} is always code -- there isn't autoquoting there. OTOH, the key in $a<key> is always a string.
scalar(%a) in perl5 is a debugging string; scalar(%a) in perl6 is \%a. 16:41
(And similarly for @a.)
Khisanth and P5 @a[1,2] -> ? 16:42
theorbtwo Is still @a[1,2].
Khisanth hrm
lightstep for which types should scalar create references? 16:43
Khisanth %a{'one','two'} as well?
theorbtwo % and @.
AFAIK.
Yep, Khisanth, I think.
lightstep Khisanth, what does that mean? 16:44
Khisanth what was %aĀ«Ā» then? :)
theorbtwo A mistake that was fixed several months ago.
Khisanth lightstep: (%a{'one'},%a{'two'})
theorbtwo <<...>> are now /less/ common then <...>. 16:45
lightstep and what is the perl6 equivalent? %a<one,two> ? 16:46
steveq How can I find the number of elements in a list at the moment?
theorbtwo I'm not 100% sure, but that looks right.
steveq, you mean in the p6 design, or you mean that works in pugs? +@foo should give you the # of elements in foo. 16:47
lightstep or maybe that's %a{'<one,two>'}
steveq theorbtwo: aha
I tried .elems and discovered it doesn't exist yet
theorbtwo No, lightstep; that'd give you the value for the key '<one,two>'
lightstep +foo is the same as num foo? 16:48
theorbtwo I'm not sure num is a named operator, but it evaluates foo in a numeric context, yeah.
theorbtwo needs to re-read the synopses.
autrijus lightstep: a ruling just came: we don't need to parse silent thunking in array slices. 17:04
# www.nntp.perl.org/group/perl.perl6.compiler/372
now S05 needs fixing... ;)
bbiab &
theorbtwo Hm, I have no idea what Larry is talking about there. 17:05
17:08 Aankh|Clone is now known as Aankhen``
lightstep what is the sigil for lists? 17:15
autrijus there is no sigil for lists. 17:16
however, perl "arrays" are actually somewhat listish
in the sense that if you randomly access them, they are COWed
but if you extend them with a generator, they can be of infinite lengh
length
so we casually mix "arrays" with "lists". 17:17
Aankhen`` COWed?
autrijus but arrays is merely one kind of lists. hashes is another kind.
Aankhen``: copy-on-write
Aankhen`` Ahh.
lightstep so +(1,2) is int, but @a=(1,2);+a is num ?
autrijus uh, the sigil is part of the name of the variable.
so +@a
theorbtwo I was wondering about that earlier -- both should be integral.
lightstep yeah, that's what i meant
theorbtwo Er, and right, +@a.
steveq Is it likely to be quite hard to make functions automatically operate on $_ in absence of any other arguments?
autrijus steveq: very very easy. 17:18
steveq oh right
autrijus sub func (?$x = $CALLER::_) { ... }
theorbtwo In a full p6? No, sub foo (?$x = $CALLER::_) {}
autrijus *cough* pugs does that too.
ingy autrijus: I got to the bottom of all the make stuff
lightstep i'm thinking about changing reduce, so it will handle convertions
autrijus ingy: woot!
steveq I just wanted "@foo = split;" to work as in perl5
obra "pugs _is_ a full p6"
Aankhen`` Sorry if this is a stupid question, but... are rules implemented in Pugs?
autrijus steveq: that's fine. I _don't_ wont "split;" to work as in perl5.
ingy there are many problems, and the current solution is to fix some of them and then punt 17:19
autrijus Aankhen``: no, not yet. will you settle for a cheap plastic imitation that is PCRE?
Aankhen`` shrugs.
I'm not yet using it.
So sure. ;-)
autrijus "pcre - a cheap plastic imitation of Amulet of Larry"
ingy by punt i mean disable ext/Kwid for the moment
autrijus ingy: ok.
steveq autrijus: well, if there was regexps i wouldn't mind if split wasn't as magical as in perl5
autrijus steveq: nod. if next week pmichaud really shows up with PGE, we get rules by the end of the next week after that. 17:20
ingy full writeup in checkin msg
autrijus if not... wait for pugs 6.283 :)
ingy: danke!
ingy++
theorbtwo Woo!
Aankhen`` Heh, I tried the Perl6::Rules module, and the syntax highlighting in Komodo went crazy.
autrijus perl6::rules only works with 5.8.[34] and not with any other perls iirc.
or was it [12], or [23] 17:21
it's... damian.
Aankhen`` It seems to work with 5.
theorbtwo Wow, r800 already.
Aankhen`` 5.8.5, that is.
autrijus Aankhen``: tests pass?
Aankhen`` Hrm, I don't really remember.
autrijus cpan testers say FAIL(6).
Aankhen`` I think they did.
Lemme try it.
autrijus so I doubt its sanity.
Aankhen`` My memory's quite poor.
autrijus the only pass is on 5.8.3.
malaire hmm.. how can I change Int to VInt ? 17:23
autrijus toInteger 17:24
but why? you should use genericFoo instead of foo for list operations
lightstep should t/base/for fail? or did i screw something?
malaire I just need it for my testing-code while I'm playing with rindex... In final form I probably won't need it anymore. 17:25
autrijus okie.
the current canonical failures:
t/base/undef.t 58 3 5.17% 16 20-21
t/op/arith.t 132 2 1.52% 110-111
t/op/int.t 30 4 13.33% 26-29
t/op/precedence.t 39 3 7.69% 34-35 38 17:26
so no, for.t should not fail.
lightstep shit 17:27
rjbs Is it expected that 6.4 won't compile pugs, atm?
lightstep anyway, i think i found a but in Eval.hs
hcchien hmm...., so warnings in Unicode.hs 17:28
Aankhen`` Wow. 17:29
ōæ½xABautrijusōæ½xBB: nmake test made Perl go crazy, I think.
lightstep hcchien, they've been there since autrijus got it working
Aankhen`` -124/2375 subtests failed, 105.22% okay
malaire rjbs: 6.4 works for me (at least rev800 worked)
hcchien lightstep: ok, just make sure about it. :) 17:30
Aankhen`` Anyway, BBL.
jabbot pugs - 801 - Fix build for win32
rjbs malaire: Hm. I seem to have some problems with my ld. I'll investigate further. 17:32
autrijus greetings Jonathan-san. 17:36
malaire btw, would rindex(Str, Str, ?Num=Inf) be ok, or is there a better way to specify it? 17:38
theorbtwo ingy, I don't see where you're dependent on pugs_version.h. 17:39
Oh, wait, re-reading, neither do you. 17:40
autrijus malaire: I imagine it is fine, but why not just ?Num ? 17:41
you can always test for definedness.
malaire how do I do that in Haskell?
autrijus isJust (vCast val)
malaire perhaps plain ?Int is then better 17:42
theorbtwo Nevermind, there's a lot I don't see.
autrijus yeah.
theorbtwo: .. :)
theorbtwo The problem is that extensions try to build before pugs itself.
autrijus !. 17:44
that shouldn't happen.
version of makemaker?
theorbtwo Er, I may well be wrong. 17:45
But that certianly is what it sounds like from ingy's description.
lightstep my @a = <b c>; <-- qua? 17:48
what does that mean?
jdv79 qx{} or q:x{} isn't available yet? 17:50
autrijus hcchien: autrijus.org/miyagawa.txt 17:51
jdv79: neither.
I think there's a test.
pasteling "malaire" at 217.119.39.217 pasted "rindex stub - testing for definedness" (9 lines, 258B) at sial.org/pbot/8249
jdv79 ok
malaire that test for definedness doesn't seem to work...
hcchien autrijus: ok, cool
autrijus lightstep: I think it means "my @a = ('b', 'c')".
when you see <>, think qw<>. 17:52
lightstep and %hash<b c> ? 17:53
is it (%hash{'b'},%hash{'c'}) ? 17:54
autrijus (%hash{'b'}, %hash{'c'})
yes. I was confused.
lightstep but %a<b> isn't (%a{'b'})
autrijus it is not.
not sure about %a<b >.
perhaps not.
@a[1] is scalar; @a[1,] is list. 17:55
so %a{'b',} is list.
not sure what %a<b > means. I'd think whitespace is dropped, so a scalar.
lightstep so %a<b> is %a{'b'} 17:56
autrijus aye. 17:57
lightstep cool
i'll do it later 17:58
autrijus "Does Perl contradict itself? Very well then, Perl contradicts itself. Perl is great; Perl contains multitudes."
lightstep: danke!
18:03 metaperl__ is now known as metaperl_
malaire autrijus: C< isJust (vCast val) > doesn't seem to work as a test for definedness (see sial.org/pbot/8249 ) 18:04
autrijus hrmph. 18:05
I know, I know
you give two rindex
one (Str, Str)
another (Str, Str, Int)
and implement an op2 and an op3.
I like that :D
malaire is that only way -- substr then needs op2, op3 & op4 ... 18:06
autrijus no, that's not the only way.
it's just of the relative inconvenience of Inf.
weird, that should work.
malaire ok
autrijus try this:
18:07 _metaperl is now known as metaperl
autrijus case z of 18:07
VUndef -> ...
Khisanth an offset of infinity?
autrijus _ -> ...
Khisanth: rindex would default to that.
rindex("aaa", "aa");
# means, rightmost match
Khisanth oh nvm, I was thinking of substr
autrijus ah.
honestly I don't know the policy of multisubs vs optionals 18:08
but I think in this case optionals fits the spirit more
so let's still try to make it work
malaire that C< case z of { VUndef -> .. ; _ -> .. } > allways returns basecase, never first one. 18:09
autrijus so error (show z)
and let's see what z was
malaire that gives *** Exception: VNum *** Exception: ./Prim.hs:598:4-38: Irrefutable pattern failed for pattern (_, ('=' : def)) 18:10
autrijus wt...
oh. hey.
it assumed = 18:11
sorry, I'm borked
the pattern assumed a =
I'll fix. sec
theorbtwo I thought haskell wasnƤt supposed to allow runtime errors for things like that. 18:14
autrijus you'd be surprised :) 18:15
svn up? 18:17
?Int should now work and made into undef.
malaire ok, I'll test.. 18:18
autrijus theorbtwo: you are allowed to make lots of irrefutable pattersn.
they are not detected until they are invoked.
bug or feature? you decide :) 18:19
will be sad to be forced into making a base case for all of them tho.
jabbot pugs - 803 - * change some optioanl sigs to Int 18:20
pugs - 802 - * allow lack of = in declarations
malaire ok, that works now and C< isJust (vCast z) > works also 18:21
autrijus woot. 18:22
I need to excise vCast from major branches some day.
and use fromValue which makes casting errors trappable in eval"". 18:23
so new code should probably try to use fromValue :)
not a hard requirement, though.
fromValue is exactly like vCast, but costs one more monadic mana. 18:24
I mean, it needs to be used with <-.
&func.goto! &func.goto! 18:27
autrijus is happy
I got my lovely goto() back
dadanother let's write "autrijus considered harmful" :-)
autrijus lol :)
goto() in pugs is so cheap it's not funny :)
dadanother autrijus: if you have just one minute, I would like to talk about 18:29
unary *
autrijus dadanother: sure, go ahead.
dadanother there's something I don't understand in the order of evaluation of pugs
autrijus I'm still in mutt mode, but go ahead :)
dadanother (probably)
this is my favorite test: 18:30
pugs> ? my @a = (1,2,3); my $a = *@a;
and I get to:
*** Evl: Syn "*"
{Var "@a"}
*** Evl: Var "@a"
*** Ret: (1, 2, 3)
so what Syn "*" is evaluating is a list _already_ 18:31
but Syn "*" should detect the array _before_ evaluating it
eg. the first line of my implementation of "*" is: 18:33
vals <- case exps of
[Val v] | valType v == "Array" -> do 18:34
-- etc. etc.
but _where_ and _when_ gets exps evaluated?
or either
is there any other part, beside the reduce in Eval.hs, which does evaluation of parsed material? 18:35
gaal pops in 18:37
was away for most of the day, just skimmed the logs 18:38
theorbtwo Allo, gaal!
gaal re: discussion of failing tests from an hour ago: i didn't check it in yet, but there should be another canonical failure in syntax/subroutine_named_params.t 18:39
hey to2 :)
also, "someone" should write a t/run/*
autrijus ok, I hacked &goto in 10 minutes.
I'm back :)
gaal hah :)
i have half a day free tomorrow, so i'll try to do that 18:40
unless, autrijus, should i begin work on symbol table tests instead?
jabbot pugs - 804 - * &goto.
autrijus dadanother: ok, back. 18:41
gaal: you can do either you want :)
I'd be equally grateful.
gaal is S02 updated regarding symbolic references? there seems to be an inconsistency in syntax over () and << >> (compare: S10). or am i missing something?
autrijus gaal: when you see inconsistencies, assume the latter synopsis is correct. if your brain refuses to accept, ask on p6l :) 18:42
gaal has evil, evil plans for a goto.t
autrijus that's the going rule anyway :)
gaal: combine &goto with &?CALLER::CONTINUATION for max fun
gaal all right :)
heh.
autrijus dadanother: exps is unevaluated form
dadanother: you see them being evaluated because you tell it to -- 18:43
mapM (enterEvalContext "List") exps
"enterEvalContext" reduces exps into Vals.
dadanother mumbles
lightstep how do i invoke &proc ? 18:44
theorbtwo &proc()
gaal do we have substr yet?
autrijus no. hack it in? 18:45
gaal yeah, if it's easy... just so i can produce a hack of my own
obra has anyone built a comprehensive listing of all perl6 core functions and variables? 18:46
autrijus that shouldn't be hard.
obra: yes S29
www.rodadams.net/Perl/S29.pod
www.rodadams.net/Perl/S29.html
obra is that canonical? if so, why is it not in perl6 svn?
lightstep why does symExp contain an Exp and not a Val?
does any variable contain unevaluated Exps? 18:47
autrijus obra: because rod doesn't have committer rights
theorbtwo guesses lazyness?
lightstep it's really really bad
unless there's a reason
(bad = confusing) 18:48
autrijus lightstep: yes the reason is
my @a = (1,2,3);
my $b := @a[1];
@a = (4,5,6);
$b.say; # 5
lightstep ok
autrijus when you see :=, read letrec.
to support letrec, we have to use Exp. 18:49
lightstep sure
hide I wrote 2 quick tests for directing STDOUT and STDERR to a scalar that both fail.
autrijus hide: good. commit them!
todo_ then though.
hide autrijus: just wonder where to put them.
autrijus t/base I think, or t/io 18:50
hide I'll add them to io
autrijus io probably.
gaal woah, ride home. see y'all later. 18:52
jabbot pugs - 805 - * silence warning and use shiftT for got 19:00
autrijus ccshan++ # taught me the importance of shift and reset 19:01
lightstep i believe that now having VLazy is a block in the way to implement perl6 19:02
it can be worked around, though
you can't easily create cycles in haskell, and in perl6 you can
autrijus what is VLazy?
VThunk?
lightstep more like VVar or VExp 19:03
autrijus oh ah. yeah.
you can do cycles in haskell.
but yeah, not as easy as perl6.
lightstep and you will have to turn the evaluator inside-out
autrijus well, I take that back
let x = x in x
boom.
lightstep gotta work with cafs all along
autrijus yeah it's all cafs.
pretty much. 19:04
lightstep and VExp is preferable
i think
autrijus preferably to VThunk?
Thunk carries the env around
lightstep a side benefit is that symbols will map to values (hence sticking VLazy to my head)
autrijus exp does not
lightstep yes
malaire for some reason I can't seem to get C< isSuffixOf > working in Prim.hs - I just get "Not in scope: `isSuffixOf'"
autrijus and we want the env
there's no by name refs in perl6 anymore outside eval"" 19:05
malaire: hack Internals.hs to pull it
lightstep the question is: how will it interact with all the patterns&methods of Value
autrijus search for isPrefixOf
brb.
malaire ok 19:06
lightstep oh, i never notices VThunk before 19:09
so why does symbol use exp and not thunk? thunk seems more correct 19:11
elmex hm, p6 is nice...
kungfuftr suddenly thinks that new p6 objects could be automatically mapped to postgres column types 19:15
autrijus lightstep: yes. thunk is also new as of today.
lightstep: so, refactoring welcome!
(to move the Pad into VThunk types)
err, into Val types that may have VThunk. 19:16
that is of course the Right Thing To Do
autrijus journaling 19:17
elmex hm, how are regexes are going to be implemented? 19:19
kungfuftr see perl6 rules
elmex k 19:20
jabbot pugs - 806 - Added tests for directing STDOUT and STD 19:30
gaal hey, do we have .length for strings yet? 19:31
lightstep no 19:36
wanna add it?
gaal i kinda wanted it for another test i was writing...
lightstep: i don't know haskell (yet)
hmm, i think there's no length.t ? need to add that 19:37
what does .length mean on something that isn't a string?
theorbtwo The basic functionality of .chars (there is no more .length) is easy in haskell: length.
gaal ah, .chars is cool.
(does *that* work? :)
lightstep nope 19:38
autrijus ew. graphemes.
gaal ah :)
autrijus Haskell doesn't even support that.
Khisanth theorbtwo: .chars and .bytes? 19:39
lightstep yes
theorbtwo BTW, I think we need another: .viswidth, that adds up the widths of the unicode characters. (1 for most alphebetic chars, 0 for most combining characters and zero-widths, and 2 for full-width Han chars).
gaal autrijus: sorry i wasn't here earlier, can you give an example of syntax of usage for goto? didn't see much in the Synopses. 19:40
you mean ucs-2 when you say unicode? 19:41
because unless i'm mistaken 32 bits is enough for everything currently allocated?
theorbtwo No, not the bit width.
The visual width they take up in a "fixed-width" font. 19:42
www.unicode.org/reports/tr11/
autrijus gaal: &other_sub.goto($param)
gaal ah, it's *that* kind of goto!
:( 19:43
autrijus theorbtwo: there is also east asian widths
which maybe 1 or 2 depending on context
gaal i wanted goto LABEL
autrijus oh. bah.
theorbtwo That was what I was talking about.
autrijus bye~
theorbtwo Later!
gaal bye
autrijus no, I was saying bye~ to goto LABEL.
;)
gaal here i was with duff.t almost written...
autrijus er. hm. uhm.
gaal almost working that is. it is writen.
how can we not have duff's device in perl6? 19:44
autrijus we can have inline C.
gaal i think this fails the test suite :)
works in p5 too.
autrijus ok ok I surrender
maybe we can goto &BLOCK.
gaal heh heh
that's good enough for me. 19:45
theorbtwo Hm, I may be off.
gaal maybye. 19:46
autrijus maybye.
(hi|bye)
gaal: you know... it's already implemented. so there.
(&goto doesn't care about block of sub)
gaal whoa. cool.
now just to get the reference to the block... and for that i need a symbol table lookup... ah, bliss. :) 19:47
Limbic_Region goto should be speced in [AES]4 right?
theorbtwo Yeah, I am wrong; east asian width is more complicated then that, it seems.
gaal i think lightstep is offended by my whims :)
autrijus theorbtwo: I'm forced to deal with it day to day.
# search.cpan.org/~autrijus/Unicode-E...idth-1.02/ 19:48
gaal mm, what's a valid identifier for a LABEL? just a number is not okay, right? 19:49
Limbic_Region hmmm - S4 doesn't have much to say about goto
autrijus LABEL is not yet parsed.
Limbic_Region: right it's $today::fresh::ruling
gaal no, and neither does S10
malaire I just added "rindex", and I have to go to sleep now... I could try "chars" (or "substr" or something else) tomorrow, if they are still unimplemented, and I have time to work on pugs (which I probably will have).
gaal it only mentions it for AUTOLOAD and friends.
autrijus aye. so ask.
malaire++
Limbic_Region isn't subscribed to p6.l - will go read
autrijus for now, chars in pugs is unicode codepoints. 19:50
larry may tell you graphemes
but until someone find a good library that is not the size of ICU, pugs does codepoints.
Limbic_Region s/subscribed/subscribed anymore/
jabbot pugs - 808 - Forgot the tests for rindex
pugs - 807 - Add 'rindex' -- and tests for it
gaal better say it does graphemes buggily and have it return codepoints, no?
theorbtwo I'd say better to implement .chars and possibly .bytes, and die on .graphemes. 19:51
gaal theorbtwo++; # i feel so dirty next to these smart guys 19:52
theorbtwo Well, not neccessarly. 19:53
In many circumstances, .chars == .graphemes.
Limbic_Region autrijus - I didn't read anything that said goto LABEL; is to be disallowed - am I missing something? 19:54
theorbtwo It's only when you end up using base characters and combining characters that they differ: an x and then a combining dieresis is two chars, but one grapheme.
autrijus Limbic_Region: I don't think it's disallowed; I just don't know how it fits into the syntactic structure.
Limbic_Region: if you can find a reference, yay
Limbic_Region ok - looking through the A now
theorbtwo OTOH, a Ć¼ is one char and one grapheme when written using U+00FC, but two chars and one grapheme when written as U+0075 followed by U+0308. 19:56
Even though the two should look exactly the same when rendered.
gaal writes tests for .char & co 19:57
elmex hm, is there a trick to type Ā»*Ā« ? i don't have the Ā» directly on my keyboard ;)
Khisanth hmm 19:58
gaal in vim, ctrl-K, > >
Khisanth in gtk apps, ctrl+shift+ab/bb :) 19:59
elmex ah...complicated...
Khisanth still has to find out how to get those to display properly in emaces
gaal elmex: you know you can use << >> if you want, yes?
theorbtwo Khisanth: you need a emacs that uses MULE. 20:00
elmex pugs generates parseerror
Khisanth gaal: but Ā«Ā» look so much nicer :)
gaal how do i test something emits a warning?
true.
theorbtwo BTW, U+AB / U+BB, not U+AA.
elmex whatever, i use vim 20:01
Khisanth ĀŖ?
theorbtwo Control+shift+(a,b), not control+shift+(a,a).
Khisanth hrm I guess I need a better font for emacs 20:08
jabbot pugs - 809 - * make arith.t use goto() for better err 20:10
elmex what do this jabbot msgs mean? 20:16
dadanother elmex: it logs the commits 20:17
theorbtwo Checkins to the SVK repo.
elmex cool
autrijus it means that someone (in this case me) just committed a new revision into the repository.
dadanother I committed one just a few seconds ago
and I hope I didn't break all that nice UTF8 :-)
autrijus you did not :) 20:18
dadanother phew
jabbot pugs - 810 - just corrected my own CPAN id 20:20
theorbtwo wonders if that CPAN id error is his. 20:24
dada forgives theorbtwo anyway
theorbtwo I don't think you were in there when I made my edits. 20:25
rjbs wow. 132 commits since, like 0900? 20:27
theorbtwo Hm: leading the pack in commits is autrijus with 396, followed by ingy with 68.
autrijus wow. so I officially falled behind 50% today. 20:28
autrijus journals this
ninereasons pugs has helped to make the perl6 discussions come alive for me. thanks autrijus 20:31
autrijus you are quite welcome :) 20:32
rjbs attempts a build on Win32. 20:33
elmex pugs on ghc should be portable i guess? 20:34
theorbtwo Aye.
The emphasis, sadly, is sometimes on "should", but most of the time it is. 20:35
gaal suppose $_ holds an arrayref. how do i get the array? p5 syntax doesn't seem to work 20:36
rjbs $_ is usable as the array.
$_[4] = "FIFTH!"
gaal so should this be valid? %hash<<key1 key2 key3>> = $_
autrijus argh
so() is going back to true()? 20:37
autrijus votes for aye() just to muddy the water a bit more
rjbs autrijus: p6l being cruel?
theorbtwo Those are just < and >, not << and >>, I think.
Khisanth true() being false does make for some bad reading :) 20:38
gaal autrijus: good timing on that question, since it happened right after i used "so in english in the way
that it was briefly meant to be used in p6
and up until now i didn't understand why "so" was good.
to2: okay; other than that shoudl the above be the wayt to say it? 20:39
rjbs interesting: my %hash; undef %hash; %hash; # {pugs: cannot cast into [VPair]: VUndef
gaal yes, rjbs, found recently 20:40
jabbot pugs - 811 - * properties
gaal rjbs: actually do you need the third statement to get the error? 20:41
rjbs yes
gaal then it isn't the same problem i saw :/
rjbs hm. Actually, I can also do that without error. Let me try to produce good case.
gaal see base/undef.t
rjbs actual failure case: 20:42
my %hash; %hash = {}; undef %hash; %hash
gaal adding to undef.t
autrijus when aye { return 1 }
gaal grr, it's another parsefail probelms eval doesn't protect against. 20:45
autrijus hm? " my %hash; %hash = {}; undef %hash; %hash" is fine in eval to me 20:48
gaal failsforme :) 20:49
rjbs pugs> my %hash; %hash = {}; undef %hash; %hash
{pugs: cannot cast into [VPair]: VUndef
but in eval"" it's fine
gaal rjbs, could it be you said my %hash earlier already? 20:50
(i noticed i did)
rjbs no, that was the only line I put in the pugs terp
lightstep rjbs, the shell is not-so-well 20:51
safest is running programs from a file
autrijus mm we need :r some day
and :m (daydreaming mode)
rjbs :m ?
autrijus :m lets you change to different module namepsaces. 20:52
to adjust your namespace, basically
and to dictate what gets reloaded when you do :r
it's all Hugsism
rjbs cool
lightstep: ok, works fine in program, dies in shell. 20:53
time to prepare to go home, then to class.
gaal is cleaning up undef.t a bit (scoping things, it's gone long). i wonder if it'll still happen here.
autrijus hrm. I think user-defined ??:: , if available, should have an "inner" prec level trait
that rules out "and" etc from happening inside the brackets. 20:54
same applies for the circumfix [] that allows the semicolon.
without that trait we're all adhoccing things.
(from the parser point of view)
rjbs: have fun :)
theorbtwo Hmm, just read the true()/weather()/so() thread, and I'm wondering... 20:58
How is this different from all()?
autrijus all() imposes list context. 20:59
and build junctions.
not() is not none().
lightstep what is Syn "mval" ?
autrijus you won't say
if (none 123) { ... }
although of course it works
lightstep: it is a hack to create a mutable variable. think newIORef.
lightstep: the whole mval thing is very poorly thought out.
it is pending a revamp based on ITypes. 21:00
lightstep ITypes?
autrijus container types. variable types.
as opposed to value types.
which is VTypes.
the I stands for "implementation"
so the major ITypes are Array, Hash, Scalar 21:01
but there may be more ITypes. for example, %*ENV's IType is something that derives from Hash
but actually does very different things.
i.e. it calls putEnv and getEnv
without actually storing anythign in memory
lightstep oh
autrijus so: variables have ITypes ("interfaces") 21:02
and values has VTypes ("types")
the interaction is fuzzy though. it's not specced out good 21:03
theorbtwo If you do $foo = $bar, $foo gets $bar's VType, but not it's IType.
autrijus and I suspect without implemtation one can't talk about it much really.
in perl5 it's called "magics"
and people generally don't like to think about them.
unless you are rgs or nicholas or jhi.
theorbtwo (Or, from a user-visible point of view, ties.)
autrijus except also overloads.
rgs I don't ! 21:04
autrijus the unifying concept is the one of magic.
rgs they force me.
autrijus poor rgs
Juerd I have a mac now
How do I tell the terminal to interact with linux boxes (via screen) properly?
autrijus IType is an attempt to rethink magics
Juerd I can't use things like backspace and cursor keys
autrijus but so far I don't think anyone has a good grasp of what they are or what they do. 21:05
Limbic_Region wonders if autrijus's 26 hour days have finally overlapped 21:12
autrijus about to. 21:13
wow, 5:12am.
gaal r812 demonstrates rjbs' parsefail inside a script.
test writers: please mark your failing tests (those that must be commented out because even eval doesn't protect from them) with "fail('FIXME: parsefail');" 21:14
this way they won't stay commented out forever :)
autrijus riight.
theorbtwo Or stick them at the end of a test-file, or in their own test file? 21:15
Juerd Ah, setting the terminal to xterm instead of xterm-color changes things positively
By the way, I'm impressed by the eye candy :)
integral you got extra RAM? The eyecandy eats it :-)
Juerd 512 MB 21:16
So far, it's snappy enough
integral has >1GB swap files with 256MB
gaal to2: that interrupts the readibility of the test
autrijus 23 subtests UNEXPECTEDLY SUCCEEDED 21:17
all in rindex
theorbtwo Cool!
autrijus I think it started that way :)
I took the liberty to untodo them all.
now, really really sleep. 21:18
g'nite all!
autrijus waves &
gaal night
lightstep night
jabbot pugs - 813 - * rindex is done, not todo 21:20
pugs - 812 - use "fail('FIXME: parsefail')" conventio
lightstep how do i create a new file with svn? 21:21
integral lightstep: :>file; svn add file
Juerd So - how are SEE sessions organised? 21:29
I want to join the next
theorbtwo Generally, by somebody saying so on the chan. 21:32
Are you interested in doing something in purtiular?
Juerd I want to see it in action
as a spectator, because I'm not really able to do much editing
autrijus lightstep: rooneg's blog: asdf.blogs.com/asdf/2005/03/fun_with_perl6.html 21:39
lightstep: obviously Exp can't do. you are right. VThunk is the way to go. 21:40
lightstep is converting the tree now
autrijus (the problem being that my $var := $?CALLER::POSITION did not snapshot the env)
ooh oho.
lightstep++
I can rest in peace, then.
lightstep i changed the Symbol definition, and follow the type errors
autrijus yup. :)
autrijus waves &
if you do finish converting the thunking, try reply on rooneg's blog just for fun :) 21:41
autrijus really off &
lumimies Hi 21:50
lightstep yo
lumimies Is there a statement/expression postfix when? 21:51
lightstep test it yourself :)
theorbtwo Should work pretty well like the p5 version.
lightstep i don't know enough perl to reply meaningfulli 21:52
lumimies perl really works hard on that Makefile 21:53
elmex hmm.... they synopses are somehow a little bit fuzzy... or maybe i'm missing a tutorial ;-) *g* ... 21:55
theorbtwo Try the exgeises. 21:57
mugwump freenode problem has 21:59
maybe just my node
elmex what problems have it does? 22:04
pasteling "gaal" at 192.115.25.249 pasted "weird goto parsefail (delete, don't comment, the last line)" (21 lines, 232B) at sial.org/pbot/8257 22:05
gaal can anyone try this and see if it happens to them?
this test parsefails
but if you delete the last line and decrement the plan, it passes. 22:06
elmex decrement the plan? you mean plan 1; ? 22:08
gaal yes
theorbtwo Umm... 22:09
gaal the plan is immaterial; the parsefail going away by simply removing "pass" is weird.
theorbtwo Hmm, random guess. Put an extra blank line after that pass("ok");
gaal to2, you see anything?
nah
elmex hmindeed 22:10
gaal elmex, you see it too?
elmex yes
gaal bleh.
jabbot pugs - 814 - finished the de-$self-ing of Algorithm::
elmex gaal: btw. i only get the parseerror if the last line contains pass(<string>); for example: pass(3); doesn't fail 22:12
gaal hmm 22:13
elmex even something like pass($xyz); works
theorbtwo Odd.
gaal ci'nning, fwiw. 22:14
elmex s/pass\(.+?\)/"astring"/ fails too
any string not in a block after plan and the first sub definition seems to fail 22:15
it seems to have something to do with the contents of the string "&sub.goto does" 22:16
if i replace the first occurence of it by something like "fo" it compiles 22:17
gaal oy
elmex "&sub.goto does" fails, "sub.goto does" works
gaal maybe that's being interpolated (ie executed)?
should that be happening? :)
elmex pass("&s.g"); fails, pass("&s"); works 22:18
weird
gaal method calls.
theorbtwo ...shouldn't interpolate without parens. 22:19
elmex lol 22:20
"&s.g;" works ;)
use v6; 22:21
foo("&s.f");
""
a smaller case
yse v6; ("&s.f"); "" 22:25
gaal elmex, can you add a t/ ?
elmex t/ ?
gaal commit a test case 22:26
elmex whats that?
no clue how and where and stuff ;)
gaal hm, the admins have gone to sleep it seems. tomorrow they may give you checkin privs, so you can write tests. 22:27
elmex never wrote any test in my life before ;) 22:28
gaal you jsut did :)
elmex and tomorrow i'm gone until the day after tomorrow
gaal (taking to /msg) 22:29
Juerd so far likes mac os
elmex use v6; ("&s.g"); "" is a test all by itself?
jabbot pugs - 816 - LKT - resync with Perl 5 version of Loca 22:30
pugs - 815 - goto.t, with weird parsefail
tomyan hmm, any program I run just says 'Illegal instruction' and exits 22:31
anyone else with same prob?
gaal where did you compile your pugs? 22:32
tomyan ah
sorry
compiled it before on another machine
too easy with nfs 22:33
what files to i need to delete so that make will recompile it? 22:34
gaal jsut make clean
tomyan thanks
theorbtwo make clean && perl Makefile.PL && make test 22:35
gaal hey, map doesn't work yet? :(
tomyan that didn't fix it 22:41
is debian sarge on sparc
don't know if that has an impact
stevan anyone know how SUPER:: is supposed to work in perl6?
gaal tomyan: are you getting the *exact same* error as before? what size is pugs? 22:42
tomyan 4006790 22:43
exact same error as before
have svn up'd and svn status indicates that there are no local changes 22:44
gaal see if you can compile + run a hello world with ghc
tomyan k
gaal tricky syntax question: can i construct an anonymous hash, assign to it via slice, and return it all in one swell foop? 22:49
jabbot pugs - 817 - correcting some items in Algorithm-Depen 23:00
tomyan ok have sucessfully compiled and run hello world
i also rechecked out a fresh pugs and get the same thing 23:01
not really sure how to go about tracking what the prob is
gaal well, i think you may be the first to try this on sun...
try to strace it?
tomyan i have been running it ok up until this evening 23:02
gaal though illegal execution sounds too early to trace.
are commas not allowed trailing lists? 23:04
@ary = (1, 2, )
gives me a parsefail
ingy ! 23:05
lightstep , and ; are not really done
, is partially done and ; not at all 23:06
gaal thanks
ingy, it's ok inside eval. 23:07
tomyan ok strace produces about a screenfull of info
have never used it so it doesn't mean very much to me
gaal that's a bit short (unless you have a tiny font), which is alarming.
can you paste it sial.org/pbot/paste 23:08
ingy yes please
gaal sounds like your kernel doesn't like what ghc gave it.
pasteling "tomyan" at 82.68.136.190 pasted "strace output" (109 lines, 6.9K) at sial.org/pbot/8266 23:09
gaal nothing obvious (to me), tomyan, sorry. 23:10
tomyan will google for similar probs with ghc compiled stuff 23:11
lightstep sigill? is it a pun?
gaal yes, it's what the kernel says when it barfs on your executable. 23:12
also spelled sickill. 23:13
tomyan yeah if i type ./pugs it goes into the shell ok
but if i type anything it happens
lightstep ask at #haskell. they have lots of experience with ghc bugs 23:14
stevan hey all, I just started porting File::Spec to perl6, it is in modules/File-Spec if anyone is interested 23:18
I have to go eat dinner now though, but I will be back to work on it more later
ingy stevan++ 23:19
jabbot pugs - 819 - TODO tests for trailing commas ((1, 2,) 23:20
pugs - 818 - started porting File::Spec to perl6, its
ingy stevan: it is likely that we will need to move it into ext at some point when MakeMaker is written in perl6 23:21
gaal good call picking SVN over CVS then :) 23:24
stevan ingy: sounds good to me 23:28
stevan is really going up for dinner now
jabbot pugs - 820 - forgot obvious further assertions for tr 23:30
elmex gn8 23:32
nothingmuch evening! 23:45
gaal hey
nothingmuch has not had this much fun since,
theorbtwo Allo, nothingmuch!
nothingmuch i think the begining of winter
yay!
crysflame hello slashdot
it.slashdot.org/article.pl?sid=05/0...&tid=8
gaal uh oh :) 23:46
theorbtwo Hm, that wasn't nearly as interesting as I'd hoped. Try again, nothingmuch.
nothingmuch well
crysflame autrijus posted the article
nothingmuch someone at home had a wedding
so i went with a very good friend
and ate a bit 23:47
and drank a bottle of wine or so
and danced to crappy music
and reminissed the 9th grade in the way back home
(we were a couple at the time)
Limbic_Region nothingmuch - did you finally succeed in imbibing voracious amounts of alchohol resulting satisfactory inebriation?
nothingmuch and then we saw the middle of a movie
and then i went home 23:48
lightstep does anyone here have some space on the web, so i can upload files for autrijus to work on in the morning?
nothingmuch detailed enough, theorbtwo?
Limbic_Region: yes
exactly the right amount too
head spinning slightly
sipping a bit more wine, to keep it going
gaal lightstep: how much do you need?
nothingmuch lightstep: i can open up an account with webspace, shell, email etc on woobling.org
it's a slow line (278k upwards), but aside from that no limitations 23:49
virtually
lightstep very little space, a few kb
gaal nothingmuch, that ain't very slow :)
nothingmuch gaal: bit, not byte
gaal prolly better take nuffin on his offer, because i can't give you a shell :(
lightstep nothingmuch, please do 23:50
nothingmuch login?
lightstep yes
nothingmuch no, i meant which ;-)
lightstep lightstep
or amirlb
heh
i got too tired hacking 23:51
theorbtwo nm: Much better.
nothingmuch anyone else want an account?
theorbtwo wonders how many Israelites there are on this project. 23:52
nothingmuch 4 last i counted
lumi, gaal, lightstep & moi,
lumimies I keep dying :/
This sucks 23:53
nothingmuch lightstep: ssh pubkey?
Limbic_Region I have an acct on perlmonk.org that I am not using - I wouldn't want to share my password but I could certainly put up whatever was needed 23:54
nothingmuch lumimies: perhaps your NAT router is dropping silent connections
Limbic_Region I am sure jcwren wouldn't mind
lumimies My network config is stupid 23:55
lightstep nothingmuch, i don't have experience with encription sw
i don't even have gpg
nothingmuch ok then, making temp passwd
lightstep how do i upload using ssh? 23:58
gaal r821, if anyone wants to add .bytes or .codes
Limbic_Region man sftp
man scp 23:59
scp localfile login@host:<path>
nothingmuch scp file [email@hidden.address]
Limbic_Region it will prompt for password
nothingmuch .htdocs is your public http dir
woobling.org/~lightstep