pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | <stevan> Moose... it's the new Camel ":P | .pmc == PPI source filters!
Set by Alias_ on 16 March 2006.
00:07 cognominal joined 00:16 qmole joined 00:34 rootch1 joined
rootch1 is there a way to list all methods and attributes of a object... 00:34
f.e. @ary.supportedMethods 00:35
i.e. doing some sort of introspection/reflection, whatever ;) 00:36
00:37 mako132_ joined
aufrank rootch1: there are methods available under $foo.meta.* for introspection 00:38
but which ones are there is unspecced right now, I think
but I think there will be something like $foo.meta.methods 00:39
rootch1 print @ary.meta.methods; 00:40
*** No such method in class Any: "&methods"
at ./test.p6 line 31, column 7-24
00:47 justatheory joined 00:53 hexmode joined
aufrank rootch1: I think that this .meta stuff is mostly unspecced (they haven't decided what methods are going to be exposed) and mostly unimplemented 01:34
but /me could be wrong 01:35
rootch1 i see 01:36
hmm..
'cause it is hard to know what is implemented and what not..
if i'm able to print these stuff 01:37
can be sure what is supported
aufrank this is the right place to be asking 01:39
it's just kind of dead in here right now
still, if you ask about a particular aspect of the language, someone here migvht be able to answer 01:40
02:54 Kattana joined 03:03 frederico joined, Quell joined 03:05 coumbes_ joined 03:21 rbysamppi joined 03:22 weinig|away is now known as weinig|sleep
rbysamppi Hello and kudos to all Pugs hackers! I would like to contribute by trying to fix the currently woeful state of the Perl 6 tutorials in docs/Perl6/Tutorial. How can I get a commit bit or something? 03:26
obra rbysamppi: what's your email address? 03:30
rbysamppi It's [email@hidden.address]
obra Commit bit invitation in your inbox 03:31
rbysamppi 'k, thanks.
obra be sure to add yourself to the AUTHORS file 03:33
rbysamppi Even before I've done anything? 03:34
obra It's a great first commit. A good way to test the process 03:39
and a good way to make you feel guilty enough to commit ;)
rbysamppi ...I see.
Forgive me, but this is the first time I've ever contributed to any project like this or anything. Er...how do I do things? 03:40
Like, I'm looking around rt.openfoundry.org/Foundry/Project/?Queue=270, but no luck.
obra Ah. Ok. Asking for a commit bit implied a level of familiarity. ;) 03:41
so. do you know subversion at all?
rbysamppi No, I'm afraid not. :(
My credentials are...
obra ok. what platform are you on?
rbysamppi ...paying attention to p6lang for a year, and #perl6 for a week. :(
I'm on Ubuntu.
obra ok. cd ~ ; mkdir pugs-src;cd pugs-src svn co svn.openfoundry.org/pugs/ 03:43
that will get you a working directory
rbysamppi 'k, thanks. :)
obra to commit your changes: svn commit filename filename2
to update from the repo: svn up
PerlJam rbysamppi: read the svn book too (svnbook.red-bean.com/) 03:44
rbysamppi: and welcome! :)
rbysamppi Thanks. I'll look at it. :)
03:51 frederico joined
svnbot6 r10143 | audreyt++ | * Pugs.cabal.in: Fix the buildsystem so it again builds on 6.4.2. 04:06
r10144 | audreyt++ | * unTODO passing tests. 04:10
r10145 | audreyt++ | * build_pugs.pl: more Cabal fixes.
r10146 | audreyt++ | * Parser.Literal: Per dconway++'s suggestion, retract the
r10146 | audreyt++ | $foo. :bar()
r10146 | audreyt++ | form, allowing only
r10146 | audreyt++ | $foo.:bar()
r10146 | audreyt++ | at this moment.
aufrank audreyt: I'm building ghc-6.4.2. I'll let you know if pugs builds once ghc is updated 04:11
(regarding my build error pasted in earlier) 04:12
also, good morning!
audreyt thanks :) 04:14
and good localtime too!
aufrank: 10148 should make both 6.4.1 and 6.4.2 udilable 04:15
er, buildable
aufrank where did you look to fix it? I looked in build-pugs.pl but I couldn't tell what needed doing
audreyt it turns out that the two Cabal versions shipped in .1 and .2 is not compatible 04:16
so I did ./Setup build --verbose
copied the actual cmdline arguments
04:17 Alias_ joined
aufrank gotcha 04:17
thanks :)
audreyt np :)
Alias_ audreyt: Ping?
oh, good
aufrank did clkao go after the rules for signatures yet?
audreyt no. want to take a stab? 04:18
Alias_ audreyt: Do you remember that problem I found with your signatures file? Can you recall what the particular problem was?
audreyt Alias_: CRLF I guess?
Alias_ audreyt: Was it mixed carriage returns of something?
s/of/or/
aufrank if you'll remind me which Syn to read and point me at an example I can sort of work from :)
audreyt Alias_: yeah 04:19
Alias_ goodo
audreyt aufrank: woot
Alias_ I just hit the same problem I think, this time with Digest::SHA of all things :) 04:20
audreyt S06
aufrank: as for example... look for indented parts in S06 :) 04:21
t/subroutines/sub_named_params.t etc 04:22
and other .t
a sec, I'll brb
aufrank reads S06 again 04:27
Alias_ audreyt: One last thing. Vanilla build 3 is very nearly usable at this point, and now Module::Build 0.28 is out, I think we're just down to the Term::Readline::Perl four-enters bug, and Module::Signature, as blockers for Strawberry build 1. 04:32
04:33 shachaf joined
Alias_ audreyt: Once Ilya gets his bug fixed, if we're still having troubles with Mod-Sig, do you think you might be able to help us get a new version out the door? 04:33
audreyt sure!
Alias_ Nobody really seems confident how to attack it
aufrank hate to butt in, but what is strawberry a build of? 04:34
</pry>
=P
Alias_ aufrank: Strawberry is Perl 5.8.8 built with MinGW and dmake, with BOTH bundled, and additionally has the main Bundle::CPAN and change bundled
aufrank man, that sounds great 04:35
Alias_ Vanilla is the same, but an experimental build that's as close to the core as we can get it without it being complely unworkable
aufrank there are a couple of windows boxes I've got to use at work, and I've got mingw on there anyway. It'd be really nice to have a good perl in that environment.
Alias_ It's getting there
Hang on a second
camelpack.sourceforge.net/index.php/VanillaPerl 04:36
That describes Vanilla, and links to Strawberry
04:37 aufrank left
Alias_ wow, he had a bad reaction to Vanilla 04:37
Must be allergic
04:37 aufrank joined
aufrank whoops, back 04:37
rootch1 i asked before , but nobody was here...so if i can ask again : is there a way to list all methods and attributes of a object...f.e. @ary.supportedMethods ii.e. doing some sort of introspection/reflection, whatever 04:47
aufrank rootch1: hey, be nice. I was here, I just wasn't useful. ;) 04:48
rootch1 ;) yeah sorry
aufrank audreyt will be back soon and is probably the best person to talk to
rootch1 i see, k
aufrank I should warn you, though, that you will probably be invited to implement whatever features you wish were already included ;)
rootch1 if i can...;) 04:49
i'm looking at the /lib/perl6 directories
audreyt hihi
rootch1 there seems to be similar methods in several modules, but !! 04:50
aufrank audreyt: rootch1 wants my @methods = $foo.meta.methods
rootch1 can figure out how are used
audreyt rootch1: it's tested for in t/oo/meta_class.t
at this moment, the .getmethods (and .signature for the objects they return) is not yet defined 04:51
primarily because we have not yet converted builtin functions into methods in builtin classes
and as such things like .int and .defined is not listed in the method table
rootch1 i see 04:52
audreyt please see t/oo/meta_class.t (and other t/oo/*) for the eventual syntax
aufrank audreyt: if an object is of a class that does multiple roles, can the get methods return a @;array with a different dim for each role the class does?
audreyt aufrank: I don't think so; when a role becomes mixed-in, they behave asif they are defined in the class
at least as currently specced
what's the use case of this? 04:53
instead of iterating thru .meta.roles
aufrank you'd probably want a hash more than an multidim array, anyway
audreyt and query them normally
aufrank I forgot that roles were exposed through .meta
my non-problem stands solved
audreyt: I'm not sure if this suggestion makes sense either, but it seems like $foo.meta.roles.methods could return a Match object 04:55
with each role as a key
avar audreyt: your voice is odd;) (on the interview on the blog) 04:56
Alias_ she vocoded it I believe :) 04:59
avar What's vocoding?
Alias_ software voice modification
or rather, artificial voice modification
avar why? 05:00
Alias_ leaves that to audreyt to answer :)
rootch1 i'm tring this : 05:01
class xxx { method brrr { 1 } } 05:02
print xxx.meta.getmethods();
*** No such method in class Any: "&getmethods"
at ./test.p6 line 33, column 7-28
and in the t/meta_class.t
audreyt avar: I left a comment at perlcast.com; read it :)
rootch1: yes, that test is eval'ed, which means it's not yet implemented
rootch1 it is the same 05:03
aha, i see
now i saw ;)
:todo<feature>
sorry
avar audreyt: Interesting 05:04
05:09 ayrnieu joined
aufrank is there a conceptual connection between prefix<*> to make a sub global, and prefix<*> to put something into the current capture? 05:09
azuroth I don't believe so 05:13
rootch1 i think saw somewhere tutorial for using Test.pm for Perl6, but cant remember ? can u point me to it if there is such ? 05:14
avar rootch1: use Test::More 05:15
audreyt aufrank: no, there is none...
bbiab
avar arg, perl 6..;)
Alias_ avar: yeah...
avar: I have the whole "Test.pm is old and bad" stuck in my head too
rootch1 is the Test.pm for perl5 the same ? 05:16
avar Isn't it?
Yeah, I guess
I always use Test::More
Alias_ Test.pm is indeed old and bad
But it does produce TAP, so it works still
avar Test::More gives you lots of stuff, like recursively comparing datastructures and displaying diffs
Alias_ And test comments :) 05:17
Which Test.pm doesn't really have
rootch1 so I should look Test::More
Alias_ in Perl 5 Test::More is THE testing module of the moment
Everything pretty much uses it
rootch1 ok.. that is enougth thanx 05:18
avar Test::More should be called Test
rootch1 i will look ati it
at it
Alias_ avar: Dunno, it reinforces the testing thing
avar: "Test More! MORE!!!!"
avar Alias_: arg!!!!
Alias_ In fact, Test::More::More::MORE :)
05:26 aufrank left 05:33 macroron joined
rootch1 here is how to see most of the unimplemented features, run inside the test directory 05:56
grep -r 'todo<feature>' * | perl -ne 'm!^(.+?/(.+?:))?.+["''](.+?)["''],.+?:todo<feature>!; print "$2 $3\n" if $2 || $3' | less
;) 05:57
if i try to assign a value when creating the class attribute, it doesnt seem to work, is that correct ? ex : has $.blah = 55; 06:05
or it is by design
06:05 Quell joined
audreyt it's not by design, it's another bug. 06:11
(it should be specifying a "default value" for instances)
workaround: write
submethod BUILD ($.blah = 55) {}
Alias_ audreyt: Do long dots work in the current pugs build?
audreyt Alias_: sure 06:12
Alias_ audreyt: I heard about it from nothingmuch and I just had to come witness the horror
06:12 SamB joined
Alias_ Any word if it's going to stick? 06:12
audreyt ?eval 100. .sqrt 06:13
Alias_ oops
audreyt restarting it 06:14
06:28 zardiz joined
rootch1 when writing the new() method..is it required to return $self like this : 06:29
method new($self: $blah) { ...do something ...; $self }
or there is shortcut
audreyt you don't usually write "new" 06:30
just write "BUILD"
new just calls BUILD 06:31
Alias_ whimpers
audreyt: How hard is dealing with the BUILD-type stuff in complex dep structures. Are you finding it scales ?
audreyt sure 06:32
because you can freely call to "next in dispatch chain" and back
we discussed this in australia :)
Alias_ I know, and I'm still nervous
Although more about learnability now than actually-working
audreyt nodnod.
rootch1 hmm..cute...I made BUILD($fileName){..} 06:33
then it told me that .new allows only named arguments
and i done myclass.new(fileName => 'bruum.txt') 06:34
and it worked
audreyt cool
the default for "new" is to be named-only
and for good reason, namely uncoordinated subclassing
rootch1 and if i want to name
the argument some other way ? how do i do it? 06:35
but the var is still $fileName
06:35 aufrank joined, bsb joined
audreyt BUILD (:file($fileName)) {..} # but unimplemented 06:36
this allows passing in as .new(file=>'moose')
but goes into $fileName
rootch1 i see, 10x 06:37
aufrank audreyt: in S06, in the quicksort example, the ?$foo form is used 06:38
is that still valid?
audreyt thanks, committed. 06:39
(as in, no, it's invalid, I fixed S06)
aufrank yeah, I followed :)
it should be $foo? #? 06:40
audreyt yup
brb
06:42 evalbot_10153 joined
audreyt ?eval 100. .sqrt 06:42
evalbot_10153 10.0
audreyt ?eval 100. #(Your Advertisement here) .sqrt
evalbot_10153 10.0
ayrnieu ?eval 100. #(EAT AT JOES) .sqrt
evalbot_10153 10.0
aufrank ooh! 06:43
ayrnieu is that an 'ooh!' for Joe's? 06:45
aufrank $foo.#{TT says this looks like a null method call}.hrm 06:46
ayrnieu: yeah, I'm supposed to meet some people at a diner tomorrow morning and I had forgotten 06:48
you reminded me
ayrnieu that's all the thanks that subliminal advertising ever wanted :-( 06:49
aufrank I try to be grateful
Alias_ I find C< 100. #(EAT AT JOES) .sqrt > rather scary 06:50
audreyt Alias_: it's not special to long-dot; it's just general inline-comments 06:52
counting as whitespace
Alias_ audreyt: oh, I know. But the fact that long dots make that sort of thing even possible is the scary bit
audreyt ?eval 1 #(that's one) + 2 #(that's two)
evalbot_10153 3
audreyt well, point taken, but I for one like inline comments :)
Alias_ ditto 06:53
I think it's more that long dot makes my spidey sense go crazy
audreyt yeah. it does to everyone
but I guess it is the least horrible choice
Alias_ Does it have a point>? 06:54
or purpose?
audreyt sure.
the point is that
foo .bar
can mean foo($_.bar) or foo.bar
and we probably always want it to mean the first
foo. bar
is visually nonappealing to me
Alias_ Then move it closer :) 06:55
audreyt and makes line-continuation nonobvious
06:55 drrho joined
audreyt no, the point is to translate this perl 06:55
5
$foo->moose
->blah
->bleh
into perl6
and currently the way to do it is
$foo.moose.
.blah.
.bleh 06:56
which, at least to me, reads better than
$foo.moose.
blah.
bleh
lunch, bbiab
Alias_ it does?
I agree the latter sucks, but the formers almost worse
audreyt (to me, yeah.)
Alias_ Because it's also messy and distracting 06:57
Try staring at it and working out where the missing . is
:)
you need \ or something 06:58
$foo.moose
\blah
or even pipe
$foo.moose
|blah
|bleh
But I'd be willing to bet people have looked for those already
rootch1 i cant figure out how to use p6 regexes : 07:07
"abc" ~~ m/^(a)/;
$1.say;
gives me 07:08
*** Cannot parse PGE: ^(a)
*** Error: does not exist
pugs 6.2.11 07:09
azuroth ?eval "abc" ~~ m/^a/; 07:10
evalbot_10153 *** Cannot parse PGE: ^a *** Error: Cannot find the parrot executable in PATH Match.new( ok => bool::false, from => 0, to => 0, str => "", sub_pos => (), sub_named => {} )
azuroth ?eval "abc" ~~ m:p5/^a/; 07:11
evalbot_10153 *** Cannot parse PGE: ^a *** Error: Cannot find the parrot executable in PATH Match.new( ok => bool::false, from => 0, to => 0, str => "", sub_pos => (), sub_named => {} )
rootch1 or whatever regex...just wanted to start tring 07:12
"abc" ~~ m:p5/^a/; <----- m:P5 07:14
ayrnieu threading $foo { .moose; .blah; .bleh }
rootch1 does this mean that still only P5 regex are supported ?!
azuroth ?eval "abc" ~~ m:rx5/^a/;
evalbot_10153 *** Cannot parse PGE: ^a *** Error: Cannot find the parrot executable in PATH Match.new( ok => bool::false, from => 0, to => 0, str => "", sub_pos => (), sub_named => {} )
azuroth both are supported 07:15
07:15 elmex joined
azuroth but for p6 regexes pugs just uses PGE, as far as I know 07:15
?eval "abc" ~~ m:perl5/^a/; 07:17
evalbot_10153 Match.new( ok => bool::true, from => 0, to => 1, str => "a", sub_pos => (), sub_named => {} )
07:27 macroron joined
aufrank sleep 18000 & 07:45
audreyt yay, smoke now takes less than one hour here 07:46
Alias_ :) 07:47
Alias_ finishes auditing Bundle::CPAN, damn there's some crusty old code
audreyt praises Alias_ for keeping the CPAN torch burning bright 07:48
Alias_ It's more the Strawberry Perl light
I really really really want to FINALLY be able to run PPI on my own desktop
BTW, how in place is 6PAN?
I wanted to sit down at YAPC::NA with whatever you have and go through it in depth 07:49
audreyt yes
let's do that.
you going to be @ hackathon?
Alias_ FSVO you
yep
audreyt k
Alias_ I've put aside the days
And I'm hoping to deal with PITA smoke stuff there
I figure it's probably the best time for it
Get the PITA::Scheme modules out the way 07:50
audreyt how's OOO.ooo going? 07:51
Alias_ Well, it would appear that nobody on the planet can package a Java servlet 07:52
So stally
But I've had an email from the State of Mass.
And the NSW Roads and Traffic Authority has a guy working on it full time for a little while
(the packaging)
So hopefully it will move forward a bit more 07:53
frustrating
Server written in such a short time, and stalled just on installation
Elaine's Law kicks my ass again
aufrank audreyt: if you pull now, do you get my changes to t/subroutines/sub_named_params.t ? 07:54
Alias_ But then it's not like I don't have enough things to fill my time when another project is blocking on some task :)
aufrank doubts his svk-foo 07:55
svk-fu, even
audreyt sure, got it
aufrank phew
it's no big deal-type stuff, but I can definitely add some more tests tomorrow, and will probably go after rules for parsing Signatures 07:57
audreyt yay
maybe that will become the first part of Pugs.Parser to be rule-driven
aufrank something to shoot for :) 07:58
but sleep for real now :)
hey, I aligned that without even using a long dot!
audreyt lol 07:59
08:00 ghenry joined
aufrank ---------------------> & 08:00
audreyt g'nite, seeya tomorrow :)
xinming error reading ./.setup-config; run "setup configure" command?
Build failed: 256 at util/build_pugs.pl line 96.
make: *** [pugs] Error 2
???
audreyt xinming: this is "Makefile.PL"? 08:01
xinming what I get while trying to rebuild pugs,
audreyt try "perl Makefile.PL" first
xinming audreyt: No, in after `perl Makefile.PL.
audreyt: I tried
audreyt nopaste the whole log? 08:02
xinming audreyt: I'll try that now, bbl 08:04
lisppaste3:
lisppaste3: url
lisppaste3 To use the lisppaste bot, visit paste.lisp.org/new/perl6 and enter your paste.
xinming audreyt: by the way, I can't compile it even on feather... 08:05
audreyt weird, as I did compile it on feather 08:06
same error?
what if you rm -rf dist and third-party/fps/dist/ ?
xinming audreyt: hold on please 08:07
08:11 Aankhen`` joined
lisppaste3 xinming pasted "Error even after doing `rm -rf dist; third-party/fps/dist`" at paste.lisp.org/display/19532 08:12
xinming audreyt: hmm, I tried. :-) 08:13
audreyt: In fact, you can checkout a fresh-copy and try to compile on feather. 08:14
audreyt ok 08:15
Alias_ audreyt: Can I bounce an idea off you? (so I can stop pondering it mostly) 08:16
audreyt try again
xinming: sorry I forgot to commit the fix
Alias_ audreyt: What do you think would be the likelyhood of being able to reasonably require SQLite as a 6CPAN::Client dependency
xinming audreyt: It's ok, I think you forgot to "push" :-P 08:17
audreyt :p
Alias_: I think it makes a lot of sense as a local cache.
I further think it's the sane thing to do in today's environment.
however, it should be reconstructable from plain text files
Alias_ I imagine so
audreyt that is, it may replace the "Metadata" Storable
but not the .gz files 08:18
Alias_ The JSAN approach was to have both
Some sort of YAML thing, and a downloadable SQLite index
I dunno about YAML for the index though :/
xinming audreyt: It's going fine now.
audreyt++
audreyt woot. 08:19
Alias_: I think the JSON subset of YAML is just fine.
xinming audreyt: what's the date today? 29 or 30?
audreyt 30 08:20
Alias_ audreyt: After bad experiences on JSAN I'm still not convinced, but probably could be
xinming thx
audreyt ?eval localtime().day
Alias_: if you require SQLite, it's not a problem to require Syck. 08:21
08:21 evalbot_10153 is now known as evalbot_10156
evalbot_10156 \30 08:21
Alias_ audreyt: That might be the best
Whatever it is we use, the days of holding the entire dataset in memory have to dissapear
audreyt yes, amen.
Alias_ It's a pity a direct port of the JSAN client would be too heavy though 08:22
A combination of LWP, SQLite, Class::DBI and Algorithm::Dependency
audreyt I think Class::DBI is not neccessarily good.
if we dependon SQLite for cache 08:23
we can just use views.
(and triggers.)
which is very sane
Alias_ point
what CDBI did very well though was allow dependencies to be integrated in 08:24
Although I guess since P6 will have the same code-based installer that won't work so well
(static dependencies)++
Anyways, just wanted to test the waters
Alias_ moves on
nothingmuch btw 08:25
the port of Algorithm::Dependency should really use roles and stuff
if at all
(i prefer duck typing, hence my own version)
Alias_ Oh, Alg:Dep needs to die
I actually have a better design in my head
well, half of it
nothingmuch it was easier to copy the logic than to write all the base classes =)
audreyt the design is in the right half of your head? 08:26
Alias_ audreyt: Possibly
nothingmuch reminds Alias_ of Algorithm::Dependency::Objects
Alias_ That's not good enough either
audreyt bbiab...
Alias_ It solves an API problem, but not the main algorithmic problem
08:26 kakos joined
nothingmuch what is the algorithm problem? 08:26
Alias_ Sometimes you have all the data in memory 08:27
Sometimes the data is too big to load into memory
nothingmuch oi vey
i see where you're going
;-)
Alias_ Sometimes you don't know much about the graph
Sometimes the graph is unknowable
Sometimes the graph is computational :/
It's analageous to Isotope's event-based vs discrete 08:28
You need to think graphy
nothingmuch i suggest Algorithm::Dependency and Algorithm::Dependency::Graph::Iterative
or just ::Heavy
Alias_ Well, it's like to be Algorithm::Graph
nothingmuch adj set graphs, I assume? 08:29
Alias_ Which will represent what is currently AlgDep::Source
adj set ?
nothingmuch where each node contains the other nodes it has an edge to
classical lazy representation of graphs
Alias_ Where graph is a sort of graph not represented in mathematics
(that I know of) 08:30
nothingmuch imagine a table
and a link table on itself
Alias_ yes, vaguely
nothingmuch the link table is directed (or undirected) edges
the table is vertexes 08:31
the "other" way to do graphs is a set of vertexes and a set of graphs
they can be stored the same
Alias_ Except an Alg:Graph needs to be aware of it's knowability
nothingmuch but they're queried differently
Alias_ Which is an altogether different issue
nothingmuch i suggest you look at the haskell stuff
Alias_ It's needs to be an engineering-friendly graph
nothingmuch by being lazy it inherently leaves this very very open
Alias_ yes
I agree
nothingmuch the resolved dep list and the dep roots must fit into ram, though 08:32
right?
and then you run the ordering in memory?
Alias_ But there's other issues, like vertex metadata extensibility, and the ability to wrap an alg-graph around other types of graph
yes
nothingmuch ducktyping
$object
rootch1 does \G modifier works on m:P5 regex'es
nothingmuch @whatever $object->depends; 08:33
add an assignment there
Alias_ Well, if it's P6, multi-methods
nothingmuch keep a collection
it can do whatever it wants - ORM like on disk
or totally in memory
Alias_ right
nothingmuch as long as they have a map function
Alias_ But somehow aware enough
And it's THAT that's the tricky bit 08:34
nothingmuch FYI, Alg::Dependency::Objects does exactly that for those reasons =)
aware enough?
Alias_ scaling the awareness
Knowing graph scalar, edge costs etc
err scale
nothingmuch edge costs?
you don't get choices in a dep graph
or you mean, what you want to walk first?
08:34 bernhard joined
Alias_ You can't always assume the cost of an edge is free 08:34
in the ORM case for example 08:35
nothingmuch you'll have to walk the edge anyway, even if you reach the same point
Alias_ So perhaps an alg cares
Anyways, it's a problem space I need to sit down and deal with at some point
nothingmuch i don't see how a dep algtorithm can benefit frmo edge cost meta data
without control flow
(depends on this *OR* that)
but then it's still the job of the provider 08:36
Alias_ Well, imagine you have a small, cheap graph
nothingmuch $obj->depends returns a boolean expression
Alias_ You just rewalk everything
nothingmuch with left preference
instead of a list
Alias_ On an large expensive graph, maybe you cache
nothingmuch i don't see why ^H
Alias_ Where it's pointless duplication on a cheap graph
nothingmuch you have to walk it all anyway
Alias_ Imagine every edge was a SQL call
nothingmuch that's the job for the ORM
if ->depends map to an ORM 08:37
it's it's concern to have a cache plugin
if it maps to a generative graph
Alias_ In the dep algorithm, you want the edges a few times
Anyways, I'll do it at some point
nothingmuch assume it's cached with a cheap graph
and simply add that caching on the lower level as necessary
Alias_ What if the cheap graph IS a cache
nothingmuch i think you're overengineering
Alias_ nothingmuch: If I was writing Alg:Dep again, I'd agree 08:38
With the number of additional use cases that appeared continue to amaze me
nothingmuch nevertheless, it's still a ccross cutting concern
Alias_ And I look a Graph.pm, which is a graph sure but doesn't deal with knowability, and I want more
nothingmuch caching is not part of dependency computation
so layer a caching layer
with the same api as Graph
over it
that overrides ->find_adjacent_nodes with a caching version under the hood 08:39
Alias_ Anyways...
nothingmuch and keeps a $whatever_policy_cache in memory over the conjectural full graph, which is lazily loaded
Alias_ Bascially, that it's not just deps in the way AlgDep is 08:40
There's a larger problem there, and there's a very novel and cool solution, and I want _that_
I just don't see the specifics yet
nothingmuch what's the larger problem?
Alias_ graph algorithms
in general
on lazy/expensive graphs
nothingmuch most are np complete
Alias_ I know 08:41
That's fine
nothingmuch i don't think there is much essence to capture
08:41 dakkar joined
nothingmuch there is the algorithm 08:41
and there is the graph
Alias_ right
nothingmuch trhe algorithm will always want all walking to be cheap
the *right* cache will try to make the expensive graph as cheap as possible
as a middle tier
Alias_ which algorithm, just the dep one? 08:42
nothingmuch as long as there is no branching logic in the dep algorithm
in which case the walking is completely different
Alias_ There's other families and variants of a straight ordered or unorder dep
nothingmuch since some areas might be walked
instead of others
Alias_ Which is what I want
nothingmuch aha
i asked earlier
you didn't specify =)
Alias_ sorry
nothingmuch in that case, the data structure returned from the node 08:43
Alias_ Dep isn't a single thing anyway
nothingmuch is not a simple graph
Alias_ And I solved it wrong
Anyways, I want a do-over
nothingmuch instead of returning the list of adjacent nodes
Alias_ For the problem space I didn't realise I was solving the first time
nothingmuch it returns the a logical expression
(theoretically the graph nodes can be of mixed types, nodes, and operators)
Alias_ We're arguing over something that doesn't exist
nothingmuch i was just getting to that: 08:44
Alias_ Let;s take this up again when I at least have an API
nothingmuch i think what you want at this point is Prolog
Alias_ heh
probably
But then I note I've never seen my dep algorithm in books or logic things
And it's conveniently light and simple
While still working 08:45
nothingmuch dep is a linear walk... there is no way to get it faster by changing the order
the moment control logic is introduced
and you get short circuiting
Alias_ I should have shut up
:)
nothingmuch then it's no longer a dep algorithm but a program evalutor =)
Alias_ Wait till I have something... or make something and I'll point out the cases you are missing
nothingmuch i think in perl 6 ideally you would abuse the regex/rule runtime for this 08:46
Alias_ why of course! 08:47
:)
I dislike abuse
nothingmuch (assuming it's guts have a nice perl-ish interface it's not abuse)
Alias_ You only get to do it once
And it tends to blow up in Perl 5
nothingmuch essentially the rule evaluator is simple pattern
that works like prolog
there have many discussions 08:48
we won't go into it
Alias_ indeed
nothingmuch i'm assuming perl 6 will have internals that are more programmatically accessible
since the compiler will be in Perl 6 it's only reasonable ;-)
anyway, the difference in the problem domain is that you don't know the extent of the full program you are matching
the full "pattern" if you will
rootch1 i see that $str.length doesnt work, is there other way to get the string length ??
nothingmuch ?eval "foo".length 08:49
08:49 evalbot_10156 is now known as evalbot_10157
evalbot_10157 Error: No such method in class Str: "&length" 08:49
nothingmuch oh right
.chars
?eval "foo".chars
Alias_ nothingmuch: And I have some very wonderful operatores to play with
evalbot_10157 3
rootch1 thanx
Alias_ operators
nothingmuch Alias_: all you really need is NAND
;-)
Alias_ But OH the abstraction layers
nothingmuch if you write an optimizer for lazily evaluated logic trees 08:50
then make it cool enough that it can be reused for junction optimization
Alias_ And then compile from English
nothingmuch not that I see any way to do it generically 08:51
Alias_ nothingmuch: And by the time I'm done, I've got Oracle
nothingmuch without having knowlege about the desired target
yes
oh
not Oracle the database
Alias_ yes
nothingmuch Oracle the theoretical machine
right?
Alias_ No, Oracle the database
nothingmuch oh
no, i don't like that =)
Alias_ Alg:Dep is 800meg and implements it's own filesystem format 08:52
nothingmuch see, that's confusing low level details where they shouldn't go
what you *REALLY* need is this:
en.wikipedia.org/wiki/Oracle_machine
as soon as you implement it Perl 6 will be the fastest language ever
Alias_ You're the one that want's to use Alg:Dep to optimize junctions
nothingmuch there's no fundamental difference
Alias_ sure
nothingmuch junctions have an optimizability in folding boolean operators early 08:53
Alias_ Except one is flexible, and in Perl, and made to be useful
nothingmuch and eliminating subtrees
Alias_ And the other one is fast
nothingmuch this is exactly the same problem you have
Alias_ Except I'm willing to pay a lot of CPU for a lot of flexibility
nothingmuch uh 08:54
there's no contradiction
Alias_ SHUT IT
WE TALK AGAIN WHEN THERE'S CODE
nothingmuch suit yourself =)
you're choosing to ignore years of knowlege that have already been accumilated by some of the smartest brains in the industry
Alias_ That never got around to actually writing Alg:Dep 08:55
nothingmuch what you want is not alg dep, we already talked about that
Alias_ I know
But I still want something workable, and not an ueber-generalised thing
08:56 rootch1 left
Alias_ And it's my call where I define "workable" to be :) 08:56
And now, enough
08:56 Alias_ left
nothingmuch hahaha 08:56
08:57 gaal_ joined
nothingmuch hola gaal_san 08:57
08:59 Alias_ joined
nothingmuch so as I was saying 08:59
Alias_ And furthermore, I'm not IGNORING them, I'm absorbing their knowledge lazily
I read fundamentals Haskell-style
So there
08:59 Alias_ left 09:01 chris2 joined 09:06 root4o joined
root4o "qwe,rty,uio" ~~ m:P5/^(.*?),/ 09:06
matches
qwe, 09:07
including the comma ','
09:07 cmarcelo joined
root4o any way to overcome this ?! 09:07
dakkar ?eval "qwe,rty,uio" ~~ m:P5/^(.*?),/
09:07 evalbot_10157 is now known as evalbot_10158
evalbot_10158 Match.new( ok => bool::true, from => 0, to => 4, str => "qwe,", sub_pos => (Match.new( ok => bool::true, from => 0, to => 3, str => "qwe", sub_pos => (), sub_named => {} ),), sub_named => {} ) 09:07
dakkar root4o: $0 contains the whole string matched by the m// operator, you might want $<1> (is it spelled this way today?) 09:08
?eval "qwe,rty,uio" ~~ m:P5/^(.*?),/;$<1>
evalbot_10158 \undef
dakkar ?eval "qwe,rty,uio" ~~ m:P5/^(.*?),/;$[1]
evalbot_10158 Error: unexpected "[" expecting "::" 09:09
dakkar ?eval "qwe,rty,uio" ~~ m:P5/^(.*?),/;$/[1]
evalbot_10158 \undef
dakkar I'm missing something...
nothingmuch i need advice
dakkar ?eval "qwe,rty,uio" ~~ m:P5/^(.*?),/;$/[0]
nothingmuch from an OO head
evalbot_10158 \Match.new( ok => bool::true, from => 0, to => 3, str => "qwe", sub_pos => (), sub_named => {} )
dakkar root4o: there you are
root4o i use it like this
while (($x) = $s ~~ m:P5/^(.*?)$re/) {
push @r, $x;
$i = $x.chars;
say "$s : $x : $i";
$s = substr $s,$i;
};
nothingmuch supposing you have 'has $foo handles everything' 09:10
root4o $re is comma ;)
nothingmuch does that imply that your class is parametetrized over $foo's runtime type?
or does it require a class
dakkar root4o: I think that ~~m// in list context doesn't do what it used to do in Perl5... no idea if it is a spec change or an implementation bug
nothingmuch from which to steal everything
(ignoring potential subclass methods)
?
root4o i tried w/o
i.e scalar contect the same
09:11 cmarcelo left
root4o captures the comma both in scalar and list context 09:11
dakkar root4o: in scalar context it must return the whole match object, no problem there (i.e. you don't need scalar context)
root4o: did you look at the output of the evalbot?
root4o i mean not ($x) but just $x
dakkar nothingmuch: I'm not sure I follow you...
root4o: do you read what I write? 09:12
root4o yes..
looking
nothingmuch when you have a 'handles' clause on an attribute
that implies that it's a delegate
dakkar nothingmuch: ok
nothingmuch theoretically you can let it delegate everything
root4o aha... will try it now
nothingmuch i'm trhying to think what is more correct - to calculate parametrized classes for all the possible types of the attribute 09:13
or to take all the attributes from the lowest common ancestor of all the possible values of the attribute's value
dakkar nothingmuch: ok, you're trying to avoid run-time lookups as much as possible 09:14
nothingmuch as in 'has Dog $foo handles everything' # all Dog methods can be called on __PACKAGE__
root4o yeah using $/[0] work, but why assigning to variable doesnt work 'cause i'm getting the whole match object, is that correct .. instead the captured match
nothingmuch this is mostly a typing issue, i think
i am not sure how to try and bend the liskov substitution principal to include possibly parametrized types
intuitively, it feels as though only Dog methods should be added to __PACKAGE__
dakkar root4o: in scalar context you get the whole match, and that is correct. in list context I'm not sure what the specced behaviour is
nothingmuch not all possible Dog subclasses by means of parametrized types 09:15
xerox Is there something specific to do in order to be able to use the preprocessor in a .hs file under the pugs buildsystem?
root4o ok.. now it does what i want, 10x
nothingmuch okay, nevermind, i think i streightened it out
dakkar nothingmuch: so, what's the conclusion? (I'm curious)
audreyt xerox: which proprocessor?
xerox audreyt: cpp 09:16
audreyt xerox: normally just slap -cpp to the 0st line
0th, even
xerox Under OPTIONS_GHC? Okay.
audreyt {-# OPTIONS_GHC -cpp -fglasgow-exts ... #-}
xerox I was just trying to fix the Foldable/FunctorM thing warnings.
audreyt ah. k
nothingmuch dakkar: only Dog 09:17
xerox How does one comeback from whatever modification has done to a file?
(Under svn that is) 09:18
nothingmuch svn revert
xerox Danke.
Anything like 'darcs whatsnew' ? 09:20
09:21 KingDiamond joined
audreyt svn st 09:21
nothingmuch svn st
audreyt svn di -u
nothingmuch for -s
(darcs's -s
and svn di otherwise
audreyt nothingmuch here happens to be bidexterous (and prefers darcs)
nothingmuch -q for don't look for adds
xerox (-:
nothingmuch audreyt here happens to be bidexterous as well, but her preference runs on the code level, not the usage level, as she knows both systems much better than I ;-) 09:22
i don't think you can get whatsnew --look-for-adds with no summary in svn 09:23
without explicitly adding the missing files first
xerox traevoli.com/ has nifty ideas about ambidextrousity et all :-) 09:24
audreyt :) 09:25
nothingmuch huh? 09:26
weird site 09:27
xerox Yay.
xerox <- forkIO shower; bbl
09:29 root4o left
meppl guten morgen 09:29
nothingmuch js/html hackers - i plea for your assistance
dev.catalyst.perl.org/wiki/SmokeServer
dakkar audreyt: what is the specced behaviour of C< ($x)=($str ~~ m/.../) > ? should $x get the match object, or the various sub-matches?
09:31 Alias_ joined
Alias_ nothingmuch: GODDAM IT YOU BASTARD NOW THE PROBLEM SPACE IS IN MY HEAD AND I HAVE TO SOLVE IT DAMMIT 09:31
09:31 Alias_ left
nothingmuch feels omnipotent 09:31
he really should just compile it to prolog though
or write a prolog system in Perl 6 with Ovid
audreyt dakkar: I believe it's unspecced. 09:33
dakkar ok. right now it gets the whole match...
audreyt raise on p6l perhaps?
?eval my $x; ($x) = ('123' ~~ /(1)(2)(3)/); $x 09:34
09:34 evalbot_10158 is now known as evalbot_10160
evalbot_10160 *** Cannot parse PGE: (1)(2)(3) *** Error: Cannot find the parrot executable in PATH \Match.new( ok => bool::false, from => 0, to => 0, str => "", sub_pos => (), sub_named => {} ) 09:34
audreyt ?eval my $x; ($x) = ('123' ~~ m:P5/(1)(2)(3)/); $x
evalbot_10160 \Match.new( ok => bool::true, from => 0, to => 3, str => "123", sub_pos => (Match.new( ok => bool::true, from => 0, to => 1, str => "1", sub_pos => (), sub_named => {} ), Match.new( ok => bool::true, from => 1, to => 2, str => "2", sub_pos => (), sub_named => {} ), Match.new( ok => bool::true, from =>
audreyt ?eval my $x; ($x,) = ('123' ~~ m:P5/(1)(2)(3)/); $x
evalbot_10160 \Match.new( ok => bool::true, from => 0, to => 1, str => "1", sub_pos => (), sub_named => {} )
audreyt ok. I think that's just a bug at list=
for now, write ($x,)=
I'll fix soon
but I think currently it flattens into its postional captures 09:35
which is, too, unspecced
not sure what makes more sense...
dakkar like in Perl5, which is what some of us expect
audreyt right, except when you get named captures
and then it becomes muddy
I think m:P5 should retain old behaviour for sure.
dakkar argh...
audreyt not very sure about m//.
raise on p6l? 09:36
p6l can use a change-of-topic :)
dakkar ok, I'll ask
audreyt dakkar++
dinner, bbl
ayrnieu why do people complain about compilation problems on the list instead of here? 09:51
dakkar ayrnieu: personal preference? (WAG) 09:52
ayrnieu it can't possibly be that. 09:54
dakkar I wouldn't say that... some people just dislike IRC 09:55
09:57 larsen joined 09:58 bwk joined 09:59 EdLin joined 10:01 EdLin left
ayrnieu OK: he could have chosen email over IRC because he would have to view IRC through a braille reader, and his experience has shown that IRC moves faster than he tolerates; this problem may have occured to him just prior to a planned task that he doesn't feel comfortable handling as part of IRC's faster-than-email task-switching needs. 10:08
'this problem', meaning the compilation error.
10:17 iblechbot joined 10:44 jsiracusa joined 11:20 theorb joined 11:27 elmex joined 11:28 coumbes_ joined 11:47 Alias_ joined
Alias_ (wishing I has l33t haskell skills usable in Perl 5) 11:47
Juerd Inline::Haskell? 11:48
(You'd have to write that first, though)
Alias_ And learn Haskell
ayrnieu Alias - read HOP; it will make you feel better.
Alias_ And I tried that once
ayrnieu: Well, I read through the contents, and I know most of it already I think
In fact, I'd basically writing HOP::Graph as we speak
I'm 11:49
I just wish I had Haskell instead, with all that juicy partial evaluation
Which would mean I needed a lot less anonymous subs and closures
ayrnieu nah, you'd have just as many of those :-) 11:50
at least as many!
Alias_ But they'd optimize themselves, and be debuggable! 11:51
:)
12:04 gaal_ is now known as gaal
gaal also see audrey's port of her kwiki parser to p5. not that I remember where it is now... 12:07
Alias_ Sounds scary
nothingmuch audreyt glued hugs into perl 12:09
gaal I think it demonstrates some interesting feature of haskell in a way that makes it available for Perl programmers.. but I don't remember what it was :)
Alias_ I AM VERY PRO HUGS 12:10
gaal nothingmuch is very pro glue
nothingmuch fondles Alias_
Alias_ blinks
nothingmuch like, in a huggy way
;-d
gaal wonders if Helium got its name because you talk funny after using it 12:11
12:11 jserv-- joined
ayrnieu you talk funny after linguistically processing anything funny. 12:12
or at least I do. I talk like anything I read intensely enough. Which has its downsides :-(
gaal nm, thanks for the supermarket haskell link, it was nice 12:13
azuroth don't you know it 12:14
gaal shoulnd't we rope tm to commiting here more? :) 12:15
In the pugs interactive shell, a my declaration on its own causes the previous evaluated result to be printed again. 12:29
Alias_ So, I've been here an hour, and no commits
Is that normal? Is it just a slow day? 12:30
xerox bangs the head on the desk 12:33
The more I try the less I can stand the sigils...
?eval 1.5 ~~ 1^..^2 12:41
12:41 evalbot_10160 is now known as evalbot_10161
evalbot_10161 bool::false 12:41
xerox !
ayrnieu ?eval 1.5 ~~ any(1.0^..^2.0) 12:42
evalbot_10161 *** Language "Perl6" unknown. at <prelude> line 69, column 13-46
ayrnieu oh, wait.
12:51 scmc joined 12:54 lichtkind joined
lumi pugs doesn't seem to build, make says: Build failed: 2816 at util/build_pugs.pl line 96. 13:13
Doth anyone have clue? 13:15
gaal what does it say before that? 13:20
13:20 amv joined
xinming lumi: update the repository 13:20
lumi Before that it's all kosher stuff, it chased the modules, and then compiles Data.ByteString, then that 13:22
azuroth eek. back to TAFE tomorrow! 13:30
gaal Types and... Feature Enhancements? 13:31
lumi Turtle and Five Elephants?
gaal lumi: then make is being unhelpful. But try what xinming suggested?
Turtle and Fifteen Elephants? 13:32
lumi I'm trying. My svk broke though, so I'm fixing that firstly
gaal Technical Annoyances For Engineers
xinming lumi: If you need to download the bootstrap file...
here is a link. :-) 13:33
perlcabal.org/~xinming//download.htm
then, the `svk sync /pugs/mirror/` won't take that long.. 13:34
gaal Tangential asymptotic flirty expressions
lumi xinming: Thanks, I need to get svk running again first (updated perl accidently) 13:35
xerox Too Abstract Functional Environment
lumi Trite Acronym for Everything 13:36
xerox That Aesthetic Fractalic Escher 13:37
xinming lumi: Yes, But you just need to download bootstrap file if the local repository is broken, sync won't take that much... 13:38
lumi Tiny Ants Fight Evil 13:40
xinming ??
Tiny Ants Fight Evil reminds me the cartoon <<a bug's life>> 13:41
:-)
xerox Through Alliance Fight Ends 13:42
lumi Three Audrey Fans Escape!
xinming why not all perl 6 fans escape? :-/ 13:43
audreyt I don't think we need to escape fans
they are not metacharacters
lumi The fans I've met are characters 13:44
audreyt sure, but metacharacter?
normal characters needs no escaping... 13:45
lumi But once you've met a character...
xerox Thee Ancient Frontierswoman Explorer 13:46
lumi Two antlers, fair elk. 13:48
xerox Three Abacus Found Exceptions 13:49
13:54 masak joined
lumi Abaci? 14:02
xerox Right, lumi wins. 14:04
lumi Woo, what do I get?
xerox A broken abacus.
lumi I'll stick to my sliderule 14:05
14:10 aufrank joined 14:25 svnbot6 joined 14:29 theorbtwo joined 14:31 macroron__ joined 14:36 ghenry joined 14:40 wilx`` joined 14:45 kattana_ joined
gaal do we have syntax to refer to the container being defined? my %h = ("a" => 42, "b" => HANDWAVE(%h<a>) ) 14:45
with laziness it's probably not too bad if we don't, because we can put a map to transform the assignment 14:46
but it's a nifty feature
lets you e.g. define aliases in a dispatch table
dakkar gaal: looks like a fixed-point operator 14:47
gaal there's also a workaround if you don't mind thunktitude: a => { something }, b => { %h<a>() } 14:48
dakkar: I'm certainly thinking recursive structures, but this is data, not code
hmm, a macro couldtake care of this actually. 14:50
xinming audreyt: ping 14:53
audreyt xinming: pong (but I'm about to sleep)
gaal: we can refer to the container being defined, yes. 14:54
that's part of the spec.
xinming @a.=( reverse ); # @a.postfix:<=>(reverse())
audreyt my $x = $x + 1; # is actually sane
xinming for this, what does @a. mean here?
audreyt $x++
$x.++
$x.postfix:<++>
are all the same thing
so it's just a logical extension of this rule
xinming so, doesn't this mean, it will reverse the @_ and push it into @a?
audreyt no, there is no postfix = 14:55
so I imagine it will result in an error.
14:55 Khisanth joined
xinming space is "really" important in perl 6 14:55
audreyt yeah. see my new journal entry. 14:56
I'd say Perl 6 is spaced out.
xerox @foo. .{...} = ... ; hehe
gaal audreyt: is the surface syntax for that defined? in p5, %h = (a=>42, b=>$h{a}) is not an error if %h is declared, but $h{b} is undef.
xerox I'd call that spooky-effect-at-distance (the two points.)
audreyt xerox: it's like the cat... without the radio 14:57
gaal: "my" is just a declarator
gaal if the same in p6 should yield a defined b, pugs is not there yet
lumi Maybe you need to lazy that? Or sth?
audreyt it's hoisted
xerox Yay.
audreyt gaal: so right, we need to convert "my" into expression
not statement
you can give it a try :)
xerox shakes his fist at sigils
audreyt also, "sub" is now an expression too
$x = sub moose {... } 14:58
gaal audreyt: ACK on the hoisiting; but the problem isn't just there
audreyt is now legal
ditto
$x = my sub moose {...}
gaal: if you use it as lvalue at rhs, it's going to be the same container at the lhs
gaal sub has &?ROUTINE but %h doesn't have %?HASH
audreyt I know.
you need a "fix" 14:59
gaal like dakkar said.
but there is no such thing (no?)
for values
audreyt [ 1, 2, $?EXPR ]
gaal hmmm
audreyt (bad idea)
TimToady: is this legal? 15:00
say 1 + do LABEL: 2; goto LABEL
xinming audreyt: Ok, I think I understand, so, . is always used for "multi & meth", so, @a.= will fail because, there isn't a method called "=", right? :-)
audreyt gaal: or maybe introduce yaml-esque anchors :)
xinming: right.
Khisanth xinming: is it really? someone drinking too much of the Python koolaid? :(
audreyt xinming: "postfix =" that is
Khisanth: it's not for indenting, it's for disambiguation :) 15:01
dakkar 'goto' inside a block is illegal in Perl5, AFAIR
audreyt yes, but that's not a block
xerox audreyt: don't sigils look like a kind of replacement for typing?
audreyt xerox: they are actually type annotations
xerox Mumble. That seems right. 15:02
audreyt and "context" is just return type polymorphism, evaluated at runtime
so we need hinters to annotate the return type
you can, more generally, use infix "as"
foo() as SomeType
which is not unlike ::.
xerox So I can avoid '$' with as? 15:03
my foo = 1 as bar; or something?
audreyt for variables without a known context, the "$" sigil is used
it's just so that we can introduce keywords without conflicting with variables
it is possible to write "Sigilless" macro
that just prefixes "$" in any identifier not bound to a function 15:04
I'd love to chat more, but I really need to sleep
xerox hehe, again
audreyt gotta wake up early tomorrow :)
audreyt waves &
xerox Bye!
xinming audreyt: g'nite
dakkar g'night, audreyt
xinming In fact, prefix and postfix can be exchanged... ;-) 15:07
xerox Thinking of sigils as type annotations makes them reasonable to me... but still syntax looks heavy with them, mumble. 15:10
svnbot6 r10165 | scw++ | Pugs::Grammar::MiniPerl6 15:15
r10165 | scw++ | * grammar updated
r10165 | scw++ | * now translate "return $<a> + 3" to " return $ a + 3"
15:15 frederico joined 15:16 justatheory joined 15:17 shachaf joined
xinming scw: so, does this mean, return it will return pure haskell instead a "layer" ? 15:21
15:22 Alias_ left, lumi joined 15:29 f0rth joined 15:31 aufrank joined 15:33 f0rth joined
scw xinming: err, I'm not quite sure what do you mean 15:33
But what i'm translating is, from MiniPerl6 "return $<a> + 3" to a Haskell monad "return" 15:34
the expression "a + 3"
xinming scw: hmm, what about the example in your README? 15:37
rule yadaLiteral {
$<sym> := [ <'...'> | <'???'> | <'!!!'> ]
{ return App(
Var( doYada( $<sym> ) ),
Nothing,
[ Val( VStr( $<sym> ~ ' - not yet implemented') ) ]
)
}
since, $<sym> in rule are the same as the returned thing... 15:38
scw the $<sym> := ... part should become sym <- ... 15:39
the $<sym> used in the production rule can then be translated to simply "sym"
xinming scw: that's what I mean, hmm, So, does this mean, App function written in perl 5 will translate $<sym> into haskell? 15:40
or, VStr function will translate $<sym> to string $<sym> . ' - not yet implemented' ? 15:41
15:42 ajs_home joined
xinming hmm, or, I think I can understand what does $<sym> mean, It just a function, which will get the symbol name, and return the symbol name... :-/ 15:42
scw The App, Var, doYada, Val, and VStr are all Haskell functions 15:43
I'm writing a tool to translate the rule yadaLiteral into a haskell function using Parsec to parse the same thing
15:44 lumi joined
scw except the rule part, the construction rule part have to be translated to haskell, too 15:44
so, we restrict the constraction rule to a subset of perl6. only function application can be used
s/constraction/production/ 15:45
then we can extract most constructing stuff to some haskell function and use the same name in the production rule 15:46
the advantage is that the rule need not be changed even when perl6 is self hosting
xinming is { $text } part inside the rule rule_name { } are text? I mean $text... :-)
scw all we have to do is to re-implement those functions used in production rules in perl6, instead of haskell
xinming: dev.perl.org/perl6/doc/design/syn/S05.html and search "$0 < 256 and fail" 15:48
15:57 coumbes_ joined
xinming scw: I know fail will cause the match fail, But It can also return a string... the part which I don't understand is, you didn't quote the `Var( doYada( $<sym> ) ),` 16:00
wolverian why should he? it's code. 16:05
16:06 FurnaceBoy joined
scw ya, it's applying doYada on $<sym> and take the return value as the argument of function Var 16:06
wolverian it does look like haskell.. :)
16:09 diotalevi joined
xinming wolverian: I know it is haskell code, but it should return a "string", instead string, that's what I don't understand 16:18
wolverian oh. I thought it's perl6. 16:20
xinming wolverian: I think I understand a bit now... :-) Var in rule is a perl5(6) function, it will translate it into haskell... and the last result is a string. :-) 16:22
16:27 theorbtwo joined 16:45 justatheory joined 16:47 larsen joined 16:57 aufrank joined 17:28 bernhard joined 17:40 macroron__ joined
ingy anyone know what port(s) gobby uses? 18:10
18:10 Ymmv joined 18:13 weinig|sleep is now known as weinig 18:22 mako132_ joined 18:27 KingDiamond joined 18:37 macroron joined 19:04 Arathorn joined 19:21 ayrnieu joined 19:26 justatheory joined
Arathorn is anyone else getting a 'No instance for (Typeable1 Tree)' at src/Pugs/AST/Internals/Instances.hs:138:0:? 19:27
Arathorn assumes he has something screwy in his yaml 19:28
19:39 dakkar joined
dakkar is there some magic I should perform to make ghc find the fps package? 19:41
19:43 elmex joined
dakkar ?eval 1 20:01
20:01 evalbot_10161 is now known as evalbot_10165
evalbot_10165 1 20:01
xinming dakkar: I think you have update first...
dakkar I have v10165, a fresh checkout 20:02
xinming it's a bugs in 10162(maybe), as she forgot to commit... :-)
dakkar: hmm, here just compile fine.
dakkar I suspected as much...
ok, rm, checkout, 2nd try ...
just a hunch... what version of GHC and Cabal are you running? 20:04
20:04 dvorak joined
dakkar no luck... still can't find Data.ByteString 20:06
even if it gets compiled
and 'ghc-pkg list' shows it
I'll ask again tomorrow, with more people awake ;-) 20:12
xinming Glasgow Haskell Compiler, Version 6.4.1, for Haskell 98, compiled by GHC version 6.4.1 20:15
/opt/ghc/lib/ghc-6.4.1/package.conf:
rts-1.0, base-1.0, haskell98-1.0, template-haskell-1.0, unix-1.0,
Cabal-1.0, parsec-1.0, haskell-src-1.0, network-1.0,
QuickCheck-1.0, HUnit-1.1, mtl-1.0, fgl-5.2, X11-1.1, HGL-3.1,
OpenGL-2.0, GLUT-2.0, stm-1.0, readline-1.0, (lang-1.0),
(concurrent-1.0), (posix-1.0), (util-1.0), (data-1.0), (text-1.0),
(net-1.0), (hssource-1.0)
/home/xinming/.ghc/i386-linux-6.4.1/package.conf:
fps-0.6
dakkar moce or less the same here... 20:16
20:31 wilx`` joined 20:43 PseudoPlacebo left 20:46 dvorak joined 20:55 weinig joined, Ymmv joined 20:58 Quell joined 21:00 Ymmv joined 21:10 mkhl joined 21:19 rbysamppi joined 21:23 weinig is now known as weinig|away, chris2 joined 21:25 szbalint_ joined
svnbot6 r10166 | rbysamppi++ | Added 'rbysamppi' to AUTHORS 21:29
21:33 hugues23 joined 21:44 amnesiac joined 21:48 Kattana joined
svnbot6 r10167 | audreyt++ | * "Long dot" is now: 21:50
r10167 | audreyt++ | $xyxxy\.moose;
r10167 | audreyt++ | $xyxx\ .moose;
r10167 | audreyt++ | $xyx\ .moose;
r10167 | audreyt++ | $xy\ .moose;
r10167 | audreyt++ | $x\ .moose;
r10167 | audreyt++ | Retire the $x.:moose form.
21:53 szbalint_ is now known as szbalint
svnbot6 r10168 | audreyt++ | * fix long_dot.t 21:54
rbysamppi Are multiple invocants in the indirect object syntax still allowed? For instance: 21:57
multi foo (Int $x, Int $y: Int $z) { ... }
; foo 1, 2: 3;
audreyt no; you can only have one "invocant" in the calling syntax 21:59
in the parameter there may be multiple tie-breaking parameters
but that has nothing to do with call-side invocant
i.e., a call-side invocant indicates a method call (which may fallback to subroutine call)
the lack of invocant means a straight subroutine call (and never a method call)
so multi-invocant doesn't quite make sense from the call-side 22:00
rbysamppi I see.
I'm still wrapping my brain around "calls and dispatch are orthogonal".
audreyt yeah. multi/single vs method/sub 22:01
are very much orthogonal
Arathorn how does one install fps-any such that ./Setup can see it, and thence build pugs? 22:02
Arathorn assumes he needs it in the ghc include path somehow, but significantly lacks haskell-fu :( 22:03
audreyt Arathorn: running "perl Makefile.PL" should do it 22:06
at least that's the intent 22:07
Arathorn hm, it didn't - but running ./Setup.hs manually in third-party/fps looks promising
audreyt mmm
are you on ghc 6.4.2?
Arathorn is dubiously using the ghc-cvs 20050331 snapshot in debian sarge :/ 22:08
audreyt ahh. that explains
Arathorn which in practice has worked okay in the past, but may make my build env rather unrepresentative...
oops - apologies for red herringness, then. 22:09
audreyt run
ghc-pkg latest Cabal
and tell me the version
Arathorn Cabal-1.0, says ghc-pkg list 22:10
ghc-pkg latest
doesn't seem to be implemented in this version
audreyt ok
how about
ghc-pkg list Cabal
Arathorn nope - list takes no args 22:11
audreyt ok
Arathorn will get building a real GHC on this box
ghc-pkg describe Cabal -> 'version: 1.0', fwiw 22:12
and manually running its Setup.hs configure/build/install seems to have worked sufficiently that pugs builds, at any rate
audreyt nono 22:13
I've just fixed it for you :)
can you try uninstall?
the fps that is
Arathorn oh - okay :)
Arathorn kills the build, uninstalls the Setup.hs, and tries rerunning pugs' configure
audreyt you need to sync up to r10169 22:14
svnbot6 r10169 | audreyt++ | * Fix for Cabal-1.0, reported by Arathorn++
Arathorn hrm, i wonder whether it silently failed because i was trying to build pugs without permissions to create /usr/local/lib/fps-0.6 22:15
Arathorn svn ups
audreyt no, it failed because your ghc reported >6.4.1 but does not come with a new Cabal
so I'm now testing cabal version explicitly
Arathorn right 22:16
yup, that seems to be working now :) 22:18
woo - thanks
audreyt yay :)
szbalint :) 22:20
audreyt goes back taking a nap... it's still 6:20am here
TimToady++ # escaping the long dot problem 22:21
22:21 mako132_ joined
szbalint oh gosh 22:24
you stayed up again 22:25
:P
rbysamppi Does "my" with multiple variables still have to have parentheses? my $a, $b, $c = 1, 2, 3
azuroth hmm, does = without my? 22:28
rbysamppi I dunno. Ignore the =, then. my $a, $, $c # legal? 22:29
Oops, my $a, $b, $c
azuroth hmm, I can't find any supporting code examples 22:31
rbysamppi Eh. my takes a signature now, right? 22:32
audreyt rbysamppi: yes, it still does need multiple parens
rbysamppi Okay, then. Thanks.
audreyt I mean, parens around multiple args
it takes either a one-arg sig
or a parens with full Sig
azuroth "my now take a Signature as their argument. The parentheses around the signature may be omitted for a simple declaration that declares a single variable, along with its associated type and traits. Parentheses must always be used when declaring multiple parameters"
oh, too late 22:33
off to the turtle and five elephants, bye! 22:39
22:44 frederico joined
clkao aufrank: no i haven't, fantastic job. i was to but got lazy today and went out for the day having decent food :) 22:47
aufrank clkao: all I've done so far is read a syn and write a couple of tests 22:49
I'll race you to the rules ;)
aufrank has a big project starting tomorrow
lots of prep work, been in the lab all day
clkao oh well, but let's keep in touch so there's no duplication 22:51
aufrank yeah, good plan
sorry about pinging you and then disappearing the other day 22:52
advisor called me away from my desk
clkao that's fine, i probably wasn't abvout anyway 22:53
23:28 SamB joined 23:33 oylenshpeegul joined
Arathorn anyone around who knows any Judy? 23:39
Arathorn is wondering if there's any way to iterate over the keys of a JudyHS..
s/keys/Indexes/
audreyt hm, seems only JudySL offers that capability 23:44
(and JudyL)
it's probably possible to have a JudyHS + Judy1
that slows insert/delete a bit but makes iterate possible and fetch remains fast 23:45
i.e. use a Judy1 to hold the (iterable) key set
this may still be better than JudySL, performance-wise
and also allows null bytes in keys
Arathorn nods.
audreyt want to prototype something like that up? :) 23:46
(I wonder if you can hack Tie::Judy to use that instead of JudySL, and bench)
Arathorn may give it a go - will mention if i get anywhere :) 23:47
audreyt (the Judy.xs binding is minimal and should be straightforward to hack with)
Arathorn thanks for tuits...
audreyt yay
Arathorn++
np :)
&
23:51 Odin-LAP joined
Arathorn i guess it ends up being a memory/performance balance 23:55
due to the redundant-ish Judy1 key index 23:56
Arathorn plays