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