pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by diakopter on 11 July 2007.
diakopter TimToady: did you get a chance to examine my nopaste from earlier today? 00:02
TimToady not yet 00:05
diakopter I'm making a much more complicated edition... consider waiting for that one 00:06
TimToady @tell perlDreamer 2-arg substr is indicated by the fact that the 3rd arg is marked as optional. it's must the 4-arg that's missing.
lambdabot Consider it noted.
TimToady @tell perlDreamer s/must/just/ 00:07
lambdabot Consider it noted.
perlDreamer lambdabot: messages 04:27
lambdabot: @messages
lambdabot TimToady said 4h 20m 50s ago: 2-arg substr is indicated by the fact that the 3rd arg is marked as optional. it's must the 4-arg that's missing.
TimToady said 4h 20m 35s ago: s/must/just/
perlDreamer TimToady, so no 4 arg substr in Perl6? Replacement is just through lvalue assignment? Please forgive me for belaboring the subject, but your answer wasn't clear as to whether the omission is due to it not being in the language or not. 04:29
and in the pugs test suite, all 4 arg substr's are commented out. 04:31
lambdabot: @tell TimToady so no 4 arg substr in Perl6? Replacement is just through lvalue assignment? Please forgive me for belaboring the subject, but your answer wasn't clear as to whether the omission is due to it not being in the language or not. In the pugs test suite, all 4 arg substr tests are commented out. 04:33
lambdabot Consider it noted.
meppl good morning 04:53
pugs_svnbot r17186 | agentz++ | PCR - used arrows 05:56
diff: dev.pugscode.org/changeset/17186
lambdabot Title: Changeset 17186 - Pugs - Trac
pugs_svnbot r17187 | agentz++ | PCR - added t.sh to ease development 05:59
diff: dev.pugscode.org/changeset/17187
lambdabot Title: Changeset 17187 - Pugs - Trac 05:59
rindolf Hi all. 07:16
rindolf Alias_: here? 07:16
masak I'm not sure PIL1 is what I want anymore 07:28
I took a look at the output, and couldn't locate any function calls 07:29
masak does PIL1 perhaps do funky stuff like inlining of subroutines or something? 07:31
why then does it start with a list of subs?
seems you would want either a list and inlining, but not both
masak moritz_: logger for #bioclipse seems to have gone down yesterday evening 08:22
also, the link "Searchable logs" links to perl6 at colabti 08:24
besides, your logs are searchable too nowadays, so you might consider renaming
Alias_ rindolf: Yes, now 09:23
pugs_svnbot r17188 | agentz++ | PCR - added _pos slots to almost all the AST nodes 09:36
diff: dev.pugscode.org/changeset/17188
lambdabot Title: Changeset 17188 - Pugs - Trac
masak agentzh: there are a number of non-versioned files in perl5/Pugs-Compiler-Rule/ -- would it be ok if I svn:ignored those? 09:56
normally I would just do it, but just checking if there's a reason they should not be ignored 09:57
pugs_svnbot r17189 | agentz++ | PCR - saved _pos info into the emitted code (as smart commetns :))
diff: dev.pugscode.org/changeset/17189
lambdabot Title: Changeset 17189 - Pugs - Trac
pugs_svnbot r17190 | agentz++ | PCR - emitted regex pos info in ratchet mode (masak: go ahead :)) 10:25
diff: dev.pugscode.org/changeset/17190
lambdabot Title: Changeset 17190 - Pugs - Trac
pugs_svnbot r17191 | agentz++ | PCR - added Pugs::Runtime::Tracer (not working yet) 10:52
diff: dev.pugscode.org/changeset/17191
lambdabot Title: Changeset 17191 - Pugs - Trac
pugs_svnbot r17192 | agentz++ | PCR - added Pugs::Runtime::Tracer for debugging the grammar/regex (not working yet) 10:55
diff: dev.pugscode.org/changeset/17192
lambdabot Title: Changeset 17192 - Pugs - Trac
rindolf Alias_: here? 11:31
Hi all.
Alias_ yo
masak 'ello
rindolf Hi Alias_ 11:33
Alias_: I tried to commit something into svn.ali.as/ using my CPAN id and could not.
Alias_ yeah, sorry about that
;)
I'm working on it
rindolf Alias_: is there anything I can do to help? 11:34
Alias_ Not really, it's mostly down to me finishing the repository manager
rindolf Alias_: I see.
Alias_ Actually, I can probably run/release the current version, and add you manually 11:35
hmm
masak Alias_: PPI is great, btw 11:43
Alias_ Thanks :)
masak you're welcome. I noticed because I'm currently looking for something similar for p6 11:44
Alias_ runs
masak no, I didn't mean it that way
I'm looking for existing ways to get a syntax tree
Alias_ hrm... I'm not entirely convinced it's going to be possible
masak from perl 6 source
so far I've found PIL1, which does not seem to be what I want 11:45
Alias_ It was SUPPOSED to be possible... but I'm not entirely sure it will be possible
masak Alias_: not possible? then what is it that the parser produces?
Alias_ code
masak hm 11:46
masak wants a non-ASCII representation of the source file
Aankhen`` Will Shift-JIS do? 11:47
Alias_ :)
masak checks
Alias_ no, you want a deserialized representation 11:48
You want a Perl 6 DOM
masak yes!
is that too much to ask?
Aankhen`` That would be nice indeed.
Alias_ I have an ugly suspicion it's going to be even more impossible than in Perl 5
masak it seems perfectly natural to me
masak Alias_: what's the difference between p5 PPI and p6 DOM? 11:49
and why would the latter be even more impossible?
Alias_ Well, for one, the p6 DOM is still a moving target
masak Aankhen``: I don't see Shift-JIS among the valid pugs backends 11:50
Alias_: well, disregarding that
Alias_ The P6 syntax is also a good deal more complicated than P5
Which doesn't make it impossible I guess, just harder
Alias_ PPI implements a relatively static grammar 11:52
You pretty much need static grammars to make a DOM work :)
masak Alias_: hm. good point. let's say, though, that I'm interested in parsing vanilla p6 11:53
Alias_ TBH, dunno
I'm sure you could implement something like PPI
But you'd probably have similar issues as with PPI, you couldn't use regexes really 11:54
You'd have to cheat rapaciously
masak I was thinking of cheating to the extent of not implementing p6PPI at all :) 11:55
my goal is to do a bit of analysis on the pugs test suite
and it would help greatly if I could traverse DOMs, not text files
Alias_ Well, I don't believe there's a DOM parser for Perl 6 11:56
wolverian just use the grammar.. (;
masak wolverian: please elaborate
is that feasible today?
Alias_ wolverian: Don't start, we don't want to lead him down a false path 11:56
he's kidding
masak Alias_: thought so
wolverian masak, no, we're not bootstrapped yet. there _is_ the grammar, but no engine to run it, I think.
Alias_, sorry. :)
Alias_ Can the grammar parse without executing? 11:57
masak Alias_: name one place where it can't
except non-vanilla p6 11:58
wolverian changing the grammar at runtime
..right
Alias_ loading modules
masak hm
Alias_ Compile-time code
masak Alias_: yes, there is that. the test suite has some of that
wolverian as long as it doesn't change the grammar, it should be fine, I think
Alias_ wolverian: Well, arbitrary code == exploit == not allowed 11:59
masak so, how would you do it, today, given today's tools?
Alias_ BEGIN { while (1) { $_++ } }
wolverian Alias_, I mean parsing without running should result in the same dom, as long as the code that would have been run doesn't change the grammar
Alias_ or any equivalent you can come up with
wolverian s,doesn't,wouldn't have, # I don't even know anymore 12:00
masak given that I went for a simple text-matching approach, looking for sub calls, I would still have to recognize strings and comments 12:02
it gets complicated quickly
I'd like to have something do the hard lifting
Alias_ Yes 12:03
Yes it gets VERY complicated quickly
masak Alias_: yes, you would know
Alias_ indeed
masak and I guess you wouldn't recommend that road
Alias_ Well, I was told it could be done internally 12:03
masak that's what I'm hoping for 12:04
Alias_ That somehow the parser would have a mode that would prohibit grammar modifications, and thus give you a parsetree
masak sounds great
wolverian .. like mad does for perl5? hm. not sure if it's compile-only
just a thought, I haven't worked with mad 12:05
Alias_ uuumm... possiblyu
I haven't worked with mad
wolverian heh
anyway, we're interested in 6 now :)
masak didn't know mad was available
wolverian masak, did you look at pugs -C? 12:06
masak wolverian: yes
found PIL1, was half disappointed, half confused 12:07
is there anything else in -C I should be looking at?
bloonix $fh.say "hello world" returns an error, why? 12:10
masak bloonix: should you perhaps write $fh.say: "hello world" ? 12:11
bloonix masak: yes, I should :) thx! 12:13
masak np
that still bites me too sometimes
bloonix I searched for an example but didnt find one
masak it's still too early to blame people for not having p6 syntax down pat :) 12:14
bloonix hmmm I tries flock on the filehandle but I doesnt work
:set nonu
*arg*
wolverian masak, not sure what's bitrot and what's not 12:15
(if any)
pasteling "bloonix" at 87.230.108.20 pasted "use perl5:Fcntl <flock>; my $f" (10 lines, 245B) at sial.org/pbot/26601
masak wolverian: no, I think that syntax is a feature 12:16
wolverian masak, I meant -C
masak wolverian: oh 12:17
bloonix any suggestions?
masak bloonix: not at present 12:18
was it the flock call that broke things?
wolverian: I wish I could attribute what I saw to bitrot
PIL1 just doesn't seem to be what I need
way too chewed already
wolverian heh, try -CPugs 12:20
(whoa!)
masak ok
wolverian no, don't :)
masak ok :) 12:21
I did, anyway. it said "pugs: XXX"
terse, but not correct, unfortunately 12:22
wolverian it's more verbose on feather..
masak I don't have access to feather 12:23
wolverian oh! well, ask Juerd
masak wolverian: yes I know. I just haven't found a compelling reason to get an account. to check the verbose output of pugs -CPugs seems like somewhat less than a compelling reason... 12:24
usually I make do with my own computer, and don't need a feather account
bloonix: seems to me flock is not imported properly 12:25
I wish I had a fix for you, but I don't, sadly :(
bloonix where is the different between sub FOO () {} and constant $FOO ? 12:34
masak well, the syntactic difference is obvious: $FOO contains a dollar sign 12:35
so, I suppose that's not what you mean
I guess they can be used in much the same way if &FOO (the sub) always returns the same value 12:36
but using a sub where a constant is enough seems a bit wasteful
fglock masak: you can probably write a Match-to-DOM converter based on v6.pm 12:37
masak fglock: I'd like that. difficult? 12:38
ruoso masak, actually, not that much 12:39
masak I haven't really looked at v6.pm
ruoso you can look at the Pugs::Runtime::Match 12:40
and XML::DOM
you just need to create a DOM tree based on the matches
masak ruoso: thx
sounds great, actually
masak 's hopes rise
fglock masak: lib/Pugs/Compiler/Perl6.pm is the place to look for how to get from source code to the match object 12:43
masak ok
fglock actually, it's just $match = Pugs::Grammar::Perl6->parse( $source ) 12:45
masak mm 12:46
masak is sorting through a number of lib/Pugs/Compiler/Perl6.pm at present
fglock in perl5/Pugs-Compiler-Perl6 12:47
masak thx
pasteling "fglock" at 82.154.252.25 pasted "perl6-to-match with Pugs::Grammar::Perl6" (5 lines, 128B) at sial.org/pbot/26603 12:53
masak fglock: thx 12:54
fglock masak: you can probably ignore the value in 'capture', because you will be doing the semantic analysis later, I think 12:59
masak installs Parse::Yapp
it works now 13:00
yes, I think this was what I was looking for
fglock++
fglock cool :)
Juerd masak: To get access to feather, request a login by email (juerd@feather.perl6.nl) 13:02
masak Juerd: what, by you, is a sufficient reason to get an account? 13:03
Juerd masak: You're a Perl 6 contributor and wish to use feather for that, in any way your creativity can think of -- as long as it doesn't break feather :) 13:04
masak thing is, I wish to contribute to Perl 6, but I'm not sure I need feather ATM -- and I've tried pretty hard to come up with a need 13:06
seems I get along pretty well with just the svn repo
fglock hmm - $/<Pugs::Grammar::Expression.parse> doesn't keep much parsing information - but this is fixable
masak Juerd: but as soon as I think of something, I will email you :)
fglock lunch & 13:07
masak fglock: yes, just noticed that too 13:08
it would be desirable, I think, for the expression to further specify its parts 13:10
an expression parse tree, more or less 13:11
...but reliable division into statements is already a great help on the way :)
Tene masak: one reason, as I understand it, is to have a constantly updated pugs available without maintaining it and updating it yourself. 13:17
That's not a significant motivator for me... but for some people it is.
masak ok
seems reasonable from at least some perspectives 13:18
Juerd masak: You don't have to use feather once you have an account :0 13:19
:)
masak Juerd: :) 13:20
rgs but you can echo "has an account on feather" >> resume 13:20
masak oooh
didn't think of that 13:21
Juerd Oh, that too, indeed
rgs: Do you want an account? Looks good next to "Iz teh pumpking" :) 13:22
rgs haha
masak is tempted, against his will, by these arguments
Juerd Resistance is floor tile. 13:23
masak indeed
rgs you will be insulinated 13:24
Juerd I thought incinerated
masak infuriated
Tene masak: If you get an account on feather, women will be more attracted to you. 13:28
I've noticed the difference since I got one.
masak Tene: I'm fine, thanks
Juerd Gay! :P
masak any more of that would just be a nuisance
Juerd: how's that for jumping to conclusions :P
Juerd I'm gay so I can say this ;) 13:29
masak there's one thing I didn't expect this morning to be discussing today in #perl6, my sexual orientation...
Juerd: that indeed is a good excuse
Juerd You don't have to talk about it if you don't want :) 13:29
But then you leave us no choice but to jump to conclusions :P
masak Juerd: true. it's a double-edged sword :) 13:30
Juerd Unfortunately there's no way to tell if someone's gay
rgs GOTO conclusion <- harmful
Juerd If only life were so easy
rgs: conclusion() <- better?
rgs if you can resume on exception... 13:31
fglock masak: re Pugs::Grammar::Expression - the malformed Match is built by the operator precedence parser, which is a plain method (not a Perl 6 regex) 14:19
masak "malformed Match"?
fglock the other Perl 6 implementations likely have the same problem
the Match doesn't show the expression tokens 14:20
masak ah, yes
fglock: it should, shouldn't it?
fglock the expression tree is returned in the 'capture' field, instead
fglock but that is a tree of strings, instead of a Match 14:21
masak ok
bloonix are constant hashes possible? I got a problem and I dont know how to solve it with p6 14:43
s/got/have/
masak bloonix: first, do you need to solve it with p6? :)
(kind of a spoilsport question, I know) 14:44
second, why constant hashes?
bloonix I have p5 code and want port it to p6 :)
masak I'm sure you could at least wrap a hash in an object and prevent write access
maybe even implement the Hash role and do it
but probably not with today's pugs 14:45
masak wait till Christmas 14:45
bloonix sec I give you a code example ;)
masak oki
pasteling "bloonix" at 87.230.108.20 pasted "use constant FOO => 'this is f" (8 lines, 171B) at sial.org/pbot/26604 14:48
bloonix this is what I need &{$what} 14:49
thats not possible with "constant $FOO = 'this is foo'"
masak bloonix: no idea, sorry
bloonix the best thing would be a hash I think
masak yes 14:50
bloonix but all items must be constant :/
masak bloonix: why? just don't change them
bloonix or I could "use FOO () { 'this is foo' }" but I dont know how I can access FOO as a variable 14:51
bloonix &{$what} doesnt work 14:51
any idea?
masak none, sorry
check the synopses for inspiration, perhaps
bloonix did it 14:52
masak ok
then you're probably better informed than I
haven't read them in a while; been meaning to
bloonix also I thought about $.lv = { FOO => 1, BAR => 2, BAZ => 3 }
but Im dont care 14:53
not
broquaint Hash::Util ? 14:54
bloonix timtowdi but I want the best :p 14:56
pasteling "masak" at 130.238.204.78 pasted "I'm slowly getting it to work as I want. This is an interesting development." (43 lines, 954B) at sial.org/pbot/26605 15:09
masak still a few quirks to work out, but still, very rapidly progressing 15:10
this was the kind of leverage I was talking about, thx everyone for guidance
bloonix Im searching but dont find anything.... I want something like 15:21
regex FOO {}
in which synopsis can I find it? :/
[particle] S05 15:22
moritz_ somewho my irc log bot keeps dying in all channels but #perl6 15:24
integral can someone explain why there's opt_ws2 and opt_ws3 tokens in KindaPerl6::Grammar? I don't see where they're used
moritz_ s/who/how/
mysql connections time out :(
is there a keepalive option or something?
integral Hmm, where in the synopses does it say the difference between 'rule' and 'token'? 15:27
moritz_ integral: token doesn't backtrack 15:27
integral: and rule has an implicit :sicspace 15:28
integral ah
pasteling "bloonix" at 87.230.108.20 pasted "if 1 ~~ /^<[10]>$/ { say "okay" (9 lines, 121B) at sial.org/pbot/26606
integral I see it now
moritz_ bloonix: you have to match against m/<foo>/ 15:29
bloonix: at least that's what I think
moritz_ foo # logging test 16:26
pugs_svnbot r17193 | moritz++ | [irclog] 16:41
r17193 | moritz++ | * added changeset link target for #bioclipse
r17193 | moritz++ | * removed colabti links from the linkblocks (maybe conditionally add them
r17193 | moritz++ | later again?)
r17193 | moritz++ | * ilbot.pl now ping()s the database before writing
r17193 | moritz++ | * updated TODO file
diff: dev.pugscode.org/changeset/17193
lambdabot Title: Changeset 17193 - Pugs - Trac
wolverian hmm 16:57
pugs_svnbot r17194 | moritz++ | [irclog] handle #bioclipse's weird revision links 17:11
diff: dev.pugscode.org/changeset/17194
lambdabot Title: Changeset 17194 - Pugs - Trac
bloonix pugs: oct() is not part of Perl 6 - use :8() instead. 17:54
*g*
fine
that would be fine on all errors :) "please do this or that instead of this"
TimToady we hope to get to that point 17:58
lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
wolverian diagnostics is actually pretty good in perl5 too 17:59
TimToady perlDreamer: the question is whether the 4-arg substr's swapping semantics can be generalized to substr(...).=swap("replacement") 18:00
and then you could use .=swap on any scalar lvalue
assuming .= can actually put the left side into lvalue context sufficiently early for substr to know it should return an lvalue 18:01
wolverian what does .swap do?
TimToady returns the old value instead of the new one
could well be a better name for that
so $x.=swap($y) would set $x to $y but return $x 18:02
wolverian oh, I never realised substr does that 18:03
.swap is a bit short for it, maybe 18:04
TimToady otherwise it'd be entirely redundant with substr() = "replacement" 18:05
but maybe we can generalize it with .= now, in which case the 4-arg form would be redundant
wolverian wait, now I'm confused 18:06
what the heck does .swap without = do?
TimToady probably modifies a temporary and throws it away
in any case, nothing useful
wolverian oh, so it _is_ confusing :) 18:07
[particle] swap in void context? sounds confusing.
TimToady .= implies side effects, so it doesn't matter if it's in void context
wolverian I'm not sure if 4-arg substr is important enough to introduce swap 18:08
maybe it is
wolverian I'm biased -- I feel substr is entirely redundant, if strings just implemented a list interface 18:09
TimToady which they aren't, in Perl :)
perlDreamer TimToady: Thank you. I think I follow, and the answer is that the old 4-arg substr doesn't exist in Perl6.
It was a good learning exercise in PIR, in any case :)
TimToady well, I seem to find myself arguing in that direction
it's still a question whether .=swap or some such can be made to work 18:10
and if so, whether it also works on lists, to replace 4-arg splice
it doesn't exactly follow from normal list assignment semantics though
wolverian I guess I need to get used to side effects again 18:11
TimToady but $x.=swap($x+1) is basically the same sort of thing that $x++ is doing
certainly all this mutator stuff would be outlawed under "use fp;" :) 18:12
[particle] you might as well write that "no Perl6;" ;) 18:13
TimToady but under the OO view objects are just generalized monads, so they're allowed to keep track of state themselves
amnesiac monads! 18:13
TimToady well, relaxed monads. :) 18:14
amnesiac ah, that's different then.
wolverian daquiri drinking monads
TimToady but monads and objects are just different answers to the question of how to encapsulate state 18:15
wolverian well, monads do other things too. as do objects.
TimToady depending on how much you squint, or restrict the notion of "state"... 18:16
wolverian heh
asking a haskeller, the whole point is to get the program to type, and separate concerns on the type level
TimToady one could also phrase it such that anything that has state is by definition a container
so lists are monads in Haskell but objects in Java 18:17
basically, a container is by definition something that is not a pure value 18:18
amnesiac I hope monad != gonad 18:18
wolverian hm, so 18:19
what's e.g. MonadPlus in java? or arrows? :)
(or in perl6)
wolverian if you're not familiar with those, I can give you the URLs to the papers ... 18:20
wolverian though papers really make things seem more complex than they are. 18:20
wolverian especially if there's category theory mentioned. 18:20
TimToady Just because I'm familiar with the concepts doesn't mean I haven't forgotten them in the meanwhile. :) 18:21
wolverian en.wikipedia.org/wiki/Arrows_in_fun...rogramming
lambdabot Title: Arrows in functional programming - Wikipedia, the free encyclopedia
TimToady well, the OO view of those would tend to map more to generics than ordinary objects, but that's where type theory tends to lead in OO 18:23
wolverian haskell.org/haskellwiki/Arrow is a good overview
lambdabot Title: Arrow - HaskellWiki
TimToady so p6's roles tend to start looking a bit like type classes
but the main problem with monads and such is that you have to be fiendishly clever to prove at compile time things that can't be known until run time. :) 18:26
wolverian yeah, that's where type theory leads in fp... 18:27
I very much like stronger compile-time guarantees, but they add a lot of complexity. 18:28
TimToady and while I'm clever, I'm not fiendishly clever. well, at least, not that way...
wolverian oh, by the way -- is there a short notation for a function type in signatures?
(parametrised on the function's own parameter and result types) 18:29
e.g. (a -> b) in haskell
TimToady yes
wolverian thanks, I'll look it up :)
TimToady &foo:(...) I believe
wolverian :(...) is anon? 18:29
TimToady same way you'd name a set of multies in normal code
:() by itself is an anonymous sig 18:30
but with &foo just refines the function type
wolverian sorry, gotta run. I'll backlog -->
perlDreamer According to google maps, the mailing address for the perl foundation is a green truck in the middle of a road in Hillsboro 19:06
obra thank god google maps isn't normative ;) 19:09
moritz_ in S12: Indirect object notation now requires a colon after the invocant, even if there are no arguments after the colon 19:27
moritz_ does that me I have to write substr $a: 0, 3 or something? 19:27
perlDreamer obra: Actually, I was impressed by their realtime tracking capabilities 19:28
moritz_ or say "foo":;
?
spinclad $x.=swap{.inc} # $x++ 19:43
$list<head>.=swap{.<next>} # $list.pop
spinclad mm... i think those should be $foo.=swap: {...} 19:47
spinclad method swap (&block) { my $oldself = self; self.&block; $oldself } # except any .= -ness needs to attach to .&block 19:50
TimToady moritz_: no, most such methods are also exported as multis 19:53
though I think substr is currently misdeclared in S29 19:58
TimToady should be a Str method that is exported, I think 19:58
spinclad method =swap (&block) { my $oldself = self; self.=&block; $oldself } # could almost say this... 19:59
meppl good night 22:46
Limbic_Region night
meppl ;) 22:54