Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-08-14

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:00 weinig_ joined #perl6
00:02 weinig joined #perl6
00:06 TimToady mugwump: I confidently predict that the compiler will stop evaluating it even sooner than that. :)
00:07 mugwump syntax mistake?  :)
00:07 TimToady what is .**-2 supposed to mean?
00:07 Tene hehe
00:07 Tene raise to the -2 power
00:07 TimToady $_ ** -2 ?
00:07 mugwump yeah
00:07 TimToady well, for one thing, .* is a token
00:08 TimToady and for another, you can't just jam an infix in there as a method
00:08 TimToady you could get away with .infix:<**> there, in theory
00:08 mugwump darn, you mean I had to write another character for $_**-2 ?  :)
00:09 TimToady sorry, but allowing infixes to be used like that would be detrimental to extensibility
00:11 TimToady in any case, if .** were a method, you'd have to say either .**(-2) or .**: -2
00:12 TimToady I wish P6 could dwym every possible way, but people m contradictory things... :)
00:13 mugwump ok, I'll write .infix:<**>(-2) or $_ ** -2
00:13 mugwump would be an interesting test case though
00:13 DarkWolf84 ?eval 2**3
00:13 TimToady On the original question, I doubt [+] would be that smart
00:14 pugsbot_r17185 8/1
00:14 mugwump and I needed to make that 6, 36
00:14 TimToady A series could appear to be converging over the short term without doing so long term, I suspect
00:14 DarkWolf84 why is in that form
00:14 TimToady unless [+] is actually smart enough to do the math
00:15 TimToady because has a penchant for switching to rationals at odd times
00:15 TimToady s/because/because pugs/
00:16 mugwump well, I guess if arbitrary precision is involved the compiler could lazily calculate precision depending on how the output was formatted
00:16 TimToady probably Haskell delegates integer ** to rationals
00:17 mugwump well, sounds like a great idea for a module anyway... :)
00:17 TimToady you still have to know the series is converging
00:18 theorbtwo I'm sure there's a proper way to do it (and that the compiler isn't the right place to implement it).
00:18 theorbtwo If I really thought about it, I could probably remember what that proper way *is*.
00:19 TimToady a parabola could well appear to be converging as you approach the end of it, but it doesn't really
00:19 TimToady s/end/middle/
00:19 mugwump sure, you can't do it by sampling
00:20 mugwump you'd need to prove it is convergant at compile it based on the properties of the terms involved (ie, Nums)
00:20 mugwump s/compile it/compile time/
00:21 TimToady oh, actually, it won't compile before that, because it's "constant", not "const".  :P
00:21 * mugwump coughs up a lump of C programmer's disease
00:22 DarkWolf84 :)
00:38 toshinori joined #perl6
00:44 Blwood joined #perl6
00:48 nipotaway changed the nick to nipotan
01:02 dduncan joined #perl6
01:33 Schwern joined #perl6
01:49 weinig joined #perl6
02:26 diakopter TimToady: how goes the pugs-inlined grammar?
02:30 TimToady well, the ratchety parts are easy.  for the rest, it depends on how I decide to represent a lazy list of hypotheses, in particular, where the state of the "current hypothesis" lives
02:32 TimToady and whether a match object can be matched against to chain hypotheses
02:34 TimToady and to what extent laziness implies all the continuations I need without needing explicit continuations
02:35 TimToady but then we're writing all matches in list context, and something like /a*/ ==> /b+/ is chaining matches
02:36 diakopter sounds like lots o' semantics are infiltrating the syntax :D (temporarily)
02:37 TimToady the recognition that list context might supply the continuations was a revelation the other night.  all else is just whatever is convenient syntax
02:37 TimToady but we're basically talking about adding a logic programming element in here
02:38 TimToady and it seems like it might be related to Match ~~ Pattern somehow, where a match against a previous match uses it as the "universe" in which it thinks
02:39 * diakopter is feeling snow[-blind]ed
02:39 TimToady even though I don't really need it for ratchet grammars, I'm exploring it because the ratchet grammar's syntax probably wants to be a degenerate case
02:40 TimToady of the nature that "given" is a degenerate case of "for"
02:40 TimToady given "the previous match" vs for "all the possible previous matches"
02:41 TimToady so quantifiers like * and + just fall out of how you treat the list
02:41 TimToady and it almost works in the current syntax
02:42 TimToady for m:exhaustive/a+/ {...}
02:42 TimToady returns a list of matches
02:42 TimToady so a minimal version gets "a", "aa", "aaa", ...
02:43 TimToady and a greedy version just reverses the list of all possibilities
02:43 TimToady so you have to find the longest one
02:44 TimToady a ratchet just wants the final value of the list
02:44 TimToady anyway, yes, I've been thinking about this pretty much day and night
02:45 TimToady I have a parser for STD's rules already written in P5, so it's just a matter of emitting pugs code usefully
02:45 TimToady it's a bit of a pity that ==> doesn't work yet
02:46 TimToady but that's just sugar anyway
02:47 TimToady but I think running STD in current pugs would be Really Cool™
02:47 TimToady albeit rather slow...
02:47 diakopter mmmmm Monellin, the best sugar substitute.
02:48 TimToady and if I get the implementation right, all the linkage to the rest of P6 just works, rather than having to get handed back and forth between two different interpreters
02:49 diakopter heh; I was going to say; multicore bootstrapping...
02:51 diakopter sorry to derail/interrupt: do you think a bootstrapping implementation *needs* string-eval in order to bootstrap successfully (yes; disregard for the a moment the 2.5 implementations that have string-eval)
02:51 TimToady but I have to get straight in my head what $_, $/, and self represent in these methods
02:52 TimToady well a bootstrapping implementation needs a compiler and a runtime, or you haven't really bootstrapped.  and once you have those, eval is trivial
02:52 TimToady for various values of trivial
02:53 diakopter er, I mean a ready-to-bootstrap implementation.
02:54 TimToady I have no clue what "ready" means there
02:54 TimToady if something is "ready", it means you have to flip one switch and then it's bootstrapped
02:55 TimToady that def doesn't seem useful, so I suppose you must mean something else
02:56 diakopter ok; I meant an implementation of Perl 6 that's not written in Perl 6 (and can't emit Perl 6)... is string-eval a definitive feature of such a thing?
02:56 diakopter hm; I can't find a good way to phrase this question.
02:57 diakopter oh well; retracted.
02:58 diakopter re: previous thread, sounds like you're doing a lot of implementation both in your head and on keyboard.
02:58 TimToady I am trying out various hypotheses :)
02:59 diakopter (imagining the ins-and-outs of a virtual reference implementation)
02:59 TimToady I just think it would be hilarious if we already had the primitives for logic programming but didn't recognize it yet.
03:01 TimToady it kinda comes down to the fact that everything can be done with a lazy map
03:01 TimToady and a sequence of matches that depend on previous matches are just nested maps
03:02 TimToady and a ratchet grammar is just full of maps that return 0 or 1 element
03:03 TimToady assuming that the elements being passed around are hypotheses
03:03 TimToady aka "okay so far" matches
03:03 diakopter could you force constraint solving to compile time using the type-checker and all your constraints as subtypes?  or can subtypes' where clauses not reference free variables?
03:04 elmex_ joined #perl6
03:04 TimToady a subtype is really just a named smartmatch
03:04 diakopter Syntax Error: Inconsistent Type System.
03:05 diakopter right; I've picked that up :D (I won't admit how recently)
03:05 TimToady this also impinges on the question of how a program changes languages in midstream
03:06 TimToady (speaking of inconsistent types)
03:06 TimToady different parts of the same string can be doing smartmatches against different sets of rules
03:07 diakopter Syntax Error: Divergent Parser Detected.
03:08 TimToady biab &
03:10 diakopter Perl6: There's not one language/compiler feature that's not first-class at *-time.
03:41 JarJarBi1ks joined #perl6
03:42 elmex joined #perl6
03:52 * diakopter reads about semantics-directed compiler-generators.
03:52 diakopter (barely)
04:02 justatheory joined #perl6
04:02 justatheory joined #perl6
05:31 devogon joined #perl6
05:33 jisom joined #perl6
05:51 kanru joined #perl6
06:15 r0bby joined #perl6
06:16 integral joined #perl6
07:03 dduncan left #perl6
07:06 Aankhen`` joined #perl6
07:39 integral joined #perl6
08:27 integral joined #perl6
08:51 daxim_ joined #perl6
09:01 JarJarBi1ks changed the nick to JarJarBinks
09:08 kane_ joined #perl6
09:12 kane__ joined #perl6
09:14 kane_ joined #perl6
09:17 kane__ joined #perl6
09:19 kane_ joined #perl6
09:21 kane__ joined #perl6
09:23 kane_ joined #perl6
09:27 kane_ joined #perl6
09:28 kane__ joined #perl6
09:28 demq joined #perl6
09:30 fridim joined #perl6
09:31 kane_ joined #perl6
09:32 kane__ joined #perl6
09:37 kane_ joined #perl6
09:37 masak joined #perl6
10:01 iblechbot joined #perl6
10:14 buetow joined #perl6
10:15 chris2 joined #perl6
10:25 fridim_ joined #perl6
10:31 jettero left #perl6
10:47 devogon joined #perl6
10:47 fglock joined #perl6
10:54 Azure-BOT joined #perl6
10:56 fglock is a subtype just a kind of smartmatch?
10:57 mugwump more like a constraint
10:58 flokuehn joined #perl6
10:59 mugwump a subtype is like Type Code -> Type, and smartmatch is Item Item -> Bool
11:00 dwave joined #perl6
11:00 fglock i mean, if EvenNum is a subset, is this an error?  my $n = EvenNum.new( 2 );
11:01 mugwump can you actually instantiate subset types?
11:01 mugwump I would have thought my EvenNum $n = 2 would be closer
11:02 sunnavy joined #perl6
11:02 fglock that is my question, EvenNum is a constraint on Num, but it is not a class by itself, right?
11:02 mugwump I don't think you *need* to instantiate them for them to be useful..
11:03 mugwump eg, in Moose I don't think you get classes for subtypes
11:03 mugwump I even use impossible subtypes like "Array of Foo"
11:03 mugwump (impossible to instantiate in P5, that is)
11:05 fglock ok! I'll keep subset and class as separate things
11:14 devogon joined #perl6
11:22 devogon_ joined #perl6
11:24 rfordinal joined #perl6
11:46 pugs_svnbot r17248 | fglock++ | [kp6] Class != Subset
11:46 pugs_svnbot diff: http://dev.pugscode.org/changeset/17248
11:46 lambdabot Title: Changeset 17248 - Pugs - Trac
11:49 fglock hmm - subsets will need to be sortable over an argument - from best-match to worst
12:25 nipotan changed the nick to nipotaway
12:29 drrho joined #perl6
14:05 jedai joined #perl6
14:06 thoughtpolice joined #perl6
14:08 buetow joined #perl6
14:13 kane_ joined #perl6
14:15 Yaakov joined #perl6
14:18 poky joined #perl6
14:39 masak joined #perl6
14:44 JarJarBi1ks joined #perl6
14:44 fridim joined #perl6
14:49 penk joined #perl6
14:51 Limbic_Region joined #perl6
14:52 Limbic_Region http://perlmonks.org/?node_id=263705  # Perl6:  Will we use it?   It was written over 4 years ago.  I wonder how that thread would look if it had been started today
14:53 lambdabot Title: Perl 6: Will we use it?
14:54 JarJarBinks joined #perl6
14:55 thoughtpolice ironically the article's main question seems to be more about "is it needed" than "will we use it?"
14:59 iblechbot joined #perl6
15:03 Limbic_Region I think perhaps the author equated the two.  In other words, why would someone learn and use a new language if they didn't need to.  Either way, it doesn't change my wonderings about what that would look like today.
15:12 xinming joined #perl6
15:24 DarkWolf84 I don't understand the full picture of kp6
15:28 TimToady fglock: if you instantiate a subset type you get an object of its base type, so new EvenInt actually actually produces storage for an Int
15:29 fglock TimToady: can I subclass a subset type?
15:29 REPLeffect joined #perl6
15:29 masak TimToady: I'm curious if you've read this: http://steve-yegge.blogspot.com/2006/07/wizard-school.html
15:29 lambdabot Title: Stevey's Blog Rants: Wizard School
15:29 TimToady fglock: no
15:30 fglock DarkWolf84: kp6 is a Perl 6 compiler written in "simple" Perl 6
15:30 fglock TimToady: thanks
15:32 DarkWolf84 so perl 5 will be used for bootstrap
15:32 DarkWolf84 ?
15:33 TimToady it's a flooding algorithm; we use everything for bootstrap till something works
15:33 TimToady TMTOWTDI and all that...
15:33 DarkWolf84 looks something frankensteiny :)
15:34 fglock DarkWolf84: it depends how you look at it - simplified Perl 6 will be used for bootstrap - or Perl 5
15:34 jhorwitz joined #perl6
15:34 TimToady or parrot, or pugs...
15:35 fglock or STD
15:35 TimToady at the mot
15:35 TimToady at the moment I think pugs is the closest to running STD
15:36 flokuehn joined #perl6
15:40 DarkWolf84 sorry for too n00b question but what is STD
15:40 obra the perl 6 standard grammar, as authored by TimToady
15:41 TimToady or Sexually Transmitted Disease... ;)
15:41 obra heh
15:41 obra You heard it hear first. Perl 6 is viral.
15:41 DarkWolf84 hehe i read it allready
15:41 DarkWolf84 :)
15:45 pugs_svnbot r17249 | fglock++ | [kp6] subset types can be instantiated
15:45 pugs_svnbot diff: http://dev.pugscode.org/changeset/17249
15:45 lambdabot Title: Changeset 17249 - Pugs - Trac
15:45 elmex rofl
15:45 elmex bot-war
15:46 TimToady actually, it's coopetition
15:46 elmex automated messages should be a notice anyway
15:47 DarkWolf84 bot team work for mass flood :)
15:57 rlb3_work joined #perl6
15:58 TimToady j
15:58 TimToady k, even
16:02 gnuvince joined #perl6
16:06 pugs_svnbot r17250 | fglock++ | [kp6] grammar and AST for 'subset'
16:06 pugs_svnbot diff: http://dev.pugscode.org/changeset/17250
16:06 lambdabot Title: Changeset 17250 - Pugs - Trac
16:06 lihaitao joined #perl6
16:16 gnuvince @seen audreyt
16:16 lambdabot audreyt is in #perl6 and #haskell. I don't know when audreyt last spoke.
16:16 gnuvince left #perl6
16:27 TimToady is feather MIA?
16:30 fglock decommute &
16:31 moritz_ MIA?
16:31 pugs_svnbot r17251 | fglock++ | [kp6] initial commit of Visitor::Subset (untested)
16:31 pugs_svnbot diff: http://dev.pugscode.org/changeset/17251
16:31 lambdabot Title: Changeset 17251 - Pugs - Trac
16:31 fglock left #perl6
16:31 justatheory joined #perl6
16:32 [particle] i can't get the links for pugs/parrot changesets working today, so something is down
16:32 TimToady how is fglock checking things in then?  my checkins fail, and can't ping 193.200.132.135
16:33 kanru joined #perl6
16:33 kanru2 joined #perl6
16:34 TimToady moritz_: Missing In Action
16:34 moritz_ TimToady: must be a problem on your side
16:34 kanru2 changed the nick to kanru
16:35 moritz_ works on all of my hosts in three different networks
16:35 justatheory joined #perl6
16:35 tene-feather joined #perl6
16:36 * tene-feather waves at TimToady
16:36 TimToady hmm
16:36 moritz_ TimToady: did you try a traceroute?
16:38 TimToady good plan.  first 10 hops are fine, fails at so-7-0-0.mpr3.ams1.nl.above.net
16:38 TimToady so something's wonky in .nl I suspect
16:41 TimToady on the other hand, I get a similar problem somewhere else in my own ISP's net, so maybe there's some kind of widespread DNS flakiness, or maybe an attack of some sort
16:41 TimToady could be coincidence, I suppose
16:42 TimToady "Once is an accident, twice is a coincidence, three times is Enemy Action."
16:43 moritz_ four times is... a bug ;)
16:44 DarkWolf84 mp6 eats big amounts of memory
16:46 DarkWolf84 I think I found some errors in Prelude.pm
16:49 TimToady what kind of errors?
16:49 [particle] how might a p6 compiler introspect it's optimization level?
16:50 moritz_ in the kp6 prelude?
16:53 TimToady [particle]: presumably info like that gets stuffed into some $?OPTIMIZATION_LEVEL variable or other
16:53 TimToady or %?SWITCHES<O> maybe
16:53 [particle] okay, that's fine. i wondered if there was a general %?VAR for that stuff
16:54 TimToady nothing specced
16:54 TimToady other than the ? twigil part of it
16:54 DarkWolf84 why is that ; on the end of sub mach_type in captire class
16:54 [particle] okay. i'm looking into past/post optimization xfrms, and wondered if there was spec or prior art
16:55 [particle] i'll find a sane way of implementing it
16:56 TimToady uh, which Prelude.pm are you looking at?
16:57 TimToady [particle]: for problems like that, whatever one does, it'll always be wrong.  :)
16:59 [particle] i'll do my best :)
16:59 DarkWolf84 that at /v6/v6-KindaPerl6/lib5/KindaPerl6/Runtime/Perl6
17:00 DarkWolf84 oops
17:00 TimToady I don't see a mach_type at all in that file, but I can't svn up...
17:00 DarkWolf84 not in lib5
17:00 weinig joined #perl6
17:00 DarkWolf84 in lib
17:00 TimToady there either
17:00 moritz_ DarkWolf84: that's already compiled by mp6 - so if you found a bug there, it's either in lib or in the compiler
17:01 DarkWolf84 yes
17:01 DarkWolf84 the problem is in p6 version of prelude
17:02 * PerlJam is having problems connecting to feather too
17:02 PerlJam (this connection is via a round-a-bout set of logins)
17:03 PerlJam For me it dies just after so-7-0-0.mpr1.ams5.nl.above.net
17:05 DarkWolf84 the compiled file in /v6/v6-KindaPerl6/lib5/KindaPerl6/Runtime/Perl6/Prelude.pm ends with an error
17:06 fglock joined #perl6
17:06 moritz_ aye, it ends with ** * Syntax Error in sub ''
17:07 DarkWolf84 yes
17:08 DarkWolf84 that's why I checked the sorce file
17:08 * fglock backlogs
17:08 moritz_ fglock: just do a 'tail lib5/KindaPerl6/Runtime/Perl6/Prelude.pm'
17:09 moritz_ lib/KindaPerl6/Runtime/Perl6/Prelude.pm doesn't compile with kp6-perl5.pl
17:11 fglock ah, ok
17:12 fglock I was working on captures, and then had better to finish subsets first
17:12 fglock committing a fix...
17:13 pugs_svnbot r17252 | fglock++ | [kp6] temporary "fix" to Prelude.pm
17:13 pugs_svnbot diff: http://dev.pugscode.org/changeset/17252
17:13 lambdabot Title: Changeset 17252 - Pugs - Trac
17:20 kanru joined #perl6
17:21 DarkWolf84 yeah i got it
17:25 ask_ joined #perl6
17:25 DarkWolf84 I cant understand why is that ; in the end of sub mach_type
17:26 PerlJam DarkWolf84: pastebin the code for those that can't get to it.
17:27 DarkWolf84 it's just  };
17:27 DarkWolf84 Is that something specific for mp6
17:33 DarkWolf84 http://pastebin.com/d23208fb7
17:33 fglock DarkWolf84: it's a bug in kp6 grammar
17:34 fglock hmm - no, that bug is fixed - I'll remove the semicolon :)
17:35 DarkWolf84 ok
17:37 fglock Prelude.pm is written in kp6 (not mp6)
17:38 DarkWolf84 now it makes '>>>>>>> .r17252' at the end
17:38 pugs_svnbot r17253 | fglock++ | [kp6] Prelude - remove unnecessary ';' - DarkWolf84++
17:38 pugs_svnbot diff: http://dev.pugscode.org/changeset/17253
17:38 lambdabot Title: Changeset 17253 - Pugs - Trac
17:39 DarkWolf84 maybe that's a bug in kp6
17:39 fglock looking
17:39 weinig_ joined #perl6
17:40 fglock mine looks ok
17:40 fglock this looks like a diff output
17:41 DarkWolf84 ok
17:41 weinig_ changed the nick to weinig
17:41 DarkWolf84 maybe I have sync again
17:41 DarkWolf84 I have to*
17:47 fglock DarkWolf84: you may have a conflict, try 'revert'
17:50 DarkWolf84 fglock, I just made make clean in the v6-KindaPerl6 directory
17:50 Psyche^ joined #perl6
17:50 DarkWolf84 and svn update
17:51 DarkWolf84 last time there was conflict in Prelude.pm
17:52 DarkWolf84 I suppose all is fine now
17:58 ruz joined #perl6
17:59 pugs_svnbot r17254 | fglock++ | [kp6] examples/subset.pl compiles
17:59 pugs_svnbot diff: http://dev.pugscode.org/changeset/17254
17:59 lambdabot Title: Changeset 17254 - Pugs - Trac
18:06 Psyche^ changed the nick to Patterner
18:07 jisom joined #perl6
18:13 DarkWolf84 yes all is fine in my snapshot
18:27 dduncan joined #perl6
19:31 thoughtp1lice joined #perl6
19:32 weinig joined #perl6
19:33 RubberHound joined #perl6
19:33 RubberHound left #perl6
19:40 thoughtp1lice changed the nick to thoughtpolice
19:40 flokuehn joined #perl6
19:48 REPLeffect joined #perl6
19:49 thoughtp1lice joined #perl6
19:50 daxim_ changed the nick to daxim
19:51 meppl joined #perl6
20:01 weinig_ joined #perl6
20:08 thoughtpolice joined #perl6
20:13 BinGOs_ joined #perl6
20:13 BinGOs_ changed the nick to BinGOs
20:22 franck___ joined #perl6
20:46 fridim_ joined #perl6
20:58 weinig joined #perl6
21:06 IllvilJa joined #perl6
21:13 thoughtpolice joined #perl6
21:21 diakopter TimToady: did your routing heal?
21:32 TimToady only by going to work; my home site still can't get there.
21:32 TimToady wonder if it's some kind of blacklist gone awry
21:35 flokuehn joined #perl6
21:35 pugs_svnbot r17255 | lwall++ | [STD] complain on attempts to use p5-style /x regex modifiers
21:35 pugs_svnbot diff: http://dev.pugscode.org/changeset/17255
21:35 lambdabot Title: Changeset 17255 - Pugs - Trac
21:45 explorer joined #perl6
21:48 ruz joined #perl6
22:15 weinig joined #perl6
22:37 Caelum joined #perl6
22:39 weinig joined #perl6
22:44 lisppaste3 joined #perl6
22:46 fglock_ joined #perl6
22:47 Limbic_Region joined #perl6
23:08 Gothmog_ joined #perl6
23:08 ashleyb joined #perl6
23:08 dduncan left #perl6
23:21 weinig_ joined #perl6
23:25 fglock_ left #perl6
23:43 weinig_ changed the nick to weinig
23:59 Blwood joined #perl6

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

Perl 6 | Reference Documentation | Rakudo