Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-08-01

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 diakopter TimToady: did you get a chance to examine my nopaste from earlier today?
00:05 TimToady not yet
00:06 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.
00:07 lambdabot Consider it noted.
00:07 TimToady @tell perlDreamer s/must/just/
00:07 lambdabot Consider it noted.
00:15 statico joined #perl6
00:31 Schwern joined #perl6
01:00 nipotaway changed the nick to nipotan
01:03 nipotan changed the nick to nipotaway
01:09 Eidolos joined #perl6
01:22 nipotaway changed the nick to nipotan
01:39 jettero joined #perl6
01:43 xdg joined #perl6
01:45 cognominal_ joined #perl6
01:56 weinig joined #perl6
02:09 whooosh joined #perl6
02:10 unobe changed the nick to unobe_away
02:29 Psyche^ joined #perl6
02:29 Psyche^ changed the nick to Patterner
02:35 Alias_ joined #perl6
03:02 hkb_zz changed the nick to hkb_aw
03:09 weinig_ joined #perl6
03:19 stevan__ joined #perl6
03:25 Aankhen`` joined #perl6
03:27 weinig joined #perl6
03:52 amnesiac joined #perl6
04:11 hkb_aw changed the nick to hkb_lab
04:12 xinming_ changed the nick to xinming
04:17 Schwern joined #perl6
04:26 perlDreamer joined #perl6
04:27 perlDreamer lambdabot: messages
04:27 perlDreamer lambdabot: @messages
04:27 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.
04:27 lambdabot TimToady said 4h 20m 35s ago: s/must/just/
04:29 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:31 perlDreamer and in the pugs test suite, all 4 arg substr's are commented out.
04:33 perlDreamer 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.
04:53 meppl good morning
05:03 unobe_away changed the nick to unobe
05:27 devogon joined #perl6
05:33 jisom joined #perl6
05:56 pugs_svnbot r17186 | agentz++ | PCR - used arrows
05:56 pugs_svnbot diff: http://dev.pugscode.org/changeset/17186
05:56 lambdabot Title: Changeset 17186 - Pugs - Trac
05:59 pugs_svnbot r17187 | agentz++ | PCR - added t.sh to ease development
05:59 pugs_svnbot diff: http://dev.pugscode.org/changeset/17187
05:59 wilx` changed the nick to wilx
05:59 lambdabot Title: Changeset 17187 - Pugs - Trac
06:02 apeiron changed the nick to apeiron[shamed]
06:24 bsb left #perl6
06:50 buetow joined #perl6
06:54 weinig joined #perl6
07:05 Psyche^ joined #perl6
07:07 franck___ joined #perl6
07:15 rindolf joined #perl6
07:16 rindolf Hi all.
07:16 iblechbot joined #perl6
07:16 rindolf Alias_: here?
07:17 masak joined #perl6
07:22 Psyche^ changed the nick to Patterner
07:28 masak I'm not sure PIL1 is what I want anymore
07:29 masak I took a look at the output, and couldn't locate any function calls
07:29 Psyche^ joined #perl6
07:31 masak does PIL1 perhaps do funky stuff like inlining of subroutines or something?
07:31 masak why then does it start with a list of subs?
07:31 masak seems you would want either a list and inlining, but not both
07:43 Psyche^ changed the nick to Patterner
07:55 apeiron[shamed] changed the nick to apeiron
08:01 pro21ms4 joined #perl6
08:01 Gothmog_ joined #perl6
08:01 hkb_lab joined #perl6
08:01 arguile_ joined #perl6
08:01 jql joined #perl6
08:22 masak moritz_: logger for #bioclipse seems to have gone down yesterday evening
08:24 masak also, the link "Searchable logs" links to perl6 at colabti
08:24 masak besides, your logs are searchable too nowadays, so you might consider renaming
08:37 torz joined #perl6
08:43 dduncan left #perl6
08:47 sunnavy joined #perl6
09:02 marmic joined #perl6
09:05 ruoso joined #perl6
09:23 Alias_ rindolf: Yes, now
09:36 pugs_svnbot r17188 | agentz++ | PCR - added _pos slots to almost all the AST nodes
09:36 pugs_svnbot diff: http://dev.pugscode.org/changeset/17188
09:36 lambdabot Title: Changeset 17188 - Pugs - Trac
09:56 fglock joined #perl6
09:56 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:57 masak 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 :))
09:57 pugs_svnbot diff: http://dev.pugscode.org/changeset/17189
09:57 lambdabot Title: Changeset 17189 - Pugs - Trac
10:00 cognominal_ joined #perl6
10:03 flokuehn joined #perl6
10:25 pugs_svnbot r17190 | agentz++ | PCR - emitted regex pos info in ratchet mode (masak: go ahead :))
10:25 pugs_svnbot diff: http://dev.pugscode.org/changeset/17190
10:25 lambdabot Title: Changeset 17190 - Pugs - Trac
10:31 marmic joined #perl6
10:52 pugs_svnbot r17191 | agentz++ | PCR - added Pugs::Runtime::Tracer (not working yet)
10:52 pugs_svnbot diff: http://dev.pugscode.org/changeset/17191
10:52 lambdabot Title: Changeset 17191 - Pugs - Trac
10:55 pugs_svnbot r17192 | agentz++ | PCR - added Pugs::Runtime::Tracer for debugging the grammar/regex (not working yet)
10:55 pugs_svnbot diff: http://dev.pugscode.org/changeset/17192
10:55 lambdabot Title: Changeset 17192 - Pugs - Trac
10:57 drrho joined #perl6
10:59 drrho joined #perl6
11:01 nipotan changed the nick to nipotaway
11:02 dwave joined #perl6
11:04 chris2 joined #perl6
11:12 elmex joined #perl6
11:21 polettix joined #perl6
11:23 cmarcelo joined #perl6
11:27 iblechbot joined #perl6
11:31 rindolf joined #perl6
11:31 rindolf Alias_: here?
11:31 rindolf Hi all.
11:31 Alias_ yo
11:31 masak 'ello
11:33 rindolf Hi Alias_
11:33 rindolf Alias_: I tried to commit something into http://svn.ali.as/ using my CPAN id and could not.
11:33 Alias_ yeah, sorry about that
11:34 Alias_ ;)
11:34 Alias_ I'm working on it
11:34 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
11:34 rindolf Alias_: I see.
11:35 Alias_ Actually, I can probably run/release the current version, and add you manually
11:35 Alias_ hmm
11:43 masak Alias_: PPI is great, btw
11:43 Alias_ Thanks :)
11:44 masak you're welcome. I noticed because I'm currently looking for something similar for p6
11:44 * Alias_ runs
11:44 masak no, I didn't mean it that way
11:44 masak I'm looking for existing ways to get a syntax tree
11:45 Alias_ hrm... I'm not entirely convinced it's going to be possible
11:45 masak from perl 6 source
11:45 masak 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
11:45 masak Alias_: not possible? then what is it that the parser produces?
11:45 Alias_ code
11:46 masak hm
11:46 * masak wants a non-ASCII representation of the source file
11:47 Aankhen`` Will Shift-JIS do?
11:47 Alias_ :)
11:47 * masak checks
11:48 Alias_ no, you want a deserialized representation
11:48 Alias_ You want a Perl 6 DOM
11:48 masak yes!
11:48 masak is that too much to ask?
11:48 Aankhen`` That would be nice indeed.
11:48 Alias_ I have an ugly suspicion it's going to be even more impossible than in Perl 5
11:48 masak it seems perfectly natural to me
11:49 masak Alias_: what's the difference between p5 PPI and p6 DOM?
11:49 masak and why would the latter be even more impossible?
11:49 Alias_ Well, for one, the p6 DOM is still a moving target
11:50 masak Aankhen``: I don't see Shift-JIS among the valid pugs backends
11:50 masak Alias_: well, disregarding that
11:50 Alias_ The P6 syntax is also a good deal more complicated than P5
11:50 Alias_ Which doesn't make it impossible I guess, just harder
11:51 pnu joined #perl6
11:52 Alias_ PPI implements a relatively static grammar
11:53 Alias_ You pretty much need static grammars to make a DOM work :)
11:53 masak Alias_: hm. good point. let's say, though, that I'm interested in parsing vanilla p6
11:53 Alias_ TBH, dunno
11:53 Alias_ I'm sure you could implement something like PPI
11:54 Alias_ But you'd probably have similar issues as with PPI, you couldn't use regexes really
11:54 Alias_ You'd have to cheat rapaciously
11:55 masak I was thinking of cheating to the extent of not implementing p6PPI at all :)
11:55 masak my goal is to do a bit of analysis on the pugs test suite
11:55 masak and it would help greatly if I could traverse DOMs, not text files
11:56 Alias_ Well, I don't believe there's a DOM parser for Perl 6
11:56 wolverian just use the grammar.. (;
11:56 masak wolverian: please elaborate
11:56 masak is that feasible today?
11:56 DarkWolf84 joined #perl6
11:56 Alias_ wolverian: Don't start, we don't want to lead him down a false path
11:56 Alias_ he's kidding
11:56 masak Alias_: thought so
11:57 wolverian masak, no, we're not bootstrapped yet. there _is_ the grammar, but no engine to run it, I think.
11:57 wolverian Alias_, sorry. :)
11:57 Alias_ Can the grammar parse without executing?
11:58 masak Alias_: name one place where it can't
11:58 masak except non-vanilla p6
11:58 wolverian changing the grammar at runtime
11:58 wolverian ..right
11:58 Alias_ loading modules
11:58 masak hm
11:58 Alias_ Compile-time code
11:58 masak Alias_: yes, there is that. the test suite has some of that
11:58 wolverian as long as it doesn't change the grammar, it should be fine, I think
11:59 Alias_ wolverian: Well, arbitrary code == exploit == not allowed
11:59 masak so, how would you do it, today, given today's tools?
11:59 Alias_ BEGIN { while (1) { $_++ } }
11:59 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
11:59 Alias_ or any equivalent you can come up with
12:00 wolverian s,doesn't,wouldn't have, # I don't even know anymore
12:01 crashmatrix joined #perl6
12:02 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 masak it gets complicated quickly
12:02 masak I'd like to have something do the hard lifting
12:03 Alias_ Yes
12:03 Alias_ Yes it gets VERY complicated quickly
12:03 masak Alias_: yes, you would know
12:03 Alias_ indeed
12:03 masak and I guess you wouldn't recommend that road
12:03 aindilis joined #perl6
12:04 Alias_ Well, I was told it could be done internally
12:04 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
12:04 masak sounds great
12:05 wolverian .. like mad does for perl5? hm. not sure if it's compile-only
12:05 wolverian just a thought, I haven't worked with mad
12:05 Alias_ uuumm... possiblyu
12:05 Alias_ I haven't worked with mad
12:05 wolverian heh
12:05 wolverian anyway, we're interested in 6 now :)
12:05 * masak didn't know mad was available
12:06 wolverian masak, did you look at pugs -C?
12:06 masak wolverian: yes
12:07 masak found PIL1, was half disappointed, half confused
12:07 masak is there anything else in -C I should be looking at?
12:10 bloonix $fh.say "hello world" returns an error, why?
12:12 masak bloonix: should you perhaps write $fh.say: "hello world" ?
12:13 bloonix masak: yes, I should :) thx!
12:13 masak np
12:13 masak that still bites me too sometimes
12:13 bloonix I searched for an example but didnt find one
12:14 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
12:14 bloonix :set nonu
12:14 bloonix *arg*
12:15 wolverian masak, not sure what's bitrot and what's not
12:15 wolverian (if any)
12:15 pasteling "bloonix" at 87.230.108.20 pasted "use perl5:Fcntl <flock>; my $f" (10 lines, 245B) at http://sial.org/pbot/26601
12:16 masak wolverian: no, I think that syntax is a feature
12:17 wolverian masak, I meant -C
12:17 masak wolverian: oh
12:17 bloonix any suggestions?
12:18 masak bloonix: not at present
12:18 masak was it the flock call that broke things?
12:18 masak wolverian: I wish I could attribute what I saw to bitrot
12:18 masak PIL1 just doesn't seem to be what I need
12:18 masak way too chewed already
12:20 wolverian heh, try -CPugs
12:20 wolverian (whoa!)
12:20 masak ok
12:21 wolverian no, don't :)
12:21 masak ok :)
12:21 masak I did, anyway. it said "pugs: XXX"
12:22 masak terse, but not correct, unfortunately
12:22 wolverian it's more verbose on feather..
12:23 masak I don't have access to feather
12:23 wolverian oh! well, ask Juerd
12:24 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 masak usually I make do with my own computer, and don't need a feather account
12:25 masak bloonix: seems to me flock is not imported properly
12:26 masak I wish I had a fix for you, but I don't, sadly :(
12:34 bloonix where is the different between sub FOO () {} and constant $FOO ?
12:35 masak well, the syntactic difference is obvious: $FOO contains a dollar sign
12:35 masak so, I suppose that's not what you mean
12:36 masak I guess they can be used in much the same way if &FOO (the sub) always returns the same value
12:36 masak but using a sub where a constant is enough seems a bit wasteful
12:37 fglock masak: you can probably write a Match-to-DOM converter based on v6.pm
12:38 flokuehn joined #perl6
12:38 masak fglock: I'd like that. difficult?
12:38 flokuehn_ joined #perl6
12:39 ruoso masak, actually, not that much
12:39 masak I haven't really looked at v6.pm
12:40 ruoso you can look at the Pugs::Runtime::Match
12:40 ruoso and XML::DOM
12:40 ruoso you just need to create a DOM tree based on the matches
12:40 masak ruoso: thx
12:40 masak sounds great, actually
12:40 * masak 's hopes rise
12:43 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
12:45 fglock actually, it's just  $match = Pugs::Grammar::Perl6->parse( $source )
12:46 masak mm
12:46 * masak is sorting through a number of lib/Pugs/Compiler/Perl6.pm at present
12:47 fglock in perl5/Pugs-Compiler-Perl6
12:47 masak thx
12:53 pasteling "fglock" at 82.154.252.25 pasted "perl6-to-match with Pugs::Grammar::Perl6" (5 lines, 128B) at http://sial.org/pbot/26603
12:54 masak fglock: thx
12:59 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
13:00 masak it works now
13:00 masak yes, I think this was what I was looking for
13:00 masak fglock++
13:00 fglock cool :)
13:01 cognominal_ joined #perl6
13:02 cognominal__ joined #perl6
13:02 Juerd masak: To get access to feather, request a login by email (juerd@feather.perl6.nl)
13:03 masak Juerd: what, by you, is a sufficient reason to get an account?
13:04 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:06 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 masak seems I get along pretty well with just the svn repo
13:06 fglock hmm - $/<Pugs::Grammar::Expression.parse> doesn't keep much parsing information - but this is fixable
13:06 masak Juerd: but as soon as I think of something, I will email you :)
13:07 fglock lunch &
13:08 masak fglock: yes, just noticed that too
13:10 masak it would be desirable, I think, for the expression to further specify its parts
13:11 masak an expression parse tree, more or less
13:11 masak ...but reliable division into statements is already a great help on the way :)
13:12 gnuvince joined #perl6
13:17 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 Tene That's not a significant motivator for me... but for some people it is.
13:17 masak ok
13:18 masak seems reasonable from at least some perspectives
13:19 Juerd masak: You don't have to use feather once you have an account :0
13:19 Juerd :)
13:20 masak Juerd: :)
13:20 rgs but you can echo "has an account on feather" >> resume
13:21 masak oooh
13:21 masak didn't think of that
13:21 Juerd Oh, that too, indeed
13:22 Juerd rgs: Do you want an account? Looks good next to "Iz teh pumpking" :)
13:22 rgs haha
13:22 * masak is tempted, against his will, by these arguments
13:23 Juerd Resistance is floor tile.
13:24 masak indeed
13:24 rgs you will be insulinated
13:24 Juerd I thought incinerated
13:24 masak infuriated
13:28 Tene masak: If you get an account on feather, women will be more attracted to you.
13:28 Tene I've noticed the difference since I got one.
13:28 masak Tene: I'm fine, thanks
13:28 Juerd Gay! :P
13:28 masak any more of that would just be a nuisance
13:29 masak Juerd: how's that for jumping to conclusions :P
13:29 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...
13:29 masak Juerd: that indeed is a good excuse
13:29 gnuvince left #perl6
13:29 Juerd You don't have to talk about it if you don't want :)
13:29 Juerd But then you leave us no choice but to jump to conclusions :P
13:30 masak Juerd: true. it's a double-edged sword :)
13:30 Juerd Unfortunately there's no way to tell if someone's gay
13:30 rgs GOTO conclusion <- harmful
13:30 Juerd If only life were so easy
13:30 Juerd rgs: conclusion()  <- better?
13:31 rgs if you can resume on exception...
13:31 TJCRI joined #perl6
13:35 rdice joined #perl6
14:03 b00t joined #perl6
14:12 [particle1 changed the nick to [particle]
14:18 jhorwitz joined #perl6
14:19 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"?
14:19 fglock the other Perl 6 implementations likely have the same problem
14:20 fglock the Match doesn't show the expression tokens
14:20 masak ah, yes
14:20 masak fglock: it should, shouldn't it?
14:20 fglock the expression tree is returned in the 'capture' field, instead
14:21 Aankhen`` joined #perl6
14:21 fglock but that is a tree of strings, instead of a Match
14:21 masak ok
14:40 thepler joined #perl6
14:43 bloonix are constant hashes possible? I got a problem and I dont know how to solve it with p6
14:43 bloonix s/got/have/
14:44 masak bloonix: first, do you need to solve it with p6? :)
14:44 masak (kind of a spoilsport question, I know)
14:44 masak second, why constant hashes?
14:44 bloonix I have p5 code and want port it to p6 :)
14:44 masak I'm sure you could at least wrap a hash in an object and prevent write access
14:45 masak maybe even implement the Hash role and do it
14:45 masak but probably not with today's pugs
14:45 amnesiac joined #perl6
14:45 masak wait till Christmas
14:45 bloonix sec I give you a code example ;)
14:45 masak oki
14:48 Aankhen`` joined #perl6
14:48 pasteling "bloonix" at 87.230.108.20 pasted "use constant FOO => 'this is f" (8 lines, 171B) at http://sial.org/pbot/26604
14:49 bloonix this is what I need &{$what}
14:49 bloonix thats not possible with "constant $FOO = 'this is foo'"
14:49 masak bloonix: no idea, sorry
14:50 bloonix the best thing would be a hash I think
14:50 masak yes
14:50 bloonix but all items must be constant :/
14:50 masak bloonix: why? just don't change them
14:51 bloonix or I could "use FOO () { 'this is foo' }" but I dont know how I can access FOO as a variable
14:51 dwave joined #perl6
14:51 bloonix &{$what} doesnt work
14:51 bloonix any idea?
14:51 masak none, sorry
14:52 masak check the synopses for inspiration, perhaps
14:52 bloonix did it
14:52 masak ok
14:52 masak then you're probably better informed than I
14:52 masak haven't read them in a while; been meaning to
14:52 bloonix also I thought about $.lv = { FOO => 1, BAR => 2, BAZ => 3 }
14:53 bloonix but Im dont care
14:53 bloonix not
14:54 broquaint Hash::Util ?
14:56 bloonix timtowdi but I want the best :p
14:56 IllvilJa joined #perl6
15:09 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 http://sial.org/pbot/26605
15:10 zamolxes_ joined #perl6
15:10 masak still a few quirks to work out, but still, very rapidly progressing
15:10 masak this was the kind of leverage I was talking about, thx everyone for guidance
15:21 bloonix Im searching but dont find anything.... I want something like
15:21 bloonix regex FOO {}
15:22 bloonix in which synopsis can I find it? :/
15:22 [particle] S05
15:24 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
15:24 moritz_ s/who/how/
15:24 moritz_ mysql connections time out :(
15:24 moritz_ is there a keepalive option or something?
15:27 integral Hmm, where in the synopses does it say the difference between 'rule' and 'token'?
15:28 Blwood_ joined #perl6
15:28 moritz_ integral: token doesn't backtrack
15:28 moritz_ integral: and rule has an implicit :sicspace
15:28 integral ah
15:28 pasteling "bloonix" at 87.230.108.20 pasted "if 1 ~~ /^<[10]>$/ { say "okay" (9 lines, 121B) at http://sial.org/pbot/26606
15:28 integral I see it now
15:29 moritz_ bloonix: you have to match against m/<foo>/
15:29 moritz_ bloonix: at least that's what I think
15:32 Aankhen`` joined #perl6
15:38 ruoso joined #perl6
15:40 Blwood_ changed the nick to Blwood
15:46 vel joined #perl6
15:48 riffraff joined #perl6
16:08 perlDreamer joined #perl6
16:16 Corion joined #perl6
16:19 DarkWolf84 joined #perl6
16:26 franck___ joined #perl6
16:26 irclogbot_tester joined #perl6
16:26 moritz_ foo # logging test
16:34 buetow joined #perl6
16:39 buetow joined #perl6
16:41 riffraff joined #perl6
16:41 pugs_svnbot r17193 | moritz++ | [irclog]
16:41 pugs_svnbot r17193 | moritz++ |  * added changeset link target for #bioclipse
16:41 pugs_svnbot r17193 | moritz++ |  * removed colabti links from the linkblocks (maybe conditionally add them
16:41 pugs_svnbot r17193 | moritz++ |    later again?)
16:41 pugs_svnbot r17193 | moritz++ |  * ilbot.pl now ping()s the database before writing
16:41 pugs_svnbot r17193 | moritz++ |  * updated TODO file
16:41 pugs_svnbot diff: http://dev.pugscode.org/changeset/17193
16:41 lambdabot Title: Changeset 17193 - Pugs - Trac
16:43 jettero changed the nick to testjet
16:47 testjet changed the nick to jettero
16:48 jettero changed the nick to testjet
16:54 testjet changed the nick to jettero
16:54 jettero changed the nick to testguy
16:55 testguy changed the nick to testjet
16:57 hkb_lab changed the nick to hakobe
16:57 wolverian hmm
16:57 testjet changed the nick to jettero
17:11 pugs_svnbot r17194 | moritz++ | [irclog] handle #bioclipse's weird revision links
17:11 pugs_svnbot diff: http://dev.pugscode.org/changeset/17194
17:11 lambdabot Title: Changeset 17194 - Pugs - Trac
17:11 DarkWolf84 joined #perl6
17:14 rhr joined #perl6
17:16 DarkWolf84 joined #perl6
17:20 justatheory joined #perl6
17:20 justatheory joined #perl6
17:23 weinig joined #perl6
17:33 rindolf joined #perl6
17:37 justatheory joined #perl6
17:38 fglock joined #perl6
17:40 daxim joined #perl6
17:41 drrho joined #perl6
17:48 Psyche^ joined #perl6
17:49 DarkWolf84 joined #perl6
17:49 rlb3_work joined #perl6
17:51 thepler joined #perl6
17:54 bloonix pugs: oct() is not part of Perl 6 - use :8() instead.
17:54 bloonix *g*
17:54 bloonix fine
17:55 bloonix that would be fine on all errors :) "please do this or that instead of this"
17:59 TimToady we hope to get to that point
17:59 lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
18:00 wolverian diagnostics is actually pretty good in perl5 too
18:00 TimToady perlDreamer: the question is whether the 4-arg substr's swapping semantics can be generalized to substr(...).=swap("replacement")
18:00 TimToady and then you could use .=swap on any scalar lvalue
18:01 TimToady 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?
18:01 TimToady returns the old value instead of the new one
18:01 TimToady could well be a better name for that
18:02 TimToady so $x.=swap($y) would set $x to $y but return $x
18:03 wolverian oh, I never realised substr does that
18:04 wolverian .swap is a bit short for it, maybe
18:04 Psyche^ changed the nick to Patterner
18:05 TimToady otherwise it'd be entirely redundant with substr() = "replacement"
18:06 TimToady but maybe we can generalize it with .= now, in which case the 4-arg form would be redundant
18:06 wolverian wait, now I'm confused
18:06 wolverian what the heck does .swap without = do?
18:06 TimToady probably modifies a temporary and throws it away
18:07 TimToady in any case, nothing useful
18:07 wolverian oh, so it _is_ confusing :)
18:07 [particle] swap in void context? sounds confusing.
18:07 TimToady .= implies side effects, so it doesn't matter if it's in void context
18:09 wolverian I'm not sure if 4-arg substr is important enough to introduce swap
18:09 wolverian maybe it is
18:09 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  :)
18:09 perlDreamer TimToady:  Thank you.  I think I follow, and the answer is that the old 4-arg substr doesn't exist in Perl6.
18:10 perlDreamer It was a good learning exercise in PIR, in any case :)
18:10 TimToady well, I seem to find myself arguing in that direction
18:10 TimToady it's still a question whether .=swap or some such can be made to work
18:10 TimToady and if so, whether it also works on lists, to replace 4-arg splice
18:10 TimToady it doesn't exactly follow from normal list assignment semantics though
18:11 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
18:12 TimToady certainly all this mutator stuff would be outlawed under "use fp;"  :)
18:13 weinig_ joined #perl6
18:13 [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
18:13 DarkWolf84 joined #perl6
18:13 amnesiac monads!
18:14 TimToady well, relaxed monads.  :)
18:14 amnesiac ah, that's different then.
18:14 wolverian daquiri drinking monads
18:15 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.
18:16 TimToady depending on how much you squint, or restrict the notion of "state"...
18:16 wolverian heh
18:16 wolverian asking a haskeller, the whole point is to get the program to type, and separate concerns on the type level
18:17 TimToady one could also phrase it such that anything that has state is by definition a container
18:17 TimToady so lists are monads in Haskell but objects in Java
18:18 TimToady basically, a container is by definition something that is not a pure value
18:18 jisom joined #perl6
18:18 amnesiac I hope monad != gonad
18:19 wolverian hm, so
18:19 wolverian what's e.g. MonadPlus in java? or arrows? :)
18:20 wolverian (or in perl6)
18:20 wolverian if you're not familiar with those, I can give you the URLs to the papers ...
18:20 weinig joined #perl6
18:20 wolverian though papers really make things seem more complex than they are.
18:21 dduncan joined #perl6
18:21 wolverian especially if there's category theory mentioned.
18:21 TimToady Just because I'm familiar with the concepts doesn't mean I haven't forgotten them in the meanwhile.  :)
18:21 wolverian http://en.wikipedia.org/wiki/Ar​rows_in_functional_programming
18:21 lambdabot Title: Arrows in functional programming - Wikipedia, the free encyclopedia
18:23 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 http://haskell.org/haskellwiki/Arrow is a good overview
18:23 lambdabot Title: Arrow - HaskellWiki
18:24 TimToady so p6's roles tend to start looking a bit like type classes
18:26 TimToady 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:27 wolverian yeah, that's where type theory leads in fp...
18:28 wolverian 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...
18:28 wolverian oh, by the way -- is there a short notation for a function type in signatures?
18:29 wolverian (parametrised on the function's own parameter and result types)
18:29 wolverian e.g. (a -> b) in haskell
18:29 TimToady yes
18:29 wolverian thanks, I'll look it up :)
18:29 TimToady &foo:(...) I believe
18:29 wolverian :(...) is anon?
18:30 TimToady same way you'd name a set of multies in normal code
18:30 TimToady :() by itself is an anonymous sig
18:30 TimToady but with &foo just refines the function type
18:30 wolverian sorry, gotta run. I'll backlog -->
18:37 iblechbot joined #perl6
18:51 hakobe changed the nick to hkb_zz
19:06 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:08 justatheory_ joined #perl6
19:09 obra thank god google maps isn't normative ;)
19:27 moritz_ in S12: Indirect object notation now requires a colon after the invocant, even if there are no arguments after the colon
19:27 Corion joined #perl6
19:27 moritz_ does that me I have to write substr $a: 0, 3 or something?
19:28 perlDreamer obra: Actually, I was impressed by their realtime tracking capabilities
19:28 moritz_ or say "foo":;
19:28 moritz_ ?
19:28 jisom_ joined #perl6
19:38 integral changed the nick to q[int]
19:39 q[int] changed the nick to ntgrl
19:39 ntgrl changed the nick to integral
19:42 weinig_ joined #perl6
19:43 spinclad $x.=swap{.inc}  # $x++
19:43 spinclad $list<head>.=swap{.<next>}  # $list.pop
19:47 spinclad mm... i think those should be $foo.=swap: {...}
19:47 knewt joined #perl6
19:50 spinclad method swap (&block) { my $oldself = self; self.&block; $oldself }   # except any .= -ness needs to attach to .&block
19:53 TimToady moritz_: no, most such methods are also exported as multis
19:58 TimToady though I think substr is currently misdeclared in S29
19:58 Corion joined #perl6
19:59 TimToady should be a Str method that is exported, I think
19:59 spinclad method =swap (&block) { my $oldself = self; self.=&block; $oldself }   # could almost say this...
20:02 thoughtpolice joined #perl6
20:06 weinig joined #perl6
20:13 rlb3_work joined #perl6
20:16 thorat joined #perl6
20:22 weinig joined #perl6
20:23 weinig joined #perl6
20:36 cj joined #perl6
20:37 vel joined #perl6
20:41 mr_ank joined #perl6
20:48 vel_ joined #perl6
20:49 cj joined #perl6
20:52 Southen_ joined #perl6
21:02 vel joined #perl6
21:13 cj__ joined #perl6
21:26 jiing joined #perl6
21:40 zamolxes_ changed the nick to zamolxes
21:46 rlb3_work_ joined #perl6
21:50 weinig joined #perl6
21:51 cj joined #perl6
21:52 weinig joined #perl6
21:56 demq joined #perl6
22:15 cj joined #perl6
22:27 Limbic_Region joined #perl6
22:42 riffraff joined #perl6
22:46 meppl good night
22:46 Limbic_Region night
22:54 meppl ;)
22:55 cj_ joined #perl6
23:11 cj joined #perl6
23:12 polettix joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo