Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by stevan on 15 August 2005.
xinming_Beijing hmm, anyone here can tell me why pugs still doesn't support the class attribute initializing? hmm, Just like `class A { has $.a = 1 }; 00:37
wilx Because nobody has implemented it yet? :) 00:41
xinming_Beijing wilx: I don't think so... This bug has been staying for a month. :-) I think It might be something related to MetaModule. But I am not sure. 00:52
02:01 khisanth_ is now known as Khisanth
buu Where is evalbot's source? 03:35
Or at least, where could I find information about safe mode? 03:37
QtPlatypus buu: Its distributed with pugs. 03:47
buu Yeah, I found it. 03:49
Ick, evalbot forks pugs to execute the code?
Is there any equivalent of the Safe module for p6/pugs? 03:50
QtPlatypus Not to my knowlige, my advice would be to abstract out what evalbot does into a seperate module. 03:55
buu Er 03:56
I prefer not to do that.
Mostly I prefer not to fork. 03:57
svnbot6 r7128 | stevan++ | Perl6::MetaModel 2.0 - 05:01
r7128 | stevan++ | * added stub POD to all the files in lib/ ... documentation to come
r7128 | stevan++ | * added the * (root) package then added $::Class, $::Object, $::Package
r7128 | stevan++ | $::Module and $::Role into it.
r7128 | stevan++ | * added the ::Main package
r7128 | stevan++ | * class() and role() in the Perl6::MetaModel now install all classes into
r7128 | stevan++ | the * namespace (which actually is not always correct, but works for now)
nothingmuch rafl: ping 05:54
svnbot6 r7129 | Darren_Duncan++ | /ext/Locale-KeyedText : resync with newest perl 5 version changes 07:08
nothingmuch hi scook0 08:05
did you see the impl of your force_async thing?
scook0 howdy nothingmuch
no?
nothingmuch on the mailing ilst
scook0 oh, from the other day? 08:06
I saw it, but kind of glossed over it at the time -- I'll read it again now...
nothingmuch groups.google.com/group/perl.perl6....00b4f107b7 08:07
hmm
oh, i see
the links are not really linkable
groups.google.com/group/perl.perl6....00b4f107b7
xrl.us/hqm4 08:08
autrijus: ping 08:10
nothingmuch realized he has a big question in there
&OUTER::yield(@stuff); # how do we do this? Maybe $?CALLER_CONTINUATION.yield?
scook0 nothingmuch: I'm not really following it, sorry :( 08:14
nothingmuch buffer_lazy is a generator for a lazy list
it takes a lazy list
and returns it eventually
but it keeps an array
when there are no elements in it's array it takes an element from the lazy list directly 08:15
when there are elements in the array it returns the first one from there
whenever the array is smaller than $threshold elements, it also do an async { } that fetches more elements from the lazy list into the array 08:16
scook0 hang on, it's a generator? so it gets called from the start each time someone wants to fetch an element?
nothingmuch yep
scook0 (that's what was confusing me on first reading)
nothingmuch err, wait 08:17
i have a bug
scook0 is that sort of stuff specced somewhere?
nothingmuch 'yield shift @buffer' is bad
the whole function should be a loop
my @buffer
state Sem $collecting;
scook0 that's what I thought 08:18
nothingmuch while (@lazy) { ....; yield shift @buffer; }
scook0 otherwise the meaning of `yield` would have to be utterly insane
nothingmuch and state Sem $collecting should be 'my Sem $collecting'
scook0 it makes a lot more sense to me now
nothingmuch sorry ;-)
scook0 have you had a look at luqui's theory stuff? 08:21
nothingmuch yes
but not the new proposal
scook0 it's *very* ambitious
to be honest, I don't think it will be accepted, on account of changing everything too radically 08:22
but there's a lot of good stuff in there
nothingmuch hopes it does
there is no reason for it not to be
it's a superset of the current definition
scook0 are you talking about the old stuff, or the new stuff? 08:23
nothingmuch what he was talking about for the past 2 weeks or so
damnit!
this bug is reproducing 30% of the time
where 70% is the times that i have had a breakpoint on the problematic code, and didn't hit continue by accident 08:24
scook0 nasty
nothingmuch: any recruits for Blondie? 08:26
nothingmuch not yet
i haven't worked on it in the weekend either
had a few obligations
wnat to join the fun? 08:27
scook0 as much as I'd love to help, I: 08:38
a) don't have the time, and
b) am lousy at P5 :)
nothingmuch =) 08:45
scook0 is it essentially a test-bed for your 'circular prelude' idea (and similar stuff)? 08:47
nothingmuch yes, that and type inferrencing in a dynamic/static language mix 08:48
The upshot is that you can easily delegate an arbitrary argument list to 08:49
another function:
sub foo (*$args) { bar(*$args) } # call bar with whatever args foo
# was called with
luqui++
scook0 yes, I thought that was very clever 08:50
and a great re-purposing of the slurpy scalar
nothingmuch yep
scook0 (which I thought was a little dubious)
and it's good that he came up with something to replace it too
nothingmuch can you do a slurpy unpack? 08:51
sub tail (*[$head, @tail]) { @tail }
tail(1, 2, 3); [ 2, 3 ] ?
scook0 `sub first (*[ $x, *@xs ]) { $x }` 08:52
(from the doc)
one thing I don't get, though, is this: 08:54
"When you extend a union, you create a superset (but still a subtype)."
I'm pretty sure that union subtypes have to be SUBsets
nothingmuch oh, nice. 08:55
i still have to sync with that terminology
scook0 subtypes?
or model/theory/factory/generator etc? 08:56
nothingmuch subtypes and supersets WRT theories
i keep getting confused with which means what
scook0 maybe you should read TaPL :) 08:57
nothingmuch yes, the moment i get it =)
scook0 so if S <: T # S is a subtype of T
then any 'receiver' expecting an S can safely be given a T 08:58
uh, thinko
freakazoid hiho
scook0 other way around
nothingmuch vice versa 08:59
hi freakazoid
scook0 (see how confusing this is!)
freakazoid hi nothingmuch
nothingmuch yep
scook0 so if I expect Type, you can give me Subtype without invalidating my assumptions
nothingmuch what's up freakazoid ?
define superset
scook0 wrt unions? 09:00
nothingmuch no wait, don't bother
nothingmuch is not at even 30% concentration
this bug is driving me nuts, and I ate something bad so i'm not really myself either
scook0 oh well
do you know what a superset is in general? 09:01
nothingmuch in set theory?
eys
yes
scook0 do you know what a (tagged) union type is?
nothingmuch nope
no idea what tagging is
scook0 hmm
nothingmuch and i'm not sure i know what a union type is either 09:02
i could make an educated guess
scook0 I'm sure you know what I'm talking about; I just have to find the right words to bridge the gap
nothingmuch which is either the C idea of union (probably not)
or the subtype that is two types together
or the supertype that is either type a or type b
scook0 do you know about defining datatypes in Haskell?
nothingmuch yep
e.g. data Foo = Bar | Gorch ?
scook0 or `data List a = Nil | Cons a (List a)` 09:03
nothingmuch yes
so Nil a and Cons a (List a) are subtypes of List? 09:04
scook0 I'm pretty sure 'union' is just luqui's Perl-friendly name for a Haskell-style data type
nothingmuch and List is their union?
okay
scook0 umm, I don't think so
give me a sec to think of a good example 09:05
data Fruit = MkApple Apple | MkOrange Orange 09:06
Fruit is a 'union' which can hold either an Apple or an Orange 09:07
nothingmuch hmm 09:08
nothingmuch sees it slightly differently
since Fruit is boxed
into two different constructors
scook0 yes
nothingmuch so it can't really hold either an Apple or an Orange, it can hold an apple xor an orange
okay 09:09
scook0 that's why it's a 'tagged' union
because it has the MkApple tag, or the MkOrange tag
nothingmuch oh
i see
scook0 (I'm not really following Haskell terminology, btw)
anyway, let's say I define another data type: 09:10
data Food = MkApple Apple | MkOrange Orange | MkBread Bread
notice that Food is a 'superset' of Fruit
nothingmuch aha 09:11
scook0 because it has all the same constructors (plus more)
nothingmuch makes sense
does haskell allow that?
scook0 no, I don't think so
but let's imagine we're working in a language that does allow it 09:12
nothingmuch yeah
scook0 you'll notice that any function taking Food as an argument
should be perfectly happy with receiving a Fruit
nothingmuch can also take Fruit
scook0 exactly
nothingmuch okay 09:13
so what was the confusion again?
scook0 so Fruit <: Food
nothingmuch fruit loves food 09:14
scook0 Fruit is a subtype of Food
nothingmuch ;-)
scook0 luqui appears to be claiming the opposite 09:15
(from what I can tell, anyway)
nothingmuch maybe it's just a wordo
i'm lacking context for that sentance
so when I get to it i'll state my opinion =)
scook0 oh
where are you up to?
nothingmuch fixing a bug 09:16
eating bread to pass nausea
considering the rest of my lunch but waiting it out
scook0 anyway, I'll ask him when I next see him on IRC 09:17
nothingmuch opens the services panel for the nth time
nothingmuch doesn't know why he is maintaining code in C++ that does windows API calls when he doesn't really know either 09:23
svnbot6 r7130 | autrijus++ | * add link to cufp2005.pdf 11:16
nothingmuch autrijus: cute talk 11:36
a bit like a psychadellic movie witout the talking, I guess
wolverian what is the link? :) 11:58
masak no.perlcabal.org/~autrijus/cufp2005.pdf 12:00
nothingmuch i hate windows 12:03
nothingmuch is trying to deal with service handle leaks across process space 12:04
appearantly some kind of caching is making the object not die
because the same code when run in it's own debugger does not leak
but when exec'd by another process does leak
nothingmuch cries
masak hugs nothingmuch 12:06
just don't use windows
nothingmuch it's not me, it's our clients
masak :(
nothingmuch this is the horrible horrible instller
that i have to maintain 12:07
masak i've never heard anyone say "oh, this source code is so great! it must be written by a genious" 12:08
possibly excepting autrijus' and damian's stuff
nothingmuch thinks damian's code is not great at all
have you ever tried reading it? ;-) 12:09
masak yes :)
nothingmuch has read some great code in his life
masak but i was talking about what people say about it
nothingmuch: really, what code?
nothingmuch some stuff on CPAN
let me think
masak is reading "Perl Best Practices" right now 12:11
most things seem to make a lot of sense 12:12
nothingmuch yeah 12:14
masak most tips boil down to "don't be clever, be clear. write maintainable code"
nothingmuch the problem is that most people say "damian says" 12:15
perlmonks is filled with "damian said I should always do yadda"
"but i have a situation where yadda is not so good"
masak that's never a good reason to always do something :)
nothingmuch "am I allowed to not do yadda just this once, even though Damian said not to?"
i'm sure it's filled with wonderful advice
masak people who ask that have already given up their free will to someone else 12:16
nothingmuch but i think that the community has not been accepting it with enough maturity, and that it has actually caused some harm
right
masak the world is full of folks who don't want to think
QtPlatypus I've read stuff from Damian where he say's its not ment to be used that way.
masak he says it in the book too
but maybe people don't read introductions :) 12:17
nothingmuch i bet he did, but I doubt it matters =)
right
QtPlatypus Fundermentalizim seems to taint all things.
nothingmuch i think i know why I can't think of any good code
i haven't been traumatized by it
masak :)
that's just sad 12:18
you only remember bad code
because it's bitten you
nothingmuch heh =)
well, there's lots of good code here: search.cpan.org/~nuffin
;-)
masak lol
you're the modest one 12:19
nothingmuch i think i judge good code by how hard it was to modify it so it gets what I want done
masak then it's entirely possible that the programming community as a whole just isn't there yet 12:20
and never will be
reusability is durn hard
nothingmuch i think it's there
there are examples of code which I think is good since i never had to touch it's guts
like Test::Deep, for example
the interface is so good that it does everything i want without being bloated 12:21
masak today, yes
nothingmuch today? 12:22
masak today you don't need to poke inside Test::Deep
nothingmuch ah
masak because it does everything you want
nothingmuch well, it has very flexible semantics
it's a pattern matching language for deep structures
masak it might still not be very reusable, though it gets the first half (flexible interface) right 12:23
nothingmuch and it's good enough because it offers abstraction at a level slightly higher than most patterns should use
right... i'm not claiming anything about it's guts
i've yet to see them
masak the second half (maintainable code) is just as important, if not more so
nothingmuch maybe they're a delight
masak maybe
nothingmuch maybe they aren't
masak there was a dream a couple of years ago 12:24
probably still is
about software being like lego bricks
nothingmuch what dream?
ah
masak component-based programming
nothingmuch one reason I like autrijus's code (perl code) is that it's very non-pretentious
masak do you have a good example? 12:25
nothingmuch for example search.cpan.org/~autrijus/HTML-FromANSI-1.01/
i needed to do a very weird thing with it
as opposed to what it does at the moment
instead of displaying a single screen, i needed a "termnal" that grows indefinitely
the way it works is it uses the vtterm emulator on CPAN
and then renders it's state to HTML 12:26
i needed an incremental interface to display progress from colored output as HTML
masak the code looks very clean
nothingmuch and I needed the whole log to be displayed
right... it's not very flexible interface wise
but it's so simple that you can reuse it all the same
i broke encapsulation, ofcourse 12:27
which is a nono
but I don't care
masak that's what i mean
nothingmuch the problem was:
sub ansi2html {
my $vt = Term::VT102->new(
cols=> $Options{cols} || 80,
rows=> $Options{rows} || count_lines(@_),
);
i needed it to be a factory method
so that I could use my own hack, Term::VT102::AutoExtending, which had no concept of rows 12:28
masak reusability, *real* reusability, is using those lego bricks without breaking encapsulation
nothingmuch right
masak i don't think it ever will happen
nothingmuch one lesson learned from this is that I always use factory methods in my classes
i would say $self->term
masak that's why perl comes to the rescue, with its lawlessness :)
nothingmuch and sub term { shift->term_class->new() }
and this makes orthogonal overriding of this specific feature easy 12:29
masak ah, ok
nothingmuch you can change the class, or the instantiation, or both
masak yes
nothingmuch what frustrates me about static languages and closed source in general is that things like this are not the de-facto standard
autrijus obviously needed to get the job done quickly
and he did it well, and put up his code for others to use
i am 99% sure he'll accept a refactoring patch, btw, but that's besides the point 12:30
masak yes
nothingmuch i was able to take his code and use it even though it was not 100% useful for me
and i don't expect any code to be 100% useful for me, without infinite financial backing
masak right
rafl nothingmuch: pong
nothingmuch rafl: did you find the image i sliced up for you? 12:31
rafl nothingmuch: No, would you give me the URL again?
nothingmuch nothingmuch.woobling.org/7peoples.png
masak how's STDERR spelled in p6? 12:34
nothingmuch $*ERR i would think
see also $*OUT
masak thx
yes, *ERR, by S02
err, $*ERR 12:35
rafl nothingmuch: Thank you! 12:38
nothingmuch wonders why there is even 12:48
a discussion on the stringification/interpolation thread
i haven't heard anyone say it was a good idea except for damian
masak what, to differentiate between interpolation and stringification? 12:49
nothingmuch yep
masak no, me neither
nothingmuch masak - Algorithm::Bucketizer was very nice to hack 12:51
reusable, flexible, precise
masak i'll go have a look
scook0 nothingmuch: off to bed; see you later
nothingmuch ciao!
masak yeah, Algorithm::Bucketizer looks real neat 12:53
some code, and lots of docs
all clearly written
nothingmuch i forgot what kind of fucked up bucket implementation i needed
but it handled it very gracefully
ah 12:54
i needed variable sized buckets
masak you're crazy
nothingmuch i had variadic resources
and I needed to binpack them
and it allowed me to use a generator
so that it requests the next bucket each time
masak sounds nifty 12:55
nothingmuch it was a wonderful experience in that respect
SQLT otoh ;-)
i gave up trying to use it because it was so not reusable
it's biggest limitation is that it's filled with singletons by behavior (not definition) 12:56
that is, classes which can only be successfully instantiated once
masak ouch
nothingmuch due to data structures being ruined
masak nasty
nothingmuch it also has huge subs of interpolation madness
i wanted to create a schema filled with temporary tables
i had to use a s///
i also had to split the statements to actually pass them to $dbh->do 12:57
masak why?
nothingmuch i think the sqlite driver didn't like to get semicolons in the statements 12:58
it needed a statement per do
masak :(
nothingmuch the project was very fun though
you create a schema in terms of sqlfairy schema objects
with some sugary subroutines with nice prototypes, so that it slightly resemebles the declarative nature of real DDL
then this stuff is used to generate CDBI classes at runtime 12:59
optionally creating the actual tables in the DB.
the gain was that production and testing used the same schema
so tests could run on a temporary sqlite.
while production was on postgres 13:00
masak is translating Getopt::Long to Perl 6 right now
nothingmuch with no code changes except 'sub dsn { $0 =~ /\.t/ ? "test dsn" : "production dsn" } # in the config lib
masak++
masak and learning some Perl5 along the way
nothingmuch you dunno perl 5? 13:01
masak not 100%
i've used it a lot lately
nothingmuch how did you wind up here? haskell?
masak no, following general p6 development
nothingmuch ah
masak i don't know any haskell
nothingmuch what's your background?
masak webmaster, programmer, bioinformatics student
nothingmuch in perl 5? 13:02
masak no, i just use perl5 on the side :)
whenever i get the change
chance*
nothingmuch so what did you do those stuff with?
masak those stuff?
nothingmuch webmaster, programmer, bioinformatics student
masak the two first: xml/xslt
the two last: java, mainly 13:03
nothingmuch you poor thing ;-)
masak i know :)
but it's a living
nothingmuch hehe
masak and it gives me something to complain about :)
nothingmuch jobs.perl.org
complaining is very important
masak the url: ah, didn't know about that 13:04
nothingmuch =)
masak right now i'm not looking for more to do, though :)
but thx
i'm really buying into $larry's talk about perl being a postmodern language, btw 13:05
and i do think it's a strength
perl is not built to last, it's built to adapt
especially perl 6 :) 13:06
nothingmuch =)
it is
masak is there a way to p6ify this expression:
$opt = $+ if $opt =~ /^$prefix+(.*)$/s;
nothingmuch i think the only area perl 5 is lacking is the hard edge between inside and out (c, and perl) 13:07
masak or should i just leave it as it is?
nothingmuch and the fact that there is false huffmanization
masak yes
nothingmuch for example 'my $self = shift' 1000 times is not very huffy ;-)
masak :)
nothingmuch hmm
nothingmuch forgot what $+ is 13:08
masak last paren match
i had to look it up too
nothingmuch ah
masak that is, the paren in the postfix if
not very intuitive by me
my first instinct was to look at the line above...
nothingmuch i would actually do $opt =~ s/^$prefix+//s;
masak yes, i think so too :)
thx 13:09
nothingmuch and I'd use /x too to separate ^ from $
$opt =~ s/^ $prefix+//sx;
that way it's more readable that $prefix is an interpolated variable
masak this is p6
you don't need /x
nothingmuch i'd also make a point of qr//ing $prefix, so that it's obvious what it'd be used as later
the source in question is copypasted from perl5, isn't it?
oh wait, you asked me to p6ify ;-) 13:10
masak yes :)
nothingmuch so what's in $prefix?
a pattern? or a literal?
masak a literal
$opt ~~ s/^ $prefix+ //;
nothingmuch yep
masak ...maybe
nothingmuch i like it
wolverian $opt.subst(/^ $prefix+ /, ""); # ;) 13:11
masak ;)
i would say the postfix if was an overreaction in the first place 13:12
since the regex would just fail silently if nothing matched
ah, and I'll throw in a P5 too, just in case 13:13
the original author has a few off-by-one errors here and there 13:14
at least i think so
maybe i should contact him
nothingmuch are you porting it 1:1?
or are you basing off it?
masak err... i was going for 1:1
but gaal had so many great ideas
so i'm implementing some of them 13:15
and i think i'll correct the obvious errors
nothingmuch how long is Getopt::Long?
masak like, he checks @ary > 0 before looking inside $ary[1] 13:16
it's long
nothingmuch do you think you could break it apart to several modules somehow?
masak maybe, i haven't thought about it
i just want it to pass the tests in the p5 version
nothingmuch hmm
masak which i have already ported and comitted 13:17
nothingmuch the problem with Getopt and friends is that they are too big and not reusable enough
they don't share any cod
e
did you hear my event parser rant?
masak right
no, i didn't
nothingmuch okay
masak oh, wait
yes, i think so
you wanted layered getopt, yes? 13:18
nothingmuch yes
masak that's beyond me
i get the idea
nothingmuch for example, clustered switches should replace the switch handler
to create several switch events
etc etc
masak yes, i know
it's really nice
but it's not getopt:long
at least not mine :)
nothingmuch well, i would be very happy for observations on how you think getopt::long could be implemented in terms of event parsing 13:19
or rather, where it wouldn't work
masak i'll think about it
as i translate
right now i'm trying to break down work so i have something (half-done) to commit 13:20
nothingmuch goody 13:22
masak gaal and i already agreed on a non-trivial enhancement to getopt::long 13:26
nothingmuch which one? 13:27
masak returning the option hash/object instead of just a 1 if all went well
nothingmuch ah yes
boolean status return is never quite enough
exceptions should be used for failure
masak and disallowing non-hash use of getopt::long
yes, exceptions
nothingmuch and compound result for summary =)
masak++ 13:28
masak where do i read more about fail?
:)
nothingmuch forgets
i think that s 04
masak oki
i'll have a look
nothingmuch really hopes that was the last handle leak plugged
nothingmuch also hopes that the next time he meats the author of this code he'll have a hatchet close by
err... meats 13:29
masak :)
nothingmuch freudian slip, eh?
masak fwiw, i like your p6l post
nothingmuch HAH! fixed
which one?
masak the last one about interpolation/stringification 13:30
nothingmuch ah
gaal hello. 13:34
nothingmuch hi 13:35
gaal masak: some verbiage on 'fail' here: www.livejournal.com/users/gaal/170284.html
nothingmuch: either the fail builtin or Test.pm will have to back off :-) 13:36
nothingmuch hmm?
masak gaal: thx
nothingmuch back off?
gaal Test::fail and fatal::fail 13:37
one of them should likely be renamed.
nothingmuch ah 13:38
Test::fail, i think
it's not as generic
since we have variadic args:
ok()
nok()
pass and fail
gaal i don't follow the genericity/variadicness line of thought. 13:39
variadicity? :)
variady? :)
maybe rename to &passes and &fails? 13:42
nothingmuch sorry
well 'multi sub ok () { ok(1) }; multi sub nok () { ok(0) }'
it gets tricky.... multi sub ok (Str $desc) { ok(1, $desc) }; multi sub ok ($x) { if ($x) { ... } else { ... } }' 13:43
nevermind, it's silly
i think 'ok(1, "desc")' for pass 13:44
and 'nok("desc")' for fails
or fail
with aliases to passes and fails
gaal urp?
no, it's good to have convenience methods for that
nothingmuch hmm... okay
gaal i insist they should exist :)
nothingmuch has a weird idea
use fatal 13:45
gaal only question is what to rename them to
nothingmuch try {
CATCH ($e) {
$e.continuation
}
that is, Test imports fatal to it's user
fail("foo") is just fail("foo")
and causes an exception
gaal you are insane :) 13:46
nothingmuch Test's exception handler prints a NOK
and then goes to the exception's continuation as if the exception was non fatal
=D
gaal is laughing out loud
nothingmuch autrijus: please implement this
gaal (demonically)
nothingmuch i think i'd rather like this
p6l time
gaal i don't like it 13:47
nothingmuch how come
if code is already suitable for fail as an optional exception
gaal because then innocent code that does die "moose" risks being interpreted as a non fatal failure
nothingmuch then why not let the user decide on a case by case basis whether they want an error to be fatal or not?
gaal (if i understand correctly)
nothingmuch yes, it could
gaal in tests!?
nothingmuch but that's the user's fault
remember that the exception handler can look at the exception object 13:48
and determine if it was die or fail
(i hope)
gaal nnnnnuh, i don't think it can
nothingmuch it should
gaal how would you do that categorically? 13:49
nothingmuch define.assuming(:context($this)).(categorically)
gaal wrap all fails "str" in a die fatal.new("str")
nothingmuch errm, no
gaal but what about fail $obj
nothingmuch every exception is already an object
since there is a whole exception stack 13:50
gaal well, fail $x is just like die $x
if use fatal is in effect
nothingmuch every exception being raised captures the current value of $! and stores it
so no nested exceptions are lost (unless explicitly deleted)
gaal in my code, i do either die $x or fail $x. what do you do to tell the two apart? 13:52
nothingmuch $
gaal (you're the caller)
nothingmuch $! will contain the data
gaal yes, what i called $x
and?
nothingmuch nono
read s 04
$! is more than $x
gaal from your pov, the two $!s are identical
nothingmuch it contains, for example, handled and unhandled 13:53
gaal hmm
nothingmuch i claim it should contain info on whether it was thrown because i used fatal
or because it died
gaal so you stipulate another member, `fail` or `exception`?
nothingmuch well, they're both excceptions in this case
read s04 on fail
gaal i meant `fail` or `die`. 13:54
nothingmuch 'fail examines lexical scope for use fatal... will return an unthrown exception or throw an exception' (paraphrase)
gaal yes, of course
nothingmuch sub fail ($stuff) { $?OUTER::IS_FATAL ? die($stuff) : return Exception.new($stuff) } 13:55
i think
the exception object is almost a proxy to $STUFF
err, $stuff
but it contains meta data
like the value of $! before it was thrown
gaal see class fatal in the Prelude.
nothingmuch or whether some CATCH block matched it
is it != what s04 says? 13:56
gaal you can't use OUTER there, but nm
i must go now
nothingmuch i meant $ 13:57
gaal back in ~40min
nothingmuch ?CALLER
ciao
gaal can't use caller either
nothingmuch how come?
gaal never moose, that's not the interesting part
later &
nothingmuch ciao 13:58
hola autrijus 14:18
14:18 autrijus is now known as autrijus_tw, autrijus_ is now known as autrijus
nothingmuch already back? 14:18
autrijus back? 14:19
I'm still in Tallinn
nothingmuch: patches welcome to FromANSI
nothingmuch autrijus: patches unnecessary =) 14:20
so what is _tw?
it's Good Enough
autrijus _tw is the screen from the server in.tw
nothingmuch oh
not your physical presence =)
autrijus :) 14:24
autrijus goes back to releng
nothingmuch autrijus: i think you're going to like my latest idea 14:25
or be very frightened at the very least
autrijus does it have something to do with attributive grammar?
(probably not, it's just I'm reading about it now)
nothingmuch no, about continuations, exceptions, and symmetry
autrijus okay... 14:26
nothingmuch p6l is getting a nice code example soon
autrijus good, I'll look at that
gaal rehi 14:28
nothingmuch: so the reason you can't use CALLER is that pragma values aren't regular vars
they're actually available at every node in the syntax tree
nothingmuch gaal: i need to go... ride
ttyl
gaal remember they're a compile-time thing
bye.
autrijus: mind taking a look at lexical pragmas, maybe we can get them in for the release? 14:29
autrijus yes
gaal great, sec
autrijus I'll fetch some drink, be back in 10 mins 14:30
gaal ok, typing ahead:
autrijus then I can work ~5 hours for release
gaal the code that's currently in is bogus; we need something like this: sial.org/pbot/13305
except that that loops :-)
it loops in the second readTVar; nothingmuch suggested changing InitDat in the Env to be an IORef instead of a TVar but that entails writing Show and Ord methods, which might be hard? 14:32
i don't grok STM really; maybe all that's needed is just some atomic (...) around something?
also the Prim side of this may be mistaken, but that I can take care off. 14:33
autrijus rehi 14:39
parsing your typeahead 14:41
ok 14:43
so I'll apply it locally 14:44
gaal okay, you can also remove the cruft from ruleClosureTraits 14:47
want a real patch?
autrijus sure, that'd rock, and a oneline test
gaal ./pugs t/packages/lexical_pragmas.t
autrijus k 14:48
ooh, nice test
real-patch-p?
gaal it's all mjd's :)
sec
feather:~gaal/lex_loop.patch 14:49
i can move that to the webspace if you prefer
autrijus +import Data.IORef 14:50
this is redundant right?
in P.A.Internals
gaal anyway, the test might still fail because of bugs in my pragma installing code: if you get it not to loop though then, good :)
yes, it is
autrijus also btw, + trace ("<1>") (return ())
may be written as
gaal from my rewriting attempt
autrijus liftIO $ print "<1>"
gaal print?
autrijus er no
gaal for some reason that didn't work
oh, liftIO $ print
autrijus sorry, because Rule monad is not MonadIO
gaal ok
autrijus but it can be made as such
may be better after all
gaal ah, okay. 14:51
autrijus compiling 14:52
still trying to grok the patch
gaal - set up a place for &import to write to
- call import
- import installs a list of new values (usually just one)
autrijus "unsafePerformSTM $ atomically" 14:53
you don't need the atomically
gaal - slurp that and stick it in the ast
autrijus that's what unsafePerformSTM does implicitly
gaal oh right, that was just me grabbing at straws :)
the clever thing about the design is how new pragma values are prepended to the list
autrijus I wonder if envInitDat needs to be TVar 14:54
gaal so nothing except the head pointer needs to be copied
autrijus I think it wants to be pure
gaal oh! that'd simplify things
autrijus since you can't modify it at runtime
gaal true
autrijus and then the unsighty side effects can go away
we'll just store env as usual
nothingmuch gaal: it was besides the point 14:55
gaal so, in parser i can basically modify env as much as i like until i'm done?
autrijus yes, that's the idea
nothingmuch $?CALLER::IS_FATAL could be a constant compiled into the closure via the pragma
autrijus see putRuleEnv
nothingmuch i meant to convey the principal
gaal nothingmuch: { use myprag; x; no myprag; y } 14:56
nothingmuch err... really, it doesn't matter =)
gaal i agree.
autrijus so 14:57
-- Reset the initdat list
putRuleEnv env{ envInitDat = MkInitDat [] }
nothingmuch Exceptuations on p6l
autrijus makes some sense?
gaal there's an internals api you have to use, and it could conveivably be made to work automagically from a var
autrijus: yes, changing 14:58
gaal praises type inference 14:59
great for refactoring :) 15:00
autrijus yeah
hm, if it is pure though, Pugs::Internals::install_pragma_value needs to be rethunk
gaal brb
autrijus ponders using a regular @*PRAGMA 15:04
I mean @*INITDAT
gaal actually that was just a container for things passed from an &import hook 15:05
at first i made a mistake and thought the installation should have taken place from a BEGIN block, so i wanted to put VContorl (see possiblyExit) there too 15:06
but that was just a mixup
i can't think of anything else import needs to convey to the parser, so maybe we don't need initdat at all.
anyway, that's refactoring; it can wait till after the release
autrijus k 15:07
gaal (phone) 15:08
autrijus so envInitDat is basically a list of pragmas _waiting_ to be installed 15:09
gaal exactly 15:11
i wish it didn't have to exist on every Env, looks like a waste 15:12
autrijus so any reason why we can't make it in line with @*END @*BEGIN etc?
nothingmuch patiently waits for feedback =) 15:13
gaal hmm, what's the lifetime scope of that? 15:15
autrijus gaal: local() scope
gaal it can be a globalish thing
autrijus nothingmuch: so the idea is $SIG{__DIE__} can "on error resume next"
gaal dynamic, that's good
autrijus that's basically the "on error resume next" idea
nothingmuch err, sort of
what is "next" in here?
gaal autrijus: but doesn't that get us into thread safety stuff? 15:16
autrijus same as your .continue
gaal: compile time thread safety is overrated
nothingmuch well, it depends
since it's 'throw' like in other languages, but 'fail' it's slightly different
if open returns a fail, instead of a handle, the exception handler has the oppertunity to change the return value to a handle 15:17
gaal lol
autrijus ok. I have no problem with that notion, but it should be a EC
$!.continue should never return
nothingmuch agreed
it causes the 'fail' to return a different value than the exception
autrijus also sometimes errors occur at a level below p6 15:18
and is not easily resumable
since the tonext is lost in a lower level
stevan morning boys and girls
nothingmuch that's as if the fail happenned as the last statment of the wrapper
autrijus s/tonext/context/
nothingmuch hi ho stevan
autrijus stevan: heyw
nothingmuch e
g
e.g. open
gaal hey stevan
nothingmuch it doesn't continue in the open system call
it lets your exception handler take the 'fail "bah"' return by the perl 6 function open 15:19
and replace the value with an equivalent handle
just like in my example the permission denied error allows a chmod dialog to open up
autrijus I wonder if $!.resume is a better name
nothingmuch and exceptions from that exception handling code could be handled to do a sudo 15:20
autrijus again, I have no problem with that notion.
it's something I tried to hack into p5
nothingmuch .resume is nice
autrijus and failed miserably
nothingmuch hehe
autrijus do { return 1/0*3; CATCH { $!.resume(9) } } # 27 15:21
nothingmuch yes
gaal does resume move out of the scope, or actually resumes where we left off?
stevan can anyone me to information about fail() and the BAILOUT method?
nothingmuch gaal: if you assume everything is CPS then it's simpler 15:22
fail has the continuation to * 3
it applies that with the exception
autrijus stevan: never heard of BAILOUT
gaal do { my $x = 1/0*3; $x = "moose"; CATCH { $!.resume(9) } # moose?
nothingmuch it also puts a copy of that continuation in the exception object
stevan autrijus: it is in Test::Builder, I had never heard of it either :)
nothingmuch and CATCH can apply the continuation with a different value, after the exception is thrown
yes
gaal isn't BAILOUT when a test crashes hard? 15:23
autrijus stevan: I think it's not a builtin
stevan hmmm
ok
nothingmuch it's definately not a builtin
gaal gets back to implementation
stevan will just ask chromatic, since he wrote the thing :)
autrijus gaal: so this: let idat' = unsafePerformSTM $ readTVar $ envInitDat env
loops
that's the bug you're hitting? 15:24
gaal yes
oh, i know why we can't just use a value, autrijus.
autrijus but I'm seeing <5>
gaal in Prim:
fraxtal Woo I fixed a link on the wiki
gaal Pugs::Internals::install_pragma_value
has to write to that list...
autrijus yes, I said that :)
gaal you did? oh when you mentioned @*PRAGMAS? 15:25
autrijus yeah
gaal cargo cults some more 15:26
obra nice slides, autrijus
autrijus obra: thanks!
gaal oh, i missed 18:00 < autrijus> hm, if it is pure though, Pugs::Internals::install_pragma_value needs to be rethunk
autrijus gaal: why the let between <1> and <2> 15:27
why can't you say
return $ unsafePerformSTM $ writeTVar (envInitDat env) (MkInitDat { initPragmas = [] })
obra "Arrow length over time"
autrijus obra: *grin*
gaal i can, i can.
autrijus well, if so, it loops not
gaal really? cool. why did it loop too with the let? 15:28
autrijus because the value of writeTVar depends on idat
idat's value depends on readTVar
so circular dependency between idat and envinitdat
(do note the Parsec Rule monad is lazy) 15:29
gaal arrr
svnbot6 r7131 | autrijus++ | * fix random control chars in cufp2005.txt 15:32
autrijus so it's still not passing tests 15:34
gaal that may be because of errors in install_pragma_value 15:35
(still compiling here)
autrijus it's always # Got: '8' 15:36
gaal beacuse maybe i'm not writing to the right plcae
autrijus "unoptimised" is your friend :)
gaal true :)
hey, i got that always-8 sometime too
i think that's the last value ever written, no?
yes, it is. 15:37
autrijus it is.
gaal yeah, well, i think i can take it from here then.
xinming_Beijing autrijus: hmm, May I know if MetaModule design is finished?
stevan xinming_Beijing: it is mostly finished
some work still remains, but the core design can be considered finished 15:38
xinming_Beijing hmm, So, Does it mean, That rule support will be "soon" available? :-P
stevan Rule? or Role?
nothingmuch explained CPS in another reply to the thread
autrijus gaal: cool, do so then :) 15:40
gaal am. thanks very much :)
xinming_Beijing stevan: rule...
autrijus no prob :)
xinming_Beijing not role...
nothingmuch gaal: did the scenario in the email convince you of the value of continuable exceptions?
autrijus I think xinming means the shift-of-focus from 6.28 to 6.283
stevan xinming_Beijing: ah, that is not related to the MetaModel then,.. that is the Rule engine
nothingmuch ofcourse, it only makes sense when exceptions are optionally fatal to me
gaal nothingmuch: do you need an answer now? :) me brain be of limited capacity and i want this feature in the release 15:41
nothingmuch gaal: take your time =)
i would like to know if the example is clear though
eventually
xinming_Beijing autrijus: yes...
gaal okay, will do. 15:42
xinming_Beijing it seems, that the working progress walk skip the schedule... :-P
autrijus xinming_Beijing: I'm working on basic releng at this moment for 6.2.10 15:43
if we are very lucky, 6.28.0 may happen around euro oscon, which will make a good gift to the eurooscon people
xinming_Beijing In my memory. that the rule support will be finished first... and then the role support will be added...
gaal autrijus: btw parrot hangs when called as a separate exe on win32, may want to disable it for now
nothingmuch what's 6.28 feature set supposed to be like?
xinming_Beijing nothingmuch: maybe basic rule support... 15:44
nothingmuch ah
xinming_Beijing and the role support will be release as a surprise for the next day.. ;-)
autrijus xinming_Beijing: actually, compile-time roles (Traits) are 6.28.0 15:45
I guess I should fix the 6.2831.0 so it says something better than "other runtime features"
xinming_Beijing the day after tomorrow, I will have more time to do the test... hmm, In fact, I was feeling a bit sorry on do-nothing. But take a line in the AUTHORS LIST. :'( 15:46
autrijus maybe "type system features" and "constraint types" etc. not sure it matters
xinming_Beijing tomorrow, I will go and change 2 x 512M ram into a 1 x 1G single ram...
and will go out in the morning... :-) 15:47
autrijus cool :)
xinming_Beijing autrijus: hmm, by the way, Is 10.1 a festival in your area?
autrijus xinming_Beijing: er, no, not by any measure
10.10 is.
svnbot6 r7132 | autrijus++ | * random kwid cleanup to 2005-09-21.kwid
xinming_Beijing autrijus: Oh, 15:48
autrijus I care very little about either one :)
nothingmuch btw, i think 'on error resume next' is completely different now that i've learned a bit about it
because it's declarative, and all or nothing 15:49
autrijus it's not unlike a
xinming_Beijing autrijus: hmm, by the way, I ever wish to change the Simplified version of Apocrypha on some words... But I was a bit afraid of doing something wrong...
nothingmuch continuable exceptions let you inspect the error first
with regular try/catch semantics
autrijus { CATCH { $!.resume } ... }
nothingmuch and then choose
right
autrijus right, yes, yours is much more flexible
nothingmuch which is obviously bad code =)
autrijus xinming_Beijing: nah, just commit
xinming_Beijing autrijus: In fact, there are some characters we use less than "traditional Chinese",
nothingmuch in order to 'on error resume next' you can just 'no fatal'
autrijus xinming_Beijing: yeah, please fix away 15:50
nothingmuch: er no, "no fatal" still dies on die"" and 1/0
nothingmuch is there any random releng work i could help with?
on 1/0?
xinming_Beijing å°±ę˜Æę„ę€éƒ½åÆ仄ē†č§£ļ¼Œä½†ę˜Æäøę˜Æęˆ‘ä»¬ēš„ä¹ ęƒÆē”ØčÆ­.
autrijus nothingmuch: er, sure, ext/DateTime-Set/t/basic.t
You probably don't want to export an operator name; instead
define a new variant on the new operator (eg. multi sub *infix:<+>):"&infix:\8745" at "blib6/lib/Set/Symbols.pm" line 17 column 1
nothingmuch oh, perl 5 does too =)
nothingmuch didn't know that =)
xinming_Beijing I ever changed it. But discard the change... :'(
autrijus xinming_Beijing: :-/
xinming_Beijing: right, I used machin etranslation 15:51
xinming_Beijing: so it's bound to have many uncommon idioms
nothingmuch wow, in that case 'on error resume next' is even dumber than I thought =)
autrijus nothingmuch: it is for High Reliability Never Stop software
nothingmuch haha! 15:52
xinming_Beijing autrijus: Ok, I will do it now...
nothingmuch 's first rule of language design has now become:
any language feature which is all or nothing is a design flaw
gaal beh, i made a silly omission in the lexprag patch 15:53
i'm pushing pragmas to the env
i should be pushing them to the exp!
i obviously need a break with some chocolate in it :) 15:54
nothingmuch tells a joke:
autrijus gaal: ^Cchocolate^C
nothingmuch sub warn (*$a) { use fatal; fail(*$@); CATCH { $*ERR.print($!); $!.resume } } 15:55
gaal %*SIG<BRK> = &chocolate
autrijus greetings miyagawa-san! 15:57
miyagawa hi!
just saw your journal on use perl and takahashi method
autrijus :D
miyagawa that's really funny to see
:)
autrijus takahashi rocks
so you read my slides?
miyagawa yeah
nothingmuch who is takahashi?
miyagawa yeah, just saw that
takahashi is Ruby hacker in Japan 15:58
nothingmuch ah
miyagawa who invented a new methodology for presentations with huge fonts
nothingmuch hehe
autrijus right... various people has used something like that
but only Takahashi has the gut to scale "1)" into 640pt
nothingmuch i imagine the slides were very effective with spoken words 15:59
nothingmuch always tries to do that with his slides/text/whatever
miyagawa yeah, Takahashi method has stolen something from Steve Jobs' presentation actually
nothingmuch making things much more dense
autrijus miyagawa: I ran into Eijiro Sumii san today 16:00
miyagawa but using "1)" is really nice and funny though
aut: hmm, who's that_
autrijus of the mincaml fame
min-caml.sourceforge.net/
he was with 2 other people from .jp -- we are the only people from asia here :)
miyagawa is it some YAML conference? 16:01
nothingmuch heh
autrijus :D
it's ICFP
miyagawa yet another meta language i maen
nothingmuch autrijus: que es min-caml? what I think it is?
autrijus nothingmuch: yes
miyagawa: it's the gathering of weirdo lambdafolks
nothingmuch min-caml is to ocaml like python is to perl? 16:02
miyagawa cool
autrijus erlang, scheme, ocaml, haskell, etc
nothingmuch autrijus: i have a question about david roundy
is he really the mega hippy he looks like in the pictures on abridgegame.net?
autrijus he looks like larry wall
20 years younger
miyagawa ha 16:03
autrijus speaks like him, moves like him
I keep resisting the impulse to call him larry
nothingmuch www.abridgegame.org/screenshots/generalprefs.png
miyagawa aut: did you make Takahashi method with MS Powerpoint? 16:04
autrijus miyagawa: OOo impress actually, with some help from ppt whilst I was downloading OOo
miyagawa my co-worker tried to make a Kwiki/Spork plugin to enable Takahashi-ism in Spork slides 16:05
autrijus miyagawa: I wish there is a software that can scale automagically for me
right, I worked on it a bit using Font::AFM
miyagawa ah, cool
autrijus but I can't get it working in the reasonable timeframe
miyagawa ;)
nothingmuch isn't a wafl block for some inline CSS enough?
autrijus nothingmuch: it's surprisingly hard to scale fonts to fit window border using CSS. 16:06
nothingmuch oh, you don't want it just big, but biggest
autrijus yes.
nothingmuch =)
perhaps javascript can help?
autrijus yes, I'm sure it could
nothingmuch no replies yet =/ 16:08
nothingmuch ponders making a warnock ratio calculator and seeing if he's the winner
autrijus nothingmuch: if you want to help with releng -- maybe changelogging? :)
nothingmuch changelogging is not a good idea, since i'm still slightly nauseous (hard to concentrate) and i'm not really in touch lately, but i would be very happy to help with janitorial work 16:09
autrijus ah ok
nothingmuch 's stomache fail()ed yesterday
autrijus you can chase away the "You probably don't want to export an operator name; instead
"
in fp.pm
nothingmuch okay
autrijus Set/Symbols.pm
*** No compatible subroutine found: "&union" 16:10
at blib6/lib/Set/Symbols.pm line 28, column 5-21
etc
nothingmuch svk pulls
autrijus nothingmuch: also 16:13
unexpected "o"
expecting ";", statements or end of input
at t/packages/reflection.t line 14, column 1
also
unexpected "{"
expecting word character, "::", ".", ":", "(", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
at t/packages/symbols.t line 16, column 9
svnbot6 r7133 | stevan++ | Perl6::MetaModel 2.0 - 16:15
r7133 | stevan++ | * instance attribute keys are now locked, this is mostly to help
r7133 | stevan++ | me out when debugging (autovivifacation makes for some ugly
r7133 | stevan++ | and hard to find bugs in the MM)
r7133 | stevan++ | - added a means of adding attributes to live objects when
r7133 | stevan++ | absolutely nessecary, but shhh I didn't tell you that ;)
nothingmuch autrijus: pugs is still compiling, soo i'm off to dinner 16:16
i'll do this stuff in ~15 mins
autrijus cool
miyagawa "Functional Programming As a Means, Not an End " 16:17
it's really cool
autrijus miyagawa: aye, I think that's a good slogan
and I learned all I can about MDA
which is a very nice way to market the FP mindset
miyagawa but I'm still wondering Pugs is "Commercial" usage of FP
MDA?
autrijus it's not -- the chair said something about "Practical" instead
miyagawa that makes more sense 16:18
autrijus www.omg.org/cots 16:19
www.cotsjournalonline.com/home/arti...?id=100297
mostly it's a way to phrase code generation / metaprogramming so that pointyhairs can understand.
miyagawa thanks. MDA reminds me of Mail Delivery Agent like procmail 16:20
autrijus :D
alright, dinner, bbiab :) & 16:22
oh also, the test in t/rules/rules.t triggers weird numbers of 16:28
*** Warning: PGE doesn't actually do :ignorecase yet.
at tmp-Prelude.pm line 197, column 24-43
the report site is not helpful (tmp-Prelude.pm) is not helpful 16:29
so I wonder if that should be disabled, or somehow limited so it occurs only once, or somehow not warn during testing, or otherwise make the user less panicked
but dinner for real. & 16:30
r0nny hoi 16:44
nothingmuch hi r0nny 16:48
autrijus: do you remember how we found out that Scalar::Util::blessed (the pure perl version) is so insane? 16:54
svnbot6 r7134 | yiyihu++ | Edit Simplified Chinese version of Apocrypha to make it more comfort for Simplified Chinese User.... 16:57
xinming_Beijing hmm, Some small bug will be fixed the day after tomorrow... hmm, Bye for now... 17:01
good night
autrijus rehi 17:34
nothingmuch rehi
autrijus nothingmuch: yeah, because we wished to find a way to test for objectness
and we didn't want to munge UNIVERSAL
so you thought S::Util may be good
nothingmuch oh, right 17:35
and then we figured out that thtat was exactly what it's doing =D
luqui: good stuff
luqui hmm
nothingmuch theory.pod
luqui ?
nothingmuch luqui++
luqui ahh, thank you
the factory/union connection has a few holes that I'm trying to work out, but other than that, I'm pretty happy with it 17:36
autrijus hey luqui
luqui hi autrijus, long time no irsee
autrijus luqui: is @Larry currently addicted by AG?
s/by/to/
luqui AG?
autrijus attributive grammars
nothingmuch autrijus: briefly what is AG?
luqui allison at least
nothingmuch like , what does it give you
autrijus luqui: oh... I thought $Larry mentioned something about it makign it part of perl6 17:37
in your journal
luqui oh yeah, the tree transform stuff
that is the hot topic
nothingmuch what is that stuff, btw?
autrijus nothingmuch: www.haskell.org/tmrwiki/WhyAttribut...marsMatter
luqui *click* 17:38
autrijus luqui: nice. I wonder what systems al and lwall worked with
I'm with a bunch of AG guys here
luqui really?
autrijus UUAG in particular
<- at ICFP
luqui ... acronyms ...
autrijus largest concentration of lambdafolks on the planet
luqui cool
autrijus (international conference of functional programming)
it's uncharted territory, and performance can be unpredictable, and it does not mix well with imperative primitives 17:39
but otherwise it's a good idea
certainly saner than importing the monad primitives to perl6. 17:40
luqui :-)
autrijus, lwall worked with perl 5; al worked with P6C 17:41
so.... they didn't
and I haven't either
so we need some docs
autrijus where did they find AG then, hmm.
luqui al's reading
autrijus sure. I'm working with UUAG
which is not actively developed but works pretty stable 17:42
implementing AG transfomer on Parrot of any efficiency is going to be an _interesting_ problem
certainly more so than PGE
oh btw, I accidentally implemented .TEMP and temp() 17:43
committing
luqui neato
nothingmuch is not understanding anything
brain is completely fizzy
luqui is a little lost too...
because I'm trying to read WhyAttributeGrammarsMatter and autrijus at the same time
autrijus luqui: more helpful may be www.cs.uu.nl/wiki/Swierstra/ResearchTalks 17:44
the 3rd one in particular
some lambdafolk remarked that "AG was advanced technology in the 80s" :D 17:45
...and somehow ignored by the rest of the world
luqui there seems to be a lot of that 17:46
like, oh, tail calls
sili i hate pdf.
luqui i hate bad music
autrijus "after a lot of research on AG, we discovered that it is possible to write compilers in AG that is _almost_ as fast as hand written compilers" 17:48
luqui lhs.length =1.0 + @tail.length -- cognitive dissonance :-)
autrijus "therefore compiler writers ignored AG, because it's not fast enough"
"and therefore other people ignored AG, thinking it's only for compiler writers"
svnbot6 r7135 | autrijus++ | * proper temp() support even for nonlocal exits; also supports .TEMP as per s06
luqui are there any AG thingies on CPAN? 17:49
sili what's ag? 17:50
autrijus CPAN, being what CPAN is, no. :)
although the idea has been resurfacing with the term "aspect-oriented programming"
luqui "being what CPAN is?"
what is CPAN 17:51
autrijus comprehensive perl archive network :)
integral but without the comprehensive bit?
autrijus (referring to the fact that AG didn't have anything to do with perl prior to this point)
wolverian AG looks like a really hard to read version of CSS 17:52
luqui okay, fair enough
autrijus wolverian: except you can't embed closures in CSS 17:53
and CSS attributes can't propagate upwards
so you are limited to one-pass downward propagation
luqui from what I can tell, AG is tightly coupled to being lazy
this... is not a good sign
integral what is "being lazy"? 17:54
autrijus yes, it's a lazy oasis within a normally imperative setting
or "declarative", so to speak
sili declarative++
luqui wonders how much laziness Perl can get away with without people noticing it is lazy 17:55
and if it turns out to be a lot, parrot is screwed 17:56
that or it just isn't good at the parts of the language that are lazy ("good" read "fast"), but still works 17:57
integral luqui: I don't quite understand why parrot would be screwed?
autrijus notes that UUAG is in Artistic License, curiously 17:58
luqui integral, it's just not set up to handle millions of little teeny closures
autrijus luqui: a CPS VM is at an advantage to model laziness
luqui yeah, I suppose
integral luqui: really? hrm. ok, I thought it would be
luqui but function calling has been designed too heaviweight
but then a lot of parrot has changed behind my back 17:59
because I haven't been looking for over a year
so don't listen to me
integral but aren't you calling functions everywhere anyway with PMCs?
autrijus that would be C level vtable function though
luqui is giving an all-day opengl tutorial 18:03
autrijus nice
luqui will read up on AGs definitely
thanks for the seed :-)
adios
autrijus np. :) I also ran into crazy scheme folks today
one of which incidentally had a nice algorithm for making runtime "where {...}" constraints more efficient to implement 18:04
autrijus goes back to chase testfails... 18:08
too bad the hotel room here does not have wireless, it's only in the lobby
so I may randomly drop off soon and go back for electricity :) 18:09
18:14 DesreveR is now known as r0nny
gaal nothingmuch: "making up these subjects is fun": www.livejournal.com/~gaal/89779.html 18:15
(more at www.livejournal.com/~gaal/90197.html) 18:16
autrijus nifty 18:17
nothingmuch gayes, i remember.. that's good stuff! 18:19
nothingmuch wonders how the hell "gayes" came out of gaal 18:21
oh... ga<tab>yes
gaal: yes, I remember... that's good stuff! 18:23
sili is anyone working on p6 documentation?
autrijus sili: yes, see docs/quickref/ and other docs/ in the pugs tree 18:26
bbl & 18:28
sili ah, this is perfect 18:33
nothingmuch UGH! not with the interpolation again! 18:34
nothingmuch cries
sili what is defaul{} used for? 18:35
oh i see. 18:37
i take it back. i don't get it 18:41
given/when/default :(
gaal just for clarity. 18:43
sili how do you use them?
gaal see L<S04/"Switch statements"> 18:44
sili thanks.
now i get it.
gaal "The default case [...] is exactly equivalent to when true {...}"
xinming_Beijing ?eval 3 ?? 1 :: 0; 18:55
??, pugs bot is gone? :-S 18:56
sili looks like 18:57
xinming_Beijing hmm, It seems, that the Synopsis is a bit outdated because of the ?? !! operator... :-) 18:59
sili bad info is worse than no info :| 19:01
xinming_Beijing :-S Language syntax changed a bit in these days... :'( I think I have to review to see how much changes has been made... 19:04
gaal punts on lexical pragmas for tonight
see ya :) zzzzZZZ &
meppl is it possible to use perl5-modules momentaneous? 20:04
pugs says "pugs_bin: *** perl5 is not available" 20:05
Khisanth did you compile pugs with perl5 embedded? 20:08
meppl oh 20:16
no
thx
svnbot6 r7136 | putter++ | docs/quickref/namespace: mention it is out of date. 20:22
r7137 | putter++ | crude_repl.pl: rename to pugs-p5.pl 20:33
putter gaal: could you add a PUGS_EXECUTABLE environment variable to Main.hs, pointing to the pugs executable, so the backend helpers can reliably find their way back to the pugs which called them? thanks. 20:44
svnbot6 r7138 | putter++ | PIL/Run/EvalX.pm: To find a pugs to run, use a --pugs=xxx argument, or a PUGS_EXECUTABLE environment variable, or depend on finding 'pugs' in PATH. 21:09
r7139 | putter++ | src/Main.hs: pass backends all arguments, not just some. -I again works. 22:04
r7140 | putter++ | pugs-p5.pl: delay PIL-Run startup until runtime (instead of compile-time), so --pugs gets set in time. 22:46
putter gaal: ok, so Main.hs could define a --pugs instead of, or in addition to, PUGS_EXECUTABLE. The later is nice because it doesnt require backend perl "runtime" processing. But a quick and superficial search suggests ghc doesn't have a portable (ie, non Posix) setenv. 22:47
svnbot6 r7141 | putter++ | runjs.pl: Kludge to tolerate -B JS argument. Now runs with the new unwrapped pugs. But jspugs.pl still doesn't. 23:22
putter iblech: ./pugs the script was avoiding sending the backends the -B js argument. The "unwrapped" haskell pugs doesn't. And perhaps can't easily. So runjs has to tolerate a -B. So I kludged it. But jspugs, aka './pugs -B js', is still broken. It's probably easier to hack runjs, than to make Main.hs and Run/Args.hs smarter. They're rather narrowly targeted at pugs's own needs. 23:25
Though perhaps we could do our own "run"-like parsing in Main.hs, before handing off to 'run' if it's not a backend task. But it's probably easier in perl than haskell. 23:27
gaal: runjs already supports --pugs, so perhaps that's worth doing first. 23:29
fglock: the only remaining pilrun regression from the ./pugs unwrapping should be "make test-perl5". Everything else should be working again. Please ping me if something else turns up. I'll try to look into make test early this week. Smoke works. 23:48
After that, perhaps a bit of code dusting, and then maybe switch to mm2? Unless that's done already? :) 23:49