svn switch --relocate svn.openfoundry.org/pugs svn.pugscode.org/pugs/ | run.pugscode.org | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com
Set by avar on 16 November 2006.
00:08 Kronuz left 00:20 nekokak joined 00:24 nekokak joined 01:10 diakopter joined 01:16 diakopter joined 01:35 buetow joined 01:59 bucky joined 02:18 avarab joined 02:20 stevan joined
upd :)) 02:52
03:08 weinig is now known as weinig|zZz 03:09 mako132_ joined
bucky heya upd.. are you the geologist? 03:13
03:24 bucky_ joined 03:32 Khisanth joined 03:36 lambdabot joined 03:53 justatheory joined 04:24 lambdabot joined 05:15 bucky joined 05:48 lisppaste3 joined 06:09 lambdabot joined 06:10 nipra joined 06:14 BooK_ joined 06:42 Pomin joined 07:34 masak joined 07:39 avarab is now known as avar 08:08 riffraff joined
riffraff hi 08:08
Tene hi 08:09
08:22 iblechbot joined 08:24 lyokato joined 08:37 avarab joined 08:46 avarab is now known as avar 09:13 agentzh joined
masak perlmonks.org/?node_id=592693 09:14
lambdabot Title: Ten Predictions for Perl in 2007
09:15 pstickne joined
agentzh Alias, audreyt: Pugs New Commit Curve for 2005: perlcabal.org/agent/svn-2005-all.gif 09:15
and also the one for the year 2006: perlcabal.org/agent/svn-2006-all.gif 09:16
masak agentzh: they look very similar 09:17
, up to and including year number
agentzh note that they're not accumulated results, so may be not so encouraging.
masak: oh sorry
my mistake...
fixing now 09:18
masak agentzh: np, just pointing it out
agentzh nice catch
thanks
fixed
it's fun to see the commit curves fit the corresponding #perl6 msg curves given here: 09:19
perlcabal.org/agent/irc-2005.gif
and perlcabal.org/agent/irc-2006.gif
i've tried very hard to make sure the data used are accurate. ;-) 09:20
masak also interesting is to note that the commit curves match my approximate memory of the activity over here
agentzh :) me too
09:21 drrho joined
masak i.e., highest during spring of 2005 and autumn 2006 09:21
agentzh nod
i'll try to plot curves for *accumulated* data for both the number of committers and the number of commits, so that audreyt can use them in her slides. :) 09:22
masak :) 09:23
agentzh the trick is that accumulated curves never go downward. :)
masak as long as the people who lie with statistics are on my side, I have no complaints 09:24
agentzh lol
these images are for my data-mining reports. school-- 09:25
to be honest, i'd rather study fglock's miniperl6 and work on the pugs test suite than draw silly pictures. :( 09:26
masak aye
09:26 avarab joined
agentzh got an exam in the evening. gotta run for supper & 09:27
masak agentzh: good luck on the exam
agentzh masak: thanks!
09:31 buubot joined 09:32 avarab_ joined 09:39 avarab_ is now known as avar 09:41 ruoso joined 09:42 andara joined 09:54 avar joined 09:55 avar joined 10:12 fglock joined 10:13 elmex joined
fglock the plan for intermediate-perl6 today is: everything is pluggable 10:15
starting with grammar, object system, and the workflow itself 10:16
10:31 BooK joined
Juerd Everything is pluggable in Perl 5 too. 10:38
It's hot plugging that's really neat :)
10:41 rjm joined, chris2 joined 10:57 rjm left
fglock Juerd: hot plugging - as long as I find out how :) 11:02
11:17 BooK_ joined
riffraff do we have math functions like pow() in pugs? 11:34
Tene ?eval 3**4 11:35
evalbot_r14991 81/1
Tene ?eval pow(3,4)
evalbot_r14991 Error: No compatible subroutine found: "&pow"
avar ?eval &infix:<**>(3,4) 11:36
evalbot_r14991 81/1
riffraff slaps forehead
of course ** I forgot about it
11:38 marmic joined 11:40 GabrielVieira joined 11:42 LeeD is now known as leed
gaal riffraff: src/Pugs/Prim.hs and src/perl6/Prelude.pm are your friends :-) 11:51
fglock is this the right way to modify the syntax lexically? my multi infix:<+> ... 11:54
gaal i believe so 11:55
fglock my macro ...
ok
riffraff gaal, thanks for the pointer :) 11:58
11:59 buetow joined 12:01 mj41 joined 12:20 buetow joined
fglock I'm looking for a name for a language between mini-perl6 and perl6 12:23
mp62
Tene kinda-perl6 12:24
fglock kp6 12:27
nice :)
12:28 ofer1 joined 12:33 TSa joined
gaal midi-perl6 :-p 12:38
12:39 nipra joined 12:41 GabrielVieira2 joined
riffraff the for loop as a way to choose a step size? or, possible there is a stepping(Seq,Int) function somewhere, or am I just stupid for thinking of this? 12:48
s/as/has/
Tene yes, there is a way 12:50
Tene checking 12:52
riffraff (suspance) 12:53
12:53 iblechbot joined
Tene Hmm. Looks like it's not implemented in pugs. 12:55
?eval 1..10:by(2) 12:56
evalbot_r14991 Error: ā¤Unexpected ":by"ā¤expecting "_", fraction, exponent, term postfix or operator
12:56 GabrielVieira joined
riffraff I see, it's ok 12:59
svnbot6 r14992 | fglock++ | kp6 - wishlist 13:04
pasteling "riffraff" at 83.187.202.204 pasted "naive prime test in perl6" (49 lines, 1.3K) at sial.org/pbot/22113 13:06
riffraff anyone wants to comment? trying to solve problem 31 of 99 problems, and I don't want to implement AKS, but this seems to ugly
13:09 kanru joined 13:12 miyagawa joined
masak riffraff: I'm thinking maybe remove the line return True if $num < 4; 13:14
riffraff it would not work I think 13:15
13:15 diakopte1 joined
masak no, I see that now 13:15
riffraff then I'd have to check explicitly for 2 and 3
masak at least for 2, yes
riffraff yup, for 2 and then 3 can be checked in the for
diakopte1 Dividable (sp) Divisible
masak for 3, the for loop is a no-op as of now
riffraff diakopte1, ah yep :) 13:16
masak sine floor(sqrt(3)) is 1
s/sine/since/
riffraff ah rthat should ceil
masak riffraff: I'd remove the evenness test and the 2,3-special case and start the for loop from 2 instead 13:17
that'd work, no?
riffraff mh.. no, it would go 2,4,6
masak riffraff: 'course. you're right 13:18
riffraff this thing is pesky
:)
masak couldn't you just do 2, 3..$max:by(2) ?
riffraff we just checked that :by(2) does not work it seem
otherwise I'd love to do that 13:19
masak riffraff: yes, but disregarding that for a while
oh, wait. it still doesn't work for checking two
I'm beginning to believe your code is the simplest 13:20
diakopte1 can you paste what you have now
riffraff diakopte1, is the same as above, just with ceil instead of floor and Divsible instyead of dividable 13:21
masak riffraff: I say keep :by(2) and have one of the lambdacamels implement it in pugs soonish
riffraff: why ceil instead of floor? 13:22
floor seems ok by me
diakopte1 you don't need the return False if $num % 2 == 0 line since you're already skipping every even number
riffraff diakopte1, yes, but than I'd get return True in the end after the loop 13:23
diakopte1 oh, I see
riffraff masak, I can0t exactly remember why I had that.. 13:24
masak riffraff: with ceil, you'd sometimes go one number past the square root
with floor, you sometimes stop on the number before
but only when the square root is non-integral, so it doesn't matter
I say go with floor 13:25
riffraff true 13:26
svnbot6 r14993 | fglock++ | kp6 - wishlist update 13:31
fglock kolibrie: re colabti.de/irclogger/irclogger_log/...=696#l1034 - mp6 is bootstrapped: the compiler, emitter, and grammar engine are written in mp6 13:33
lambdabot Title: #perl6 2007-01-03,Wed, tinyurl.com/y6wjfb
13:33 ruoso joined
kolibrie fglock: I thought you said you were attempting to bootstrap (a few days ago) and that it failed - what was that then? 13:39
fglock that was mp6-MO 13:40
which is now kp6
with a different internal architecture
kolibrie ahh
'k' means? 13:41
fglock it compiles with mp6, because kp6 is not bootstrapped
13:41 gnuvince joined
fglock 'Kinda' 13:41
kolibrie :)
fglock Tene++ 13:42
kolibrie and you are refactoring kp6 to make it more modern?
fglock I still can't find out what they mean by 'modern' :) 13:43
the workflow is pluggable, so it modern-able
svnbot6 r14994 | gabriele++ | prob#31 solved with naive primality test could use update when 1..n:by(s) is implemented
fglock s/it/it is/ 13:44
kolibrie it's like art history, they invent all these terms meaning the new thing, but then it only lasts a few years
oh, I tried to use /[:i ...]/ yesterday with PCR and it died 13:45
fglock I think it is parsed, but it is not implemented in the emitter 13:46
13:47 weinig|zZz is now known as weinig
kolibrie I think it was the emitter that gave up the ghost 13:47
fglock it would be nice to have a rewrite of PCR to plain P6 (already started as the MP6 grammar engine) 13:48
kolibrie that's why I looked at mp6 initially, but without inheritance, I had to go back to PCR 13:49
I suppose I can upgrade whenever kp6 is ready 13:50
my p6 grammar stuff is installed and goes live (today?) 13:51
fglock it would be easy to hack inheritance to mp6
but that would encourage people to contribute to a temporary step, instead of the main project 13:52
kolibrie does not want to slow down the main project
or have people get too dependant on a hacked version so that bugs become depended on 13:53
leed Is C<my constant int $foo;> or C<my int $foo is readonly;> implemented in Pugs? 13:54
or not yet?
fglock mp6 was meant to provide the compiler to build p6-on-p6, so that we don't need to write it using perl5/parrot/haskell 13:55
of course we could have started with pugs, but mp6 is cool because it is bootstrapped
kolibrie likes writing in perl6 - he doesn't feel very adequate in the haskell world yet 13:56
fglock leed: you can try here using ?eval
?eval my int $foo = 2 13:57
evalbot_r14994 \2
fglock ?eval my constant int $foo = 2
evalbot_r14994 Error: ā¤Unexpected "int"ā¤expecting "(" 13:58
masak ?eval my $foo is ro 14:01
evalbot_r14994 \undef
masak ?eval my $foo is ro = 2
evalbot_r14994 \2
masak seems to work.
leed audreyt: Is C<my constant int $foo;> or C<my int $foo is readonly;> implemented in Pugs?
masak I'm still a bit uneasy over those references to constants, though
gaal leed: I think not. 14:02
masak leed: as you can see above, C<my $foo is ro> seems to work
at least syntactically 14:03
gaal ?eval my $foo is ro = 2; $foo++
evalbot_r14994 2
masak heh :)
gaal ?eval my $foo is ro = 2; ++$foo;
masak no error, though
evalbot_r14994 3
gaal it doesn't work.
masak it parses, but is a no-op
gaal it uses the old parser for vardecl though
the wonderful thing is that vardecl and function signatures have been unified 14:04
but that hasn't fully hit pugs yet
masak gaal: that sounds wonderful 14:13
is there anywhere I can read about that?
masak misses audreyt's blog entries
leed I just want to confirm. 14:18
Maybe it's a realy stupid question. 14:21
masak leed: probably not, always a good idea to check with audreyt 14:22
14:37 Gothmog_ joined 14:38 Gothmog_ joined
kolibrie leed: the way to check is find a test that tests what you are looking for, or write one, and then check the smoke logs 14:38
14:41 fglock joined 14:42 allbery_b joined
masak t/operators/range.t would probably be a good place for the test in this particular case 14:42
I don't see anything 'bout :by() in it 14:43
btw, will 'a'..'z':by(2) work?
masak guesses "yes"
riffraff It should, you can implement :by easily given an iteration routine, and range should always provide that I think 14:50
leed fglock: looks like C<my int $foo is readonly;> works, but C<my int ($foo, $foo2) is readonly;> not 14:51
fglock: OK, my revised question: Is C<my int ($foo, $foo2) is readonly;> implement in Pugs?
looks like C<readonly> in redeclare is no-op 14:55
anyway, thank you all
14:56 drbean joined 15:00 weinig is now known as weinig|bbl
leed masak: OK, but after I know enough about Pugs :-) 15:01
fglock leed: my int ($foo, $foo2) is readonly; - does not seem to be implemented 15:04
masak leed: not sure what that was a reply to, but I guess you're right :)
just dive in
riffraff to load a file foo.t that is in the same directory of bar.t what should I do? I think I should add the dirname of the file to @INC but I don't have a clue on how to do that 15:05
masak hm, seems that t/operators/adverbial_modifiers.t contains a lot of :by tests already 15:08
svnbot6 r14995 | masak++ | [t/operators/range.t]
r14995 | masak++ | * added test for :by
r14996 | masak++ | [t/operators/range.t] 15:11
r14996 | masak++ | * removed test and inserted reference to t/operators/adverbial_modifiers.t
riffraff where is something that tells how many tests are passing/failing ? 15:13
I mean, for the whole pugs codebase
masak you can run "make test"
riffraff eheh yah 15:14
I meant for the svn HEAD
[particle] smoke.pugscode.org
riffraff without me updating and recompiling which at the moment I can't do
ah thank you [particle]
masak is so used to constantly updating and recompiling that he sometimes forgets that not everyone does that :) 15:15
leed kolibrie: thanks, I'll check that 15:22
15:30 kanru joined
leed C<grep -nR readonly *> under pugs/t can't match what I want 15:31
maybe I use wrong pattern
kolibrie might be 'ro' instead of 'readonly' 15:34
or 'is ro' might be better
fgrep -R 'is ro' pugs/t 15:36
looks like t/syntax/signature.t has a little bit
leed kolibrie: thanks for your hint, but as fglock says, C<my int ($foo, $foo2) is ro = (1,2);> looks like doesn't implement yet 15:43
kolibrie leed: this is where patience comes in, or learning haskell 15:49
16:09 vel joined
masak always wanted to learn haskell 16:09
maybe it would be a good project to track the history of pugs, write an essay on its development, and learn a bit of haskell in the process
I mean, all the history is preserved in the svn repo
it's just a matter of digging
leed kolibrie: I'm learning Haskell right now 16:10
:-)
masak leed++ # for learning haskell 16:13
16:18 pdcawley joined
avar would much rather like a lisp like format in perl6 core rather than sprintf:) 16:24
16:25 weinig|bbl is now known as weinig
gnuvince print "foo~%" 16:28
16:29 kanru joined 16:36 vel joined 16:37 vel joined
avar ?eval "foo~%" 16:37
evalbot_r14996 "foo~\%"
16:40 weinig is now known as weinig|bbl 17:08 _bernhard joined 17:18 szabgab joined 17:26 buetow joined 17:27 buetow joined 17:34 kanru joined 17:43 justatheory joined 17:47 nipra joined 17:52 ruoso_ joined 17:59 vel joined 18:08 vel joined 18:26 hexmode joined 18:45 buetow joined
gaal masak: I think the Tokyo hackathon from 1yr ago was where it was specced 18:47
the good news is that the Signature parser already exists
?eval :(Int $x: $y? = 42) 18:48
evalbot_r14996 CCall "perl" CaptMeth {c_invocant = VPure (SigMethSingle {s_invocant = MkParam {p_variable = "$x", p_types = [(mkType "Int")], p_constraints = [], p_unpacking = Nothing, p_default = <ParamDefault:Nothing>, p_label = "x", p_slots = fromList [], p_hasAccess = AccessRO, p_isRef = False, p_isContext = False, p_isLazy = False}, s_requiredPositionalCount = 0, s_requiredNames = fromList [], s_positionalList = [MkParam {p_variable = "$y", p_types = [], p_
gaal behind th ugly dump lies a pretty powerful structure
18:51 ruoso_ is now known as ruoso 18:58 araujo joined
masak gaal: I believe you 19:04
quick question, though: are there not places where function signatures apply, but variable declarations don't?
I find it hard to believe that they are in all manners identical 19:05
19:05 wilx` is now known as wilx
TimToady if used in a non-declarative context the variable names are mere commentary. 19:07
19:08 thepler joined
TimToady alternately, we require the variables to be declared before that, and the sig only rebinds them. 19:09
I can argue that both ways.
19:10 Eidolos joined, TimToady joined
TimToady so "when :($a: $b, *@c)" would not create variables... 19:13
but "when my ($a: $b, *@c) would 19:14
if we consider "my Sig" to fall into the Signature category in the smartmatch table.
also availabe is "when -> $a, *@b {...} {...}" 19:15
where the variables would be bound in the first block but not the second.
that falls out of Code smartmatching 19:17
the second block wouldn't be executed unless the first returned true, however, by the current rules.
one would kinda like to have a form where the mere binding is the smartmatch success, and there's only the first block. 19:18
19:19 fglock joined
masak I somehow sense that this may have been an answer to my question 19:19
if so, I fail to apply it sufficiently to my worldview
a bit too abstract for me :/
maybe if I saw it in a piece of code, it would fall into place 19:20
but right now, I'm still wondering if var decl and sigs are not sufficiently different beasts
still, treating them as underlyingly the same intrigues me somehow 19:21
TimToady I see lots of value in the unification. What's not clear is what the failure modes are from the user point of view, and how appropriate error messages can keep that from being a problem. 19:22
"You didn't really declare $foo at line 42"
there's a similar problem with return type declarations: sub foo (Int $x, Int $y --> Int $z) 19:25
can the sub body then assign to $z? 19:26
instead of "my $result = ...; return $result"?
or is the "z" part merely commentary? 19:27
[particle] the perl 5 way would have probably been to allow both assigning to $z, and returning 19:28
gaal masak: first, think of the sig minilanguage as a nice way to spec that from here on you can call certain things by a name
19:29 justatheory_ joined
gaal give them default values or require someone else to tell you what their values are 19:29
when you have code that says "my $x = 42"
it's shorthand for "this is a my declaration using the sig :($x? = 42)" 19:30
[particle] TimToady: do p6 subs return the value of the last statement?
gaal (or is that spelled "$x = 42?" now? don't remember)
TimToady yes
gaal masak: so when eg you have something like my ($x!) := sub_returning_a_capture() 19:31
if the capture could not be used to bind $x, it's a failure
TimToady you don't need both ? and a default. ? stands for "= undef" more or less. 19:32
gaal oh, yes of course. 19:33
but if you want to put in the redundant ?, is it still before the = ?
TimToady before 19:34
gaal also: there is one proviso regradingthe sig<->vardecl unification, which is that sig params default to mandatory, and vardecls default to optional :)
masak gaal: yes. that's a semantic difference -- somehow I find them easy to swallow 19:35
it's the syntactic differences I'm worried about, for some reason
for example:
isn't it a convention that you have to explicitly give every parameter in a signature a type 19:36
gaal certianly not!
masak whereas in vardecls you can sometimes bunch several vars of the same type together?
gaal not in Perl anyway :)
the defualt is Any
masak something like int a, b, c;
gaal int $a, int $b, int $c in p6, but yes 19:37
TimToady or "my int ($a,$b,$c) = ..."
gaal if you don't give a type, it's like you said Any $x etc.
masak TimToady: yes. would that syntax work in a parameter list as well?
TimToady no
masak so they're not the same
TimToady well, not unless you're binding a single parameter 19:38
masak :)
TimToady that has parts
gaal oh right i forgot aobut the distribution there
masak it's stuff like this that worries me
TimToady and an int doesn't have parts.
masak places where the two beasts are different
TimToady so that's not a distributed type anyway.
masak on the whole, I'm all for it, however
TimToady sub visit ( Node $node ($left, $right) ) {...} 19:39
here the types of $left and $right are unspecified, not Node.
masak what are they? are they parts of $node?
or arguments to it?
19:40 diakopter joined
TimToady they're presumably parts of $node that you want to give names to 19:40
how it maps the names depends on the actual form of Node
masak does this have an equivalent in vardecl land? 19:41
TimToady S06:1187 "Unpacking tree node parameters"
yes 19:42
my Node $node ($left, $right) := makenode() should work the same.
masak cool
masak starts to see how this could actually be useful
but not everything carries over, right? 19:43
TimToady thing gets tricky with Sig literals though: :(Node $node ($left, $right))
masak f'rexample, using returns or -> Int $z wouldn't make much sense in var decls, no?
TimToady you can smartmatch against a Sig object, but that doesn't declare anything.
well, my Node $node is more or less equivalent to my $node --> Node 19:44
you can declare an "of" type either way 19:45
gaal masak: do you know any haskell?
19:45 penk joined
masak gaal: superficially 19:46
gaal it's like patmatch can occur in let-bindings
masak sucks on that one 19:47
ok
gaal node@(left, right) <- gimmieANode
19:47 polettix joined
TimToady MMD in Perl 6 is unordered, and you use a switch statement to do ordered matching against sigs. 19:48
but the idea is similar
gotto go get wet all over for a while & 19:49
will backlog for any additional Qs.
&
20:00 szabgab joined
szabgab ?eval my @a = (1) >>+<< (3); 20:00
evalbot_r14996 Error: Hyper OP only works on lists
szabgab why is this ? 20:01
?eval my @a = (1,2) >>+<< (3);
evalbot_r14996 [4, 5]
[particle] my @a = list (1) >>+<< (3);
?eval my @a = (1) >>+<< (3);
crap...
evalbot_r14996 Error: Hyper OP only works on lists
[particle] ?eval my @a = list (1) >>+<< (3);
evalbot_r14996 Error: Hyper OP only works on lists 20:02
szabgab ?eval my @a = list (1) >>+<< list (3);
evalbot_r14996 Error: Hyper OP only works on lists
[particle] ?eval my @a = list(1) >>+<< (3);
evalbot_r14996 Error: Hyper OP only works on lists
[particle] one more try...
?eval my @a = (1).list >>+<< (3);
evalbot_r14996 [4,]
szabgab nice, thanks 20:03
[particle] well, there's a way to enforce list context, at least
20:14 neonse joined 20:22 justatheory joined 20:26 devogon joined 20:50 weinig|bbl is now known as weinig 20:53 Alchemy joined 20:54 prism joined 20:59 Aankhen`` joined
wolverian TimToady, s,degenate,degenerate, # latest syn patch 20:59
21:01 GabrielVieira2 joined 21:10 Alias__ joined 21:11 Alias__ left 21:36 SCalimlim joined 22:19 diotalevi joined 22:35 weinig is now known as weinig|bbl 22:43 gnuvince joined 22:46 ingy joined 23:18 Psyche^ joined 23:27 Psyche^ is now known as Patterner 23:33 buetow joined 23:50 mr_ank joined