6.2.3 is airborne! | pugscode.org <Overview Journal Logs> | pugs.kwiki.org
Set by autrijus on 12 May 2005.
svnbot6 r3483, eric256++ | Changed random number choices to ().pick and worked on some more object method calls 00:09
ninereasons when Pugs uses Parrot to evaluate a statement, I'm confused about the order in which things are done. 00:10
./pugs -BParrot -e ' say "a:{ my $s = 10; } a^:$s | b:{ $s=$s+1 ; $s;} b^:$s"'
a:11 a^:10 | b:11 b^:11
does that surprise anyone ?
how about this: 00:11
./pugs -BParrot -e ' say "a:{ my $s = 10; $s; } a^:$s | b:{ $s=$s+1 ; $s;} b^:$s"'
a:10 a^:10 | b:11 b^:11
wolverian that certainly looks broken. 00:12
(the first case.)
ninereasons I think I agree
(if I knew enough to agree)
wolverian although frankly, I don't know when interpolated closures are run wrt the interpolated variables
it could as well be meant to output a:10 a^:11 | b:11 b^:11 for all I know :) 00:13
vcv i wouldnt call it broken as much as not considered 00:14
ninereasons the thing is, vcv , I can't even imagine how the first case happens. 00:17
revdiablo did you guys see Limbic_Region's perl6 code contest at perlmonks? it really could use some loving attention: www.perlmonks.org/index.pl?node_id=458728 :)
broquaint Seen. Already. 00:18
mugwump laughs heartily at bleaklow.com/blog/images/p6_cover.gif 00:30
Khisanth mugwump: note the lack of dog body parts 00:36
mugwump or trees 00:38
ninereasons I might be the only person ever who's had occasion to want this : 01:06
sub infix:<=~>($lhs is rw,$rhs){ $lhs = $rhs ~ $lhs }
svnbot6 r3484, Stevan++ | Perl::MetaModel - Moved method invokation to the Meta::Method; eventually this will handle parameters too; also changed some Perl::* properties to use hierarchal types
ninereasons my $bab = 'a'; say $bab; $bab =~'b'; say $bab; $bab ~= 'b'; say $bab; 01:07
a
ba
bab
meppl guten nacht 01:15
good night
mugwump autrijus: can it be said that a package is a type? 01:51
I would have thought that a package is a namespace, a class is a type and a namespace, and a role can be used like a type and is also a namespace. 01:52
ingy++ # use pugs; pragma 01:56
broquaint What's a type if not a namespace? 02:01
mugwump what type is a namespace? 02:03
I see a namespace as more akin to a symbol, not a type 02:05
a convenient place to put symbols to refer to them, but nothing to do with the underlying type system 02:07
broquaint A namespace is where things live, which in perl6, is a package/module, right? A package/module name is also the type for associated objects, so the namespace also doubles as the type. I'm just saying that 'namespaces' can act like types. 02:09
mugwump yes. a namespace DOES type. ! ( namespace IS type ) 02:10
but, that namespace only DOES type if it is a Role or a Class.
hi putter 03:03
putter hi mugwump
re what is a type, some Snn says class, role, and subtype. but there are oddities. are hierarchical types a kind of subtype? dunno - have not looked closely. 03:08
pasteling "putter" at 66.30.119.55 pasted "Draft quickrefy thing on packages" (73 lines, 2K) at sial.org/pbot/10262 03:12
mugwump ah, yes, sub-type 03:23
subtypes are interesting because I don't think they're also namespaces..
putter yeah. each of the 3(4?) kinds has things it can participate in, and things which it cant. i started on the "terse description of everything" path because I didn't have a clear picture of it all. dont yet know what i dont know. (can enums inherit? can types be mutated at runtime? ...) 03:28
mugwump, have you seen any sign that types can be passed by reference? 03:31
mugwump I've seen the leading :: used 03:32
putter k
mugwump the answers are all to be found in the Haskell source, at least for the parts that pugs already implements.
esp. for the enum and type methods 03:33
putter ;) good thought.
mugwump eg, from the Set test suite
my $set = set(0, 1, 2, 3, $bob);
is($set.ref, ::Set, "set()");
putter ok, i suspect my plan is to do a "unified picture of how names are sucked in from other namespaces" (eg, import export is does mumble), and 03:36
then try to do a table of "all the things types participate in" vs "all the flavors of types". i may have to grok dispatch before doing the table. 03:38
but not tonight i think. 03:39
sound vaguely plausible? 03:40
mugwump I don't quite understand. Maybe I'll grok your meaning when I see the first parts of the picture 03:42
putter ok. yeah, this is the phase of things where descriptions of intent is indeciferable. ;) hopefully have a doc tomorrow. 03:43
s/where/where my/ 03:44
s/is/are/
sigh. good night.
mugwump 'night!
f0rth can I use next in while loop? seems not working 03:52
mugwump hmm, yes, how exactly do you write an enum type in Perl 6? 04:01
in Haskell it's, eg:
data Cxt = cxtItemAny | cxtSlurpyAny | CxtItem Type 04:02
type DayOfWeek ::= int enum 04:14
Ā«Sunday Monday Tuesday Wednesday Thursday Friday SaturdayĀ»;
yay!
mugwump wonders why A12 is more prescriptive than S12 in this respect 04:21
vcv freenode does not like me 04:51
eric256 wonders if freenode is a person, program, or other. lol
mugwump eric256, you're soaking in it! 04:52
vcv network maybe? ;) 04:58
eric256 and i still have no idea. lol
ohh the server. lol
Khisanth an irc network with an AI :) 05:02
eric256 @x -> $head,@list; would be cool. lol. ;) although almost completly uneeded. ;) 05:07
can i make my own @array.method? 05:16
mugwump eventually, you'll just be able to add it to the Array class 05:18
svnbot6 r3485, mugwump++ | CoƃĀ«rsion operators?
mugwump or via @array.ref.meta.addmethod()
eric256 extend class Array { ... } something like that? 05:19
mugwump I remember seeing such syntax
don't know what the details are like atm tho
eric256 hmmm just curious.
did error messages in pugs just recently start sucking more? 05:22
errors inside subs are like impossible to figure out
mugwump no, that is normal :) 05:23
eric256 and god help you if you are in a method inside a class ;)
not that i should whine since i don't know haskel and can't help ;(
svnbot6 r3486, mugwump++ | Rename Code to VCode, use enums types, use 'does' for 'derives'
r3487, mugwump++ | missed remove part of rename
eric256 isn't there an array method to get the length of the array? 05:28
Aankhen`` .elems?
+@array? 05:29
svnbot6 r3488, mugwump++ | Explorative Junctive type translation for Cxt type
eric256 thanks. +@array doesn't work... at least not as in 1.. +@array
Aankhen`` Ah.
eric256 hmmm 05:31
sub combinations (@list) { my $first = shift @list; }
gives me an error " Can't modify constant item: VUndef:"
kelan sub params are read-only by default 05:35
svnbot6 r3489, mugwump++ | More exploration of conversion of the Haskell pugs classes to Perl 6.
r3489, mugwump++ | Junctive Types do look like a promising way of converting Haskell code
r3489, mugwump++ | to Perl 6.
kelan you need to copy @list before shifting or mark it "is rw" (if pugs supports that yet)
eric256 sub (@list is rw) .... works yea!
kelan wow pugs rules 05:36
so many things implemented already
eric256 instead of bitching about error messages is there anyway for me to help improve them ?
kelan i don't have *any* pugs knowledge, so i can't help with that question 05:37
eric256 it was more a general question for anyone around not you specificaly ;
0\
:)
kelan ok:) well i'm out for tonight. later!
eric256 later and thanks 05:39
any math people out there? is there a way to tell if a certain bit is on in a number easily? i want to count by binary through and array and i just can't get my head around picking which array elements are on and which are off. 05:59
$num % ($i**2) seems like it might be right 06:00
mugwump $num & (1<<$i) is the normal idiom 06:04
bitwise & is ^& or +& in perl6 iirc 06:05
(1<<$i) is like (2**$i), give or take an off-by-one error 06:06
eric256 pugs -e"print (5 +& (2**$_)) for (1..4)" 06:07
prints 0400 .....
hmm never mind. i should have been doing 0.. not 1.. 06:09
svnbot6 r3490, mugwump++ | Added the usual properties to save iblech++ the hassle 06:23
eric256 svn bot seems a bit slow to pickup on updates lately 06:27
thanks for the help mugwump... it would appear that << isn't setup yet. 06:28
now if i could just make it @array.combinations i would be happy...oh and .pick_and_pop (splice randomly picked element out of array.) or maybe .shuffle.pop 06:30
svnbot6 r3491, eric256++ | Combinations based on binary counting example.
mugwump << might be called something else now ... check the bible 06:32
maybe +<<
eric256 i checked the quick ref... let me check the online docs
Aankhen`` goes out to eat lunch and then watch Episode III. 06:33
Late.r
s/\.r/r./
eric256 good movie. have a good lunch
mugwump & # weekend! 06:34
Khisanth +<< would be a bit confusing with the hyperops
eric256 +< apparently
mugwump ah
eric256 i wonder if 1+<$_ is better than 2**$i in some way? faster? 06:35
mugwump much :)
mugwump waves
06:35 castaway_ is now known as castaway 06:38 chady_ is now known as chady
eric256 hmm my combination sub takes forever on a 10 element array.../me is still looking for a parrot binary for windows ;( 06:39
i get 06:47
*** Cannot parse PGE:
*** Error: end of file
i'm not even sure what that is telling me
later 06:54
Gruber hmm 07:40
tobez@hrum src/pugs> ./pugs -e 'my $a = [=>] 1..10; say $a.perl'
pugs: src/Pugs/Prim.hs:977:16-36: Irrefutable pattern failed for pattern (Pugs.AST.Internals.VList [ks, vs])
svnbot6 r3492, autrijus++ | * add namespace quickref from putter 07:41
castaway whats [=>] ? 07:42
f0rth is this reasonable that the loop never stop? irc.csie.org:8888/103
Gruber castaway: a reduce version of => 07:43
castaway looks like scary voodoo :)
svnbot6 r3493, autrijus++ | * `next` now re-evaluates condition in `loop` constructs; 08:11
r3493, autrijus++ | forth++ for pointing out the bug.
r3494, autrijus++ | * Gruber reported that scalar refs to pairs was not 08:19
r3494, autrijus++ | pretty-printed correctly. Fixed.
f0rth found that problem because I am writing a stupid script zbwei.net/~forth/simple_template_engine.p6 08:27
rgs [rafael@grubert pugs]$ ./pugs -e 'say for qw(foo bar) x 3' 09:00
foo barfoo barfoo bar
that's probably a bug, no ?
Juerd No.
qw(foo bar) x 3 is one string: "foo barfoo barfoo bar"
castaway looks ok to me
Juerd For list element repetition, use xx, not x.
rgs aah. 09:01
Juerd rgs: With these things, something like say "[$_]" provides very valuable insight.
rgs I figured that out :p 09:02
f0rth will it be possible to have annotation(metadata?) for class? 09:36
svnbot6 r3495, iblech++ | Implemented min() and max() (work with and without a userspecified comparision 10:08
r3495, iblech++ | sub) and added more (successful! :)) tests for them.
r3496, iblech++ | EOLs at EOFs.
r3497, iblech++ | Unbreak p6explain and add some more ops to p6explain.dat.
r3498, iblech++ | Fixed a test of operator_overloading.t and added two more. 10:39
r3499, iblech++ | Made overload.t finish again (lives_ok {...}).
10:44 chady is now known as chady_
svnbot6 r3500, iblech++ | Added more tests to uniq.t. Damian's junction semantics are commented. 10:44
iblech r3500! :)
nothingmuch goes biking 11:13
or wait, that means motorcycle, right? in that case make that cycling, maybe?
svnbot6 r3501, iblech++ | uniq() implemented (with inplace syntax too), tests pass :) 12:03
Limbic_Region if someone wouldn't mind telling autrijus the bug he wanted me to write a minimal test case for was apparently magically fixed overnight 12:46
I can still write the test but likely whomever fixed the bug also wrote a test
iblech Do you refer to this while bug? 12:50
...or some other bug 12:51
Limbic_Region right 12:53
the while sort thingy
it apparently works now
I didn't have a chance to test it in the full application - but my minimal test case didn't exhibit the bug 12:54
I assume that means it is fixed
but I have a 4hr long marathon meeting in 5 minutes and have no time to do further testing
Juerd assumption is one of the greatest dangers to programming
Limbic_Region right - which is why I didn't let it go but made mention of it here 12:56
Limbic_Region wanders off to the meeting 12:58
Juerd nnunley: And that's why 'router' makes a bad hostname :)
(on the internet site) 12:59
(on the internet side)
argh.
nnunley Juerd: Heh. 13:03
svnbot6 r3502, Stevan++ | adding the Type Tree from Context.hs translated to perl6 using Tree.pm
r3503, Stevan++ | Perl::MetaModel - adding some Type signatures to Meta::Method
r3504, Stevan++ | Tree - adding Makefile.PL and better type sig for method
nnunley Juerd: Just NAT aliasing problems.
clkao giggles at nnunley 13:11
nnunley clkao: grins. 13:20
Aankh|Clone autrijus, you around? 13:45
13:45 Aankh|Clone is now known as Aankhen``
autrijus greetings! 15:01
Aankhen`` Hi autrijus. :-)
autrijus for some reason, I accidentally implemented this:
coro flipflop { my $i = 0; while 1 { yield ($i = 1-$i) } }
say flipflop(); # 1
say flipflop(); # 2
say flipflop(); # 1
say flipflop(); # 2
integral eww
autrijus now, do I commit or not :) 15:02
integral is in the group that hates hiding the coroutine state
autrijus integral: you can't return() from coro
and you can't yield from normal sub
integral oh, It's a cooperative thread?
autrijus so they are categorically different
integral ok, that's less evil :-)
autrijus you can think of it this way, yes
I think it's quite less evil :)
integral what happens when control gets to the end of the coro?
autrijus it resumes from the top 15:03
Aankhen`` autrijus >> Was there any progress on linking Parrot into Pugs on Windows?
autrijus Aankhen``: no, I had not investigated
integral ah, so why the loop? just s/my/state/ surely?
Aankhen`` Hrm.
autrijus integral: good point, surely
a sec
Aankhen`` There was one thing I think I realised last night right after I went off...
Odin- autrijus: Hmm. Isn't that a question for p6l? :>
Aankhen`` It seems to be looking for *.lib in the current directory, if I understand the command line correctly.
autrijus Odin-: it is :) 15:04
autrijus tries state() 15:05
Odin-: I just want something concrete to experiment with
all its tests should go to t/unspecced/ surely
x86 hmm
autrijus integral:
coro flipflop { state $i; yield ($i = 1-$i) }
it works!
integral++
Odin- autrijus: Hm. I get what you mean ... but putting it there is essentially an invitation to use...
autrijus Odin-: surely so 15:06
same as with ./method and friends
Odin- Hm. True.
iblech autrijus: But you could s/coro/sub/ and s/yield/return/ on your last example :)
autrijus iblech: this is an excellent excellent point :)
integral :-)
autrijus iblech: better suggestions?
fibonacci generator?
x86 is it possible to write an entire OS in Perl6 and compile it into Parrot bytecode, then bootstrap a machine to the Parrot VM and run your Parrot bytecode OS? 15:07
that would be sweet
autrijus x86: surely yes. then you'll want a Parrot Chip
Odin- x86: Kinda like a lisp machine?
;>
autrijus "if you want a Parrot Chip, ask Parrot's Chip"
integral just discovered that Xen abstracted the hardware, getting around the not-enough-drivers problem for hobby-OSes
PerlJam autrijus: he could just use a saved JITed version of the OS 15:08
iblech Hm... one could transcribe fib() using state and sub, too -- sth. along the lines of state ($cur_num, $last_num) etc. 15:09
integral you need something which has two states, ie two entry points
coro flip_flop { yield 1; yield 0 }
pasteling "Aankhen``" at 203.101.1.146 pasted "Output from `nmake unoptimized` -- is GHC looking for *.lib in .?" (40 lines, 2K) at sial.org/pbot/10273 15:11
PerlJam integral: now generalize that to N states :-)
integral my @coros = map -> $N { coro { map :{ yield $_ } 1..$N } }, 1..inf; 15:12
s:P5/\$_/$^n/
autrijus nice 15:13
Aankhen`` Bleh... space before colon...
autrijus just drop the colon
integral using yield deeply inside control structures like that is probably the most powerful way to use it :-)
PerlJam Aankhen``: space before colon will be the common case.
Aankhen`` PerlJam >> Ewww.
integral hmm, is that : wrong?
PerlJam integral: no, it's fine.
integral hmm, why do I need a :? 15:14
autrijus you don't... it's optional
integral ah, ok
Aankhen`` PerlJam >> Could you take a look at my first draft of docs/quickref/rules?
PerlJam you only need the : if you use map thusly: @foo.map:{...}
autrijus ok, weird weird coro landed.
PerlJam Aankhen``: sure, where is it?
Aankhen`` Can I DCC it to you?
PerlJam Aankhen``: you don't have commit privs to the pugs repo? 15:15
Aankhen`` Or e-mail or something...
I do.
PerlJam then commit it! :-)
Aankhen`` Bleh, I'm scared. :-P
autrijus Aankhen``: just commit...
Aankhen`` OK.
One sec.
autrijus it gets easier with practice
PerlJam Aankhen``: If you do something "wrong" then the rest of us can (and will) fix it.
autrijus ok... now I need to write to... p6l or p6c?
p6c probably 15:16
Aankhen`` Whaa? 15:17
svnbot6 r3505, iblech++ | * Added "or", "and", "err", "xor", and "nor" to the list of non-userdefined
r3505, iblech++ | "metareducible" ([...]) operators.
r3505, iblech++ | * unTODOed and unEVALed reduce.t. 15:18
r3505, iblech++ | * Usual svn properties added to ext/Perl-MetaModel/lib/Perl/TypeTree.pm.
r3506, autrijus++ | * Anonymous and named coro {...} with yield() landed. Highly experimental!
r3506, autrijus++ | (The semantics is burrowed from Coro::Cont from CPAN.)
Aankhen`` svn: Commit failed (details follow):
svn: 'C:/Development/pugs/docs/quickref/rules' is not under version control
autrijus Aankhen``: svn add docs/quickref/rules
Aankhen`` Ah, okay.
Aankhen`` blushes.
integral mmm, this coro is much, much nicer than Coro::Cont.
PerlJam Aankhen``: See? you needed the practice anyway :-)
autrijus integral: how so? 15:19
integral it's got syntax! :-) 15:20
autrijus lol
Aankhen`` Committed.
autrijus Aankhen++
Aankhen`` :-D
wolverian PerlJam: hmm. so, is the adverbial block :{} fine as the first argument to map? I thought the current signature system didn't support that.
iblech [BUG] my $x = coro {}; $x() hangs 15:22
integral that's not a bug...
iblech Not? 15:23
svnbot6 r3507, Aankhen++ | * First draft of docs/quickref/rules
integral there's a implicit loop around the coro's body
iblech Oh yes
Ok
integral you have to yield to switch between contexts/threads
PerlJam wolverian: Sure. the slurpy *& gets it whether it's the first or the Nth argument as long as it's adverbial.
wolverian PerlJam: ah, okay. 15:24
is there an adverbial *@?
wait, that's * %, isn't it. 15:25
integral ./pugs -e 'my @coros = map -> $N { coro { map :{ yield $_ } 1..$N } }, 1..10; for (1..10) { say join(" ", map :{ $_.() }, @coros) }' # hmm gives a cryptic error message
wolverian without the space. damn lag.
integral hmm, changing that last map to `map -> $c { $c.() }, @coros` fixes what ever the problem was 15:26
autrijus the $_ thing is a known bug 15:27
integral ah, ok
autrijus and I think I know why 15:28
fixing
integral autrijus++
wolverian (1..10).map:{ (1..$_).map:{ yield $_ } } ==> my @coros; say @coros.map:{ $_() }.join(" ") for 1..10;
forgot the 'coro' :) 15:29
integral eww. and you're mixing . with ==>
stevan autrijus: hello
wolverian what's wrong with that? it's consistent with the direction of the data flow
PerlJam Aankhen``: looks good. There's a few things I'm unsure about though. 15:30
integral wouldn't 1..10 ==> map:{ 1..$_ ==> map:{ yield $_} } ==> my @coros; be more consisitent?
autrijus greetings stevan
wolverian integral: they're equivalent when it comes to direction. 15:31
stevan autrijus: I have a question regarding splatty params, if you are not too busy :)
autrijus integral: I fixed your bug
stevan: sure
stevan pugs -e 'sub invoke ($f, *@args) { $f(*@args) }; say invoke(sub ($a, $b) { return "a: $a b: $b"}, 1, 2, 3)'
autrijus it looks weird!
integral sure, so isn't the argument purely on consistency?
stevan this prints "a: 1 2 3 b:"
should it not print "a: 1 b: 2" , or maybe even error?
Juerd seemed to think it should work
but I cannot track down anything definitive in the Synopsis 15:32
autrijus the * in caller position is nto well defined.
and is even less well implemented
integral hmm, can you say: join(" ", @coros>>.() ) ?
stevan autrijus: should I p6l it?
autrijus integral: eventually yes. but the order of evaluation is undefined
stevan: sure, I don't see why not
integral: try again with r3508
stevan ok
wolverian integral: I only wanted to be consistent about _direction_ :)
integral that's nice. Eliminates too much map 15:33
autrijus integral: also you can write $_()
integral: 15:34
my @coros = map -> $N { coro { yield $_ for 1..$N } }, 1..10;
for 1..10 { say "{ map { $_() }, @coros }" }
svnbot6 r3508, autrijus++ | * extract the function slot from App. This makes `$^c.()`
r3508, autrijus++ | work -- thanks for integral's report.
autrijus that's how I'd write it :)
integral++ # looks really nice 15:35
integral: I'll use yours as an example in my p6l post :)
or rather, p6c post.
integral autrijus++
hmm, I suppose you could do just the same with gather/take too
autrijus sure yes. 15:36
Aankhen`` PerlJam >> Thanks. :-)
Wanna discuss whatever you're unsure about?
autrijus timtowtdi etc.
integral but that doesn't allow you to do neat stuff in P6OE
autrijus P6OE?
integral POE for p6 presumably
autrijus ahh.
PerlJam Aankhen``: It's minor stuff. You say "POSIX character classes" and I'm not sure that those assertions have anything to do with POSIX. 15:37
Aankhen`` PerlJam >> I looked at `perldoc perlreref` and took the character classes from there. 15:38
PerlJam Aankhen``: and I'm not quite sure about your use of "let" but I'll need to re-read the AES to be sure.
Aankhen`` S05:
# As with temp variables, a hypothetical variable is set with the keyword let followed by binding or assignment of the desired value:
my $num;
/ (\d+) {let $num := $1} (<alpha>+)/
Hrm, that uses :=.
Apocalypse only uses =
. 15:39
(no update)
PerlJam Aankhen``: re posix, all I'm saying is that they may not correspond to the POSIX defs in perl6. So I don't think it's quite right to make the association
Aankhen`` Ah, okay.
Should it be changed to just "Character classes" then?
svnbot6 r3509, iblech++ | Added tests for coro (t/unspecced/coro.t).
PerlJam Aankhen``: I'd just lose the heading entirely and keep them all under "built-in assertions" 15:40
Aankhen`` Alright.
PerlJam oh, and modifiers "Must be placed at beginning of rule" isn't quite right either. 15:41
autrijus iblech++ # wow, fast.
PerlJam Aankhen``: hold on a sec, let me just commit my changes and you can update :-) 15:42
Aankhen`` A'right.
stevan autrijus: actually it looks as if * in the caller pos is speced 15:43
S03/List_flattening 15:44
It is used to "flatten" an array into a list, usually to allow the array's contents to be used as the arguments of a subroutine call. Note that those arguments still must comply with the subroutine's signature, but the presence of * defers that test until run time for that argument (and for any subsequent arguments)
autrijus stevan: ok, thanks a lot
stevan the example given is: my @args = (\@foo, @bar); push *@args;
autrijus please write tests according to that.
svnbot6 r3510, iblech++ | * Added info about $/[0], $/[1], etc. to Aankhen``++'s docs/quickref/rules.
r3510, iblech++ | * Added the usual svn properties to docs/quickref/rules.
stevan I will
autrijus (and :todo<bug> it for the time being) 15:45
stevan ok
t/subroutines/sub_arg_errors.t already has some in it
which I did last night
I will try to expand upon it though
autrijus hm, can somebody reply to Colon on p6c? :) 15:46
Colin, even
and point out we are not ponie-dev :)
I'll bbiab 15:50
svnbot6 r3511, duff++ | added some examples and did a little reformatting of docs/quickref/rules
autrijus PerlJam: oops, we have conflict. I tried to merge -- see if I missed anything 15:54
PerlJam autrijus: It's probably that bit at the beginning about numeric context
autrijus (nvm, I handled Colin)
stevan autrijus: I was just about to hit send :) 15:55
svnbot6 r3512, autrijus++ | * even more format fix for quickref
r3513, Stevan++ | Tests for *(splatty) in the caller position
Aankhen`` Heh, there goes the alignment of the character classes. 15:56
I think you clobbered some of iblech's changes.
BRB. 15:57
svnbot6 r3514, autrijus++ | * Colin reported that "pugs -h" did not suggest which 16:03
r3514, autrijus++ | backends to try -- added <Pugs Parrot Haskell>.
nothingmuch evening 16:12
theorbtwo Allo, nm. 16:13
nothingmuch does Tired;
svnbot6 r3515, iblech++ | Added more functions to fp.pm (with tests), particularly take(Int $n, Code &f). 16:14
r3516, iblech++ | Help.hs -- Add missing paren to the list of valid compiler backends.
autrijus iblech: &cdadar too? ;) 16:17
iblech *googles* no! ;) 16:18
We have [.[]] \@array, idx1, idx2, idx3, ... :)
nothingmuch autrijus: want to get that stuff done? 16:19
autrijus nothingmuch: sure! 16:20
nothingmuch okay, i'll go take a shower in a few minutes, and when I'm back maybe my brain will cool down to operating tempratures
autrijus cool 16:22
ingy autrijus: hi 16:25
svnbot6 r3517, Aankhen++ | Regression -- reapplying clobbered changes.
autrijus hi ingy
ingy++ # nice hack, that use pugs thing
ingy thanks 16:26
autrijus++ # nice Inline hack
autrijus it is particularly nice with coro :)
ingy let's just say you inspired me
autrijus: I do worry about a conflict with `man pugs` though 16:27
is there a `man pugs` ?
if not, I can change the doc to be the official pugs manpage instead of the doc for the silly pragma 16:28
autrijus nah. just SEE ALSO Perl6::Pugs 16:30
svnbot6 r3518, autrijus++ | * Inline::Pugs should recognise coro too
nothingmuch hola Justin 16:35
g1powermac hey there you are :-)
was looking for yor nickname ;-)
nothingmuch anyway, time for that shower
svnbot6 r3519, Aankhen++ | * small formatting changes, consistency changes, typo fix.
g1powermac anyway, you are welcome to join #clusterix if you like :-)
nothingmuch when I return i'll hop over 16:36
Aankhen`` BBL.
autrijus ingy: there is no pugs.pod installed... I don't think we need it now
nothingmuch ciao Aankhen``
g1powermac cya nothingmuch, I'll prolly be afk in a little bit as well 16:37
castaway Limbic! 16:39
(allo, rest ;)
Limbic_Region I was apparently disconnected during my 4 hr long (got out 20 minutes early) marathon meeting 16:40
ingy autrijus: ?
castaway wuzmnt me, honest 16:41
ingy pugs.pm is installing its pod. is that ok?
castaway whats a pugs.pm? 16:42
ingy btw, i like the idea of 'use xxx' as an Inline for-free thing
castaway: lib/pugs.pm
castaway can I have a one-line summary? 16:43
ingy inline pugs in Perl 5
use pugs;...;no pugs;...
castaway ah, squifty!
ingy a wrapper of autrijus Inline::Pugs
castaway very neat 16:44
revdiablo howdy Limbic_Region
Limbic_Region salutations revdiablo 16:45
I am going to try incorporating some of the ideas in the p6 challenge
revdiablo Limbic_Region: it's a shame your p6 post on pm didn't get very much response...
Limbic_Region was disapointed that so few people chimed in
yeah
but we can't win every battle
what is important is winning the war 16:46
revdiablo Limbic_Region: it seems people are still afraid and/or avoiding the perl6 posts
castaway thinks most people still dont yet care (much)
ingy there is a war?
castaway hopes not
Limbic_Region can't tell if ingy is serious or not
ingy about?
ingy is almost always serious 16:47
Limbic_Region oh
castaway refreshing
Limbic_Region well in that case "the war" is a figure of speech
I just meant that p6 advocacy in the big picture is what is important - not a single thread at a single forum 16:48
ingy aye
autrijus ingy: yeah, pugs.pm installing its pod is okay 16:50
ingy ok
autrijus nothingmuch: ping me when you're back 16:51
Limbic_Region autrijus - did you get the note about the bug that went away? 16:54
I developed a minimal test case per our discussion yesterday and it wasn't there
I presume someone fixed it (and hopefully added a test)
autrijus Limbic_Region: oh. so the bug is gone?
Limbic_Region afaict 16:55
I haven't had a chance to plug it into the bigger code piece to see if it also works there yet
4 hour long meetings suck
nothingmuch autrijus: actually, raincheck... I have to cook and get my sister washed up and in bed 17:02
with a story and all that it'll be another hour or so
autrijus nothingmuch: oh. ok. I'm not sure if I'll still be around. ping me at that time 17:04
nothingmuch okies 17:05
if not i'll start writing up what we've got in some nice format with pretty pictures
svnbot6 r3520, iblech++ | A bit more PODification of lib/Perl6/Pugs.pm to make it look nicer on 17:07
r3520, iblech++ | search.cpan.org.
r3521, iblech++ | Implemented &prefix:<[.[]]> and added a test for it (passes! :)).
autrijus oh wow. 17:08
iblech is going at great strides
iblech Yeah, I start to grok Haskell :)
iblech food &
wolverian what does &prefix:<[.[]]> do? 17:13
Limbic_Region autrijus - it is apparently some other problem being masked - it still doesn't work in the bigger application but it doesn't blow up either
looks like an infinite loop
no output at all
will see if I can reduce it
theorbtwo [.[]] \@array, (1,2,3,4) is equiv to... 17:14
\@array.[1].[2].[3].[4].
(Or, in p5ish, $array[1][2][3][4].) 17:15
autrijus iblech: hey, you duplicated the Syn "[]" :-/ 17:17
Limbic_Region rather likes @foo.map:{ ... } syntax 17:20
integral likes @foo ==> map:{ ... }
Limbic_Region pugs doesn't have any gather/take functionality right? 17:21
theorbtwo Not yet.
AFAIK, anyway. 17:22
Limbic_Region hmmm - a bug that was supposedly fixed is still breaking for me
svnbot6 r3522, autrijus++ | * reuse Eval's implementation for .[] and .{} 17:24
theorbtwo Somebody point out decent docs on gather/take? 17:26
I don't see them from [google://site:dev.perl.org gather take]
revdiablo theorbtwo: there's a mention in S06, I think. 17:28
hmm that's not it. 17:29
svnbot6 r3523, autrijus++ | * leo says string_to_cstring shall be used, not peek.
revdiablo theorbtwo: search.cpan.org/~ingy/Perl6-Bible-0..._Construct 17:32
Limbic_Region my brain is not functioning 17:36
apparently it decided to declare the weekend several hours early 17:37
Limbic_Region isn't overly optimistic about getting net access at home this weekend either
autrijus hm. 17:40
is there tests for gather/take? 17:41
ah, gather.t
revdiablo there are some tests in damian's Perl6::Gather module too, that might be appropriated 17:42
Limbic_Region there is also at least 1 example in the coroutine thread I started a while back 17:43
revdiablo the more I use it, even in non-working code, the more I like gather/take. it seems like a nice construct 17:44
autrijus ok then.
implementing
Limbic_Region revdiablo - admit it - you are lazy and being more lazy pleases you
revdiablo yay! autrijus++
Limbic_Region autrijus
plus plus even 17:45
revdiablo Limbic_Region: I can't deny it
nothingmuch is there a way to delazify gather/take?
autrijus strictify? 17:46
revdiablo @array = gather {}; ? I think it needs to be a binding assignment to be lazy. or maybe not... I dunno
autrijus I'm not sure if it needs to be lazy or not
nothingmuch to prompt the user
although admittedly gather { while(<>){ take($_) } is a pretty cool way
Limbic_Region I think it may or may not be lazy 17:47
Juerd doesn't understand how a lazy gather helps.
17:47 vcv-- is now known as vcv-
nothingmuch Juerd: there was a thread which illustrated that take is much like a yield 17:47
revdiablo A12 says "in a lazy context it might run as a coroutine"
Juerd Eek
Limbic_Region will look for the thread
Juerd That has serious implications for non-local variable accesses
nothingmuch Juerd: IMHO it has horrible implications for many things 17:48
but sometimes it can be useful
autrijus I'm of the opinion that gather is gather and coro is coro.
Juerd The less common occasion that it is really useful, you can easily write the coro yourself.
autrijus but it's just mho :)
nothingmuch true that 17:49
Juerd autrijus: oho, because it's mho too.
nothingmuch and mine, actually
iblech autrijus: re. bah :( But I think it was a good exercise nevertheless
Limbic_Region perlbot nopaste
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
Juerd I do wonder what lho is.
nothingmuch doesn't like lazyness at all, unless it's explicit
and lazyness is tricky on users
Juerd nothingmuch: Some laziness works well implicitly
pasteling "Limbic_Region" at 129.33.119.12 pasted "Lazy gather/take by Luke" (14 lines, 354B) at sial.org/pbot/10277
nothingmuch ranges etc are okay
Juerd nothingmuch: 1..10_000 doesn't depend on any state
Right.
nothingmuch but constructs are evil
Juerd Yes.
nothingmuch and assignment to an array from IO 17:50
Limbic_Region that paste was from the coroutine thread I started
nothingmuch and whatnot
Juerd Anything that evaluates an arbitrary expression *later* should be recogniseable as such.
nothingmuch true
iblech nothingmuch: [delazify gather] my @unlazy_array = **gather {...}
nothingmuch we'll have a cargo cult of 'assign with ** because it's better'
heh, =)
Juerd I'm very unsure about the merits of DEFAULT lazy IO. 17:51
I think it should be immediate by default
And lazy only if marked as such.
revdiablo as long as the lazy marker is fairly convenient
nothingmuch i think we should have a 'later { }' which is a type of closure
Juerd revdiablo: How about "lazy", which is like "list", but enables want.lazy as well.
nothingmuch that evaluates to the result of itself
Juerd my @foo = lazy gather { ... }; 17:52
nothingmuch and is indistinguishable from the outside
Juerd my @bar = lazy slurp '/etc/passwd';
And make sure lazy context is never the default.
nothingmuch yep 17:53
Juerd Who wants to bring this to p6l?
nothingmuch lazy { } in list context could be useful for some things
Juerd 'cause I don't
nothingmuch many have already
what's the point?
Juerd The introduction of a lazy *context* is new, I think
nothingmuch anyway, back to taking care of my sister
if there are no volunteers, i'll bring it up in 20 minutes
Juerd But I might be wrong.
iblech Juerd: my $lazy_var := new Proxy: FETCH => {...} is close, I think 17:54
nothingmuch new Proxy: FETCH is hard on newbies
and it's a hard thing that could be easy
17:54 g1powermac is now known as g1powermac_AFK
iblech Agreed 17:55
Juerd Laziness should indeed be made trivial to use, but hard to use accidentally.
nothingmuch okay, i'll write this stuff down and post in a few mins
Juerd Except in cases that cannot go terribly wrong. I.e. where the entire list does not depend on any outside state.
iblech Wasn't there a trait which could be used in sub signatures which put implicit curlies around its argument? Then one could easily write a sub lazy(Code &f is ___) { new Proxy: FETCH => { f() } } 17:56
autrijus ...done.
Juerd And even a gather can even be optimized to do that, IFF it accesses no outside variables.
autrijus hm, 12 minutes. not bad :)
Juerd wonders what autrijus has ...done.
autrijus Juerd: gather/take
Juerd autrijus: Oh, neat! 17:57
autrijus r3524
Limbic_Region laziness factor yet to be determined right?
autrijus it's strict.
Juerd autrijus: Then I can un-uglify matrix.p6 a little :)
revdiablo autrijus++ # again
autrijus (the way I like it. :))
for now, use an explicit coro if you desire laziness
the impl can change if there's a ruling :)
(as always.)
Limbic_Region thanks - plus plus - now off to YAM where the M is for meetings suck really bad on friday afternoons 17:59
autrijus "I must not attend meetings. Meetings are the mind killer. Meetings are the little-death that brings total obliteration. I will face my meeting. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the wasted time has gone there will be nothing. Only I will remain." 18:00
theorbtwo autrijus++ 18:04
svnbot6 r3524, autrijus++ | * gather/take.
r3525, autrijus++ | * fix test.
autrijus nested gather breaks... anyone wants to write a test to gather.t ? 18:05
(currently the inner take affects outer gather)
iblech Will do
autrijus danke
...fixed. 18:08
stevan: I think that's all the feature I will hack in for 6.2.3 -- of course iblech may still implement tons of stuff -- but ChangeLog can start now :) 18:11
svnbot6 r3526, autrijus++ | * inner take shall not affect outer gather.
autrijus iblech: &take clash with fp 18:12
iblech Hm, right. Suggestion for a new name? 18:13
autrijus replicateM ;)
(that's its haskell name)
j/k
iblech ok
Juerd iblech: re inner take test: make sure you test 3 levels as well as 2
iblech Juerd: Ok
svnbot6 r3527, iblech++ | fp -- fp::take clashes with builtin take -- rename to replicate 18:19
r3528, iblech++ | * Added tests for multi-level gather.
r3528, iblech++ | * unTODOed a test of reduce.t.
iblech BTW, we need a different name for Test::fail, too
autrijus why so? 18:20
iblech There's the builtin fail, too
nothingmuch because fail is a builtin
autrijus right.
so we define fail in the Test monad as a test failure...
...err, wrong language.
nothingmuch ok, here's my idea for the semantics 18:21
there are two forms:
lazy { }, which is like an anonymous sub
and lazy ... 18:22
which is a context modifier
they both have the same effect, but different syntax, depending on when it makes more sense
what it does is creates a coroutine
autrijus I think punning is verboten in perl6 :)
(eval {} vs eval ..., do {} vs do ..., etc)
nothingmuch whose value masquerades as it's return
autrijus: this is not like strings 18:23
lazy gather {} instead of lazy { gather { } }
anyway
any access to the return value invokes the coro
vcv- Will there be any way to define a function/keyboard/op that takes { }? like.. do_something { ... } 18:24
theorbtwo That's easy.
Just make it's first argument a Code.
iblech vcv-: Of course, sub do_something(Code &f) { f(...) }
nothingmuch list context lazy is even funkier
vcv- sweet
nothingmuch it's how generators are constructed
vcv- forgot about that. thanks :)
nothingmuch the special case is that the coro is reinvoked when an ungotten element is returned 18:25
gather's take exploits that by doing a yield when in lazy context 18:26
the range operator could be implemented as such:
sub &infix:<..> ($from is copy, $to) { lazy gather { while($from !~ $to) { take ($from++) } } } 18:27
this makes me think:
sub foo ($x, $y where { $y ~~ ref($x) }){ }; # is that how you accept two params of the same type? 18:28
autrijus I think it's
nothingmuch and how the hell will error messages look like when subtypes fail?
autrijus sub foo (::a $x, ::a $y) { ... } 18:29
but yours should work too
nothingmuch autrijus: without knowing the type in advance?
autrijus nothingmuch: right.
vcv- pardon my ignorance, but what is ::a for exactly?
autrijus vcv-: it's a type variable.
that part of perl6 is very underdocumented 18:30
vcv- Hm. like a template?
nothingmuch sub &infix:<..> ($from is copy where { $from.can("postfix:<++>") }, $to where { $to ~~ ref($from }){ ... }
vcv- or that you pass an actual type?
nothingmuch vcv-: you can pass an actual type
and we don't want no stinkin templates 18:31
vcv- heh.. i hate templates
nothingmuch we can just dispatch methods on the objects later
vcv- why ::a though
nothingmuch our type system is polymorphic enough that we don't need to generate methods that know about the types whenever they're used
vcv- is "a" a keyword?
nothingmuch and the correct type will be found
i don't know why '::a' specifically
but sub foo (Class $a) { } accepts one param named $a of class Class 18:32
autrijus vcv-: :: is like $
it's a sigil
$ denotes a Scalar
nothingmuch my $namespace = ::a;
autrijus @ denotes an Array
vcv- does it have to be ::a, or is the "a" irrelevant
autrijus :: denotes a type/namespace
nothingmuch that's an analogy that could work
autrijus it's irrelevant
you can write ::aoioihiohrehr
vcv- ok, thanks :) 18:33
nothingmuch anyway, does everyone think my summarized lazy semantics please them? can I post to p6l?
vcv- i know what $ @ and % mean :p
nothingmuch well, &foo means the function
my $function_ref = &foo;
without invoking it
and ::foo means a namespace
autrijus nothingmuch: I think list context is lazy by default, so I'm not sure what such a hinter will be for. 18:34
vcv- ok, namespaces. indeed.
nothingmuch in p5 strings can be namespaces
but without any magic
autrijus: we aim to change that
autrijus otoh, I can see "list' being strict and "lazy' being lazy.
vcv- my $function_ref = &foo.assuming(1,2);
im looking forward to using that
autrijus because that's lease surprise
(I think.)
but anyway go ahead and submit it
nothingmuch you can say 'my &curried = &foo.assuming(1,2); curried(3)'
vcv- i still havent figured out currying 100% 18:35
nothingmuch well, it's really simple, actually
cognominal print keys %::* # still broken
nothingmuch lets say foo accepts 3 positional params
the example above will put inside &curried a function that accepts one param 18:36
vcv- right. but what is the relevance of curried(3)
nothingmuch sort of like sub curried ($c){ my $a = 1; my $b = 2; foo($a, $b, $c) }
curried(3) puts 3 in c
$c
and calls foo with the 3 params
vcv- OH.. i totally misread that
i thought curried(3) was some sort of modifier and not the function call. oops! 18:37
nothingmuch ah
autrijus cognominal: is it %::* or %*:: ?
(both would be broken right now)
nothingmuch that was more of an example for sigil consistency
vcv- gotcha
nothingmuch my &curried =
autrijus (sigil invariance)++
(@{[$#{}}]})-- 18:38
nothingmuch yeah, those are aweful
vcv- ./ really grows on you.
cognominal autrijus: I was reading docs/quickref/namespace which speaks of %::* 18:39
autrijus indeed, indeed
vcv- it reminds me of scripting for irc (mIRC specifically, ick)
autrijus cognominal: hm. I think it's %*:: and %*P::
but I'm not 100% sure and I can't find a ref in Syns yet 18:40
cognominal anyway neither parses right now
autrijus cognominal: can you help to grep / p6l and write test for whatever the final form? :)
cognominal yes, if can figure it :)
autrijus cognominal++
iblech From S02: $::("*::$foo") # global $Foo -- although that's not %:: 18:41
autrijus iblech: interested in hacking in symbolic deref? :) 18:42
parse for sigil, "::", verbatimParens ruleExpression, then give it a Syn, that should be call 18:43
s/call/all/
actually, parens ruleExpression will do too
cognominal oh btw, can we stack OUTER:: ?
iblech I'll try :) 18:44
nothingmuch cognominal: in theory yes, as of 2 days ago (says nothing about today) - not yet in pugs
autrijus er, we can. 18:45
it looks like it sometimes miscalculates tho
pugs> { my $a = 1; { my $a; { my $a; say $OUTER::OUTER::OUTER::a }}}
1
tests welcome.
cognominal you amaze me. we will have a full ghc implementation (whatever that means) by the end of summer at this pace 18:46
autrijus full implementation of perl6 in ghc interpreted mode?
I doubt it, but that's only because of unspeccedness
cognominal so the "whatever that means" :)
autrijus we'll probably reach a point where pugs drives the missing specification, though :) 18:47
(as is the intention all along)
theorbtwo We're going to implement a full Glasgow Haskell Compiler? Nifty, considering I didn't know that was a goal.
cognominal in perl5, the implementation is the ultimate spec
autrijus theorbtwo: "in ghc"
cognominal: not so in p6... I think independent implementation backed up by acceptance test and shared libraries is Good Thing
it keeps people honest :) 18:48
implementors, inparticular.
nothingmuch autrijus: want to do internals chat?
theorbtwo autrijus: It was a joke.
cognominal yea, but the implementation is the ultimate test
autrijus nothingmuch: wow, you have time now?
nothingmuch yep
theorbtwo NM: Are you pouring these into something?
nothingmuch Juerd, iblech: sent to p6l
theorbtwo: not yet, i need a big picture 18:49
autrijus nothingmuch: sure, I can do so for a little while
nothingmuch: ask away
nothingmuch then I'll make it into pugs acropheosomething 02, with pretty diagrams
okay
VSubs
and 'builtins'
autrijus builtins are known as Prims.
short for primitives
nothingmuch how are they evaluated, from reduce down to apply, bindparams, etc 18:50
as I said, I know most of this already, but others may be interested
autrijus the definition of a Prim is some code that is not expressed as an Exp (i.e. Perl 6 AST).
but rather as something "internal" to the backend
nothingmuch that guy that asked to sit in isn't here... too bad
autrijus i.e. native haskell function, native parrot function, etc.
scook0? yeah
nothingmuch yup 18:51
autrijus so, VSub is known as VCode now
nothingmuch ah
autrijus to agree with its perl6 type
nothingmuch goody
it represents: closure, subroutine, method, block...
autrijus a VCode represents a closure. 18:52
its type denotes the flavour of the closure.
currently we have Method, Coroutine, Routine, Block, Prim
as the five flavours.
the subType of VCode affects how it is evaluated
subType == flavour
I wonder if we should switch to codeType etc. 18:53
but anyway.
keep the nomenclature for now
nothingmuch . o O ( /me ought to reread perlguts illustrated and steal some presentation ideas )
autrijus so, a closure closes over its creation environment
theorbtwo perlguts illustrated is quite nice.
autrijus that's subEnv
nothingmuch s/reread/reskim/
autrijus (it used to be subPad, but it's subEnv now.) 18:54
nothingmuch brb, getting paper + pencil
theorbtwo I wonder if there's a way to autogenerate, or semiautogenerate, that sort of diagram from the haskell source.
autrijus so everything is frozen at the time of creation of the closure
theorbtwo: there's some dot generators iirc
the things frozen including the lexical variable, the outer scope, everything 18:55
nothingmuch also got some olives
would you guys like a jar or two of wonderful olives at the hackathon?
theorbtwo (Black olives)++ 18:56
autrijus nothingmuch: should I go on?
nothingmuch theorbtwo: these are syrian ones
when are unnamed blocks "created"
autrijus: ofcourse
parse time?
autrijus at parse time they are created 18:57
but the subEnv and subCont slots are really populated at runtime
when they are evaluated
so it's a two-step thing
Syn "sub" handles the population.
nothingmuch a sub also has params 18:58
autrijus yes.
nothingmuch and optionally a binding (for .assuming)
autrijus Params is just list of Param
but that will change 18:59
nothingmuch a Param is either positional, or named, optional, has a type, etc
cognominal use Test; { my $a = 1; { my $a=2; { my $a=3; ok $a==3 ; ok $OUTER::a ==2; say $OUTER::OUTER::a } }}
ok 1
ok 2
2
nothingmuch to a Map of some sort?
cognominal weird
autrijus nothingmuch: right, keyed by zones and/or invocant level
cognominal that should say 1!!
autrijus cognominal: yeah.
nothingmuch: the simple list is not sufficient to handle
sub foo ($a : $b : $c : $d)
iblech autrijus: Ok, [$%@&]::(...) is parsed now, I think, and I gave it a Syn, so that ". $::('hi')" in interactive Pugs gives "Syn "::()" {'hi'}". What next? :) 19:00
autrijus nor can it detect bad mixed zones
iblech: ok. now handle Syn "::()" by evaluating the [exp]
iblech: and fromVal it into a str
theorbtwo Where are Syn "foo" handled?
autrijus theorbtwo: Eval.hs
iblech Ok
autrijus iblech: then look it up using (Var ...) reduction logic
presto!
I think I may even have a evalVar 19:01
but don't use that
use
(evalExp . Var) =<< fromVal =<< evalExp (head exps) 19:02
or something to that effect.
Limbic_Region where exps is short for explodes
autrijus right.
and eval is euphemism for evil
nothingmuch autrijus: how is junctive autothreading handled in sub application? 19:03
autrijus nothingmuch: it's all done in juncApply. 19:04
defined in Junc.hs
Limbic_Region should something like @array[ 2..5 ]<some_key> work?
autrijus where it analyses the inv/args
and if they are junctive, then autothread
Limbic_Region: highly doubt it
Limbic_Region me too 19:05
Limbic_Region wonders where rob (dragonchild) got the idea from
theorbtwo @array[2..5]<<<some_key> ?
Limbic_Region $score = 4 if @hand[0]<suit> ~~ all( @hand[1..3]<suit> ); # is the suggestion in question 19:06
well - except my client at the plus symbol
plusequal 4
nothingmuch how is autothreading actually implemented?
autrijus @hand[1..3]>>.<suit> 19:07
should probably work but doesn't now
Limbic_Region ok - so probably just an oversight
nothingmuch juncApply is given a function to call once for each combination of args?
autrijus nothingmuch: right.
nothingmuch and then it rewraps the return value as a function?
tr/f/j/
autrijus right.
theorbtwo $score = 4 if [==] @hand[0..4]>>.<suit> looks clearer to me.
Limbic_Region only it is supposed to be a plusequal theorbtwo ;-) 19:08
theorbtwo OTOH, I'm not sure if [==] @array will DTRT.
Oh, right.
Limbic_Region and that won't work either
nothingmuch ok, what's next?
autrijus theorbtwo: why not? :)
nothingmuch perhaps a quick skim of the way different types of Prims are implemented?
Limbic_Region you are testing the suit of the first card against all the suits of the next 3
autrijus [==] is valid and happy
nothingmuch e.g., most math are simple delegation to haskell ops
theorbtwo And it does 0 == 0 == 0, and not (0 == 0) == 0 ?
autrijus right.
Limbic_Region and == is not eqeq 19:09
theorbtwo Cool.
Oh.
autrijus [eq] then
works too
Limbic_Region ;-)
iblech autrijus: Yay! Compiles and works! :) Cleaning it up a bit and then committing...
autrijus iblech++ # nice
nothingmuch btw, can you do MMD on the context?
sub foo returns List { }; sub foo returns Scalar { };
Limbic_Region theorbtwo - I agree that it does look much nicer 19:10
autrijus iblech++ # demonstrating that the productivity is really not me, it's really Haskell :)
nothingmuch in theory
autrijus nothingmuch: you can. and pugs does that.
nothingmuch: and it's unspecced, or at least underspecced.
nothingmuch woot
Limbic_Region $score plus= 4 if [eq] @hand[0..3]>><suit>
iblech Haskell++ :)
cognominal notes that the log of #perl6 would overflows the disk of its ATARI ST1040 if he still had it
autrijus nothingmuch: it's line 893 Eval
nothingmuch nevermind that... skim Prim.hs ;-) 19:11
theorbtwo L_R -- I think there should be a . between the >> and the <. It might be optional, not sure.
autrijus probably not
the dot is optional only if preceded by quotelike.
Limbic_Region well - unless I get internet connectivity at home this weekend, I am not going to touch it until Monday anyway
hopefully >> will magically work in that case by then 19:12
autrijus nothingmuch: ok.
in Prim.hs we use a very crude way to manufacture the initial symbol table
that is global functions
in the form of initSyms
it will all go away at some point
replaced by proper perl6 style prototypes
nothingmuch is that the mess at the bottom? 19:13
autrijus yes.
basically, it counts the number of comma to guess at its arity
then it dispatch to op0..op4
based on that info 19:14
nothingmuch how does that get along with 'sub &infix:<...>' etc?
autrijus and it assume List always flattens and Array never do
it's a big mess.
in that large table there's a column for fixity
or rather, associativity 19:15
line 947 intuits the fixity from assoc.
nothingmuch okay
it generates things that look like VSubs that call the correct opN?
autrijus yup.
it does so by using the backdoor in Exp
that is the Prim form
which is the only form that takes function as its param 19:16
| Prim !([Val] -> Eval Val) -- ^ Primitive
nothingmuch what's !
autrijus basically, Prim represents a function that takes a list of arguments and eval something back
nothingmuch that's the first case of apply, right?
there's a comment in there, I remember very vividly
autrijus ! is means it's strict.
right.
nothingmuch okay 19:17
what do some typical implementations of Prims look like?
(please discuss casting to haskell types, implementations of IO prims, etc)
(more complicated primititives)
autrijus ok. casting to haskell types is trivial 19:18
it's fromVal
that's all :)
whatever type you want to get, just call fromVal.
nothingmuch and casting back to perl?
autrijus it's vCast.
vCast turns any haskell Value into a perl Val.
iblech: also, [,] is now parsed -- you can implement it too :)
(it calls &prefix:[,] as you'd expect)
nothingmuch these are polymorphic for both the context and the param, right?
autrijus yes. 19:19
the polymorphism is encapsuated in the type class Value.
nothingmuch ok, what next?
Corion nothingmuch: If you see this, can you look at datenzoo.de/pugs/win2k.html and tell me what I'm doing wrong? The CSS looks all weird (in FireFox), but your page looks good... 19:20
svnbot6 r3529, autrijus++ | * parse for [,] -- not evaluated yet
nothingmuch OO? Cont's? multiplicity? (async, coros)?
svnbot6 r3530, autrijus++ | * move comment to where they belong
Corion Oh - you're here.
autrijus nothingmuch: well, I can talk a bit about subCont :)
nothingmuch Corion: update Test::TAP::HTMLMatrix perhaps
we have proper inline css
iblech autrijus: Ok :)
Corion nothingmuch: I did so, and the CSS is inline. I think.
theorbtwo First, how do you die from a prim.
autrijus theorbtwo: oh. that.
Corion theorbtwo: raiseErr
autrijus fail "foo" 19:21
nothingmuch hmm, it looks good to me, that's odd
autrijus that's the canonical way now
Corion Ooops. Listen to autrijus :)
theorbtwo knew that, wanted it in the interview.
autrijus it used to be retError
that takes a string and a exp
and throw that exp away
which makes no sense
so it's fail"" now.
nothingmuch autrijus: whichever you prefer
theorbtwo changes an error to a fail in Pugs::Internals::openFile.
nothingmuch Corion: what exactly doesn't look right? 19:22
autrijus nothingmuch: I think I'd like to look at your draft and fill in the holes
meanwhile I need to 1)at least attempt a bit journaling and 2)sleep
nothingmuch autrijus: i have no draft, it's all on paper
but i'll start tonight
however, we have some big things left undiscussed
autrijus nothingmuch++
Corion nothingmuch: The borders are left-aligned, and the bars are not aligned anymore
autrijus right, so just mark them with questions
I can answer them in batch
nothingmuch oi
autrijus: ok, i'll try 19:23
but there'll be lots where i'll need to ask before I can organize the questions
Corion Ah - the "test file" column maybe became too small (FireFox 1.04) - but your page looks good ... Weird - maybe I should update T:T:HMx again ...
autrijus nothingmuch: sure, either mail to p6c or commit somewhere
nothingmuch okay
Corion Hmmm. No, is up to date.
nothingmuch: The file looks OK for you? 19:24
autrijus nothingmuch: eg. docs/02Design.pod
or .kwid or .html or .doc
whichever you prefer
nothingmuch autrijus: yeppers
i'll start with pod, since everyone can view that more easily than kwid
autrijus oh?
nothingmuch then i think we'll move to something more capable
autrijus <- uses Spork to view kwid
nothingmuch lol 19:25
autrijus but sure
either way is fine
nothingmuch i wish CamelBones' Shux would work
svnbot6 r3531, iblech++ | [$@%&]::(...) works :)
nothingmuch or that PerlDoc.app would be a bit more flexible
autrijus iblech++
that was quick.
nothingmuch maybe I should just write my own, with webkit view and a wrapper for Pod::Simple::HTML
iblech I'm sure you'd have done it faster :) 19:26
autrijus I'm less sure, but you can maintain that useful illusion :)
nothingmuch perlbot higest karma; # autrijus or iblech? dum dum dum!
perlbot highest karma
perlbot The top 5 karma entries: C: 327, autrijus: 304, iblech: 182, stevan: 111, nothingmuch: 68
nothingmuch holy crap, i'm still up there
wow
autrijus but we all know that C is the best. 19:27
nothingmuch =)
autrijus we need to compile to C-- real soon
because C-- is more compact than LLVM
and C-- is easier to target anyway
nothingmuch does C-- compile down to C?
autrijus yes, sure, C-- is designed to easily transform to C
perlbot: karma C 19:28
perlbot Karma for C: 322
nothingmuch what advantages does C-- give over, say, VMs like Parrot?
is C-- fast?
autrijus well, it doesn't require a VM, so it's likely to be faster
nothingmuch or is C-- just very easy to generate?
Corion nothingmuch: The CSS link is wrong and broken. Once I fix it, it all Just Works again. You are using a local link via File::URI, which does not work on the remote machine.
nothingmuch autrijus: s/it/C--/;
autrijus right
integral PIR surely doesn't require a VM either?
nothingmuch Corion: there should be no CSS file
autrijus integral: PIR assumes much more about its RTS 19:29
Corion nothingmuch: Hmmm...
autrijus so it's hard to imagine it without a VM
nothingmuch i wonder what triggerred that
autrijus unlike C-- which all the maintainence code can be inline
integral hmm!
nothingmuch there's a petal cond in there
Corion nothingmuch: Aaaah - I think what I stupidly did - I'm not using the main smokepugs.pl script ! Sorry !
(or at least I think I do)
nothingmuch can i see what you are using?
it doesn't make sense to emit both a link and a <style>
i'd like to debug it 19:30
i think we should start a C-- channel
and invite perlbot into there
and another bot will monitor karma C
ingy karma ingy
nothingmuch and C-- whenever it's out of balance
autrijus perlbot: karma ingy
perlbot Karma for ingy: 45
PerlJam or why not just make perlbot not ever increment the karma of C? (i.e. C++ will have no effect) 19:31
nothingmuch btw, with &infix:<> and all, is perl6 technically a meta language? 19:32
autrijus PerlJam: that would be too correct.
nothingmuch PerlJam: I just wanted to say C-- a couple of times
autrijus nothingmuch: metalanguage?
PerlJam nothingmuch: Well, what is C--?
autrijus it's turing-complete, if that's what you mean 19:33
PerlJam nothingmuch: And how can C-- improve my life?
nothingmuch you can read all about C-- by typing 'C--' in a google search box
PerlJam nothingmuch: How many more times do you think we should say C-- ?
nothingmuch or you can go to the C--
perlbot: karma C
perlbot Karma for C: 311
nothingmuch we need to say C-- 310 more times
c2.com/cgi/wiki?MetaLanguage 19:34
afaik a "meta language" is a language usable for creating a new language within itself
theorbtwo nothingmuch, searching for C-- won't be of much help, since google considers that as /c[^\w]{2}/i
Corion nothingmuch: No, I'm using the normal smoker script... Weird ...
nothingmuch www.cminusminus.org/
autrijus nothingmuch: oh, you mean it in an "easily definable DSL" way. 19:35
svnbot6 r3532, iblech++ | Add [,] (only *two lines* of code!).
autrijus in that sense, sure, you can even say perl6 is optimised to that.
nothingmuch Corion: hmmm... can you do a Data::Dumper of the visualizer with MaxDepth set to 1 or 2 (depending on how you call it) so that it's attributes are listed?
autrijus only they call it "adaptability" and "evolvability"
op1 "prefix:[,]" = return 19:36
iblech++ # cute
iblech :)
Corion nothingmuch: Where should I put that print Dumper()? In Testgraph.pl, after it loads the yaml ?
nothingmuch just before it's stringified
brb, tea
Limbic_Region revision 3495 - iblech ( Implemented min() and max() ) - where are these defined/spec'd? 19:37
oh wait
there was a reference in the test
groups.google.com/groups?selm=420DB...conway.org
iblech Yep, Damian stated they were in
Limbic_Region it just doesn't go to anything? 19:38
autrijus ajs_: S29 it?
autrijus praises the amazing technology that is URL
Limbic_Region I am more interested in userdefined part since I assume by default it only works in numerical context?
autrijus or really, anyone can commit to S29draft -- I'm sure ajs_ won't mind :)
Limbic_Region assumed that they wouldn't have been added if they weren't "in"
iblech Limbic_Region: The userdefined sub is the same as with sort(), i.e. returning one of -1,0,1 (I think) 19:40
Limbic_Region ok - so it could be $^a cmp $^b for instance
iblech Yep -- resulting in the (according to the Unicode codepoint order) lowest or highest string 19:41
Limbic_Region or even %month{ $^a } <=> %month{ $^b }
iblech Of course :)
autrijus $^fst $^snd # works too
Limbic_Region right
I am just questioning why have a max() min() at all then 19:42
pasteling "Corion" at 84.176.40.198 pasted "My Test::TAP::HTMLMatrix dump" (96 lines, 2.8K) at sial.org/pbot/10285
Limbic_Region and not just call it reduce
nothingmuch once again advocates $^former and $^latter due to their lexical order
Limbic_Region since that is what it is really doing
theorbtwo Using things longer then $^a and $^b really ruins the point, which is that they're short.
autrijus nothingmuch: $^arthur and $^zaphod 19:43
Limbic_Region $^a.chars <=> $^b.chars
Corion $^alpha and $^omega !
Limbic_Region can't believe no one has suggested $^foo and $^bar
autrijus because they sort wrong. 19:44
theorbtwo $^qux, $^quux, $^quuux, etc, sort correctly.
revdiablo $^bar would be the first arg, and $^foo the second, right?
autrijus $^A and $^ōæ½xF0ōæ½xAFōæ½xA8ōæ½x9D
nothingmuch revdiablo: yep
autrijus (first and last unicode isLetter)
Limbic_Region autrijus - depends on your definition of wrong
Corion Or maybe $^Ī¬ $^Ļ‰ :-) 19:45
Limbic_Region . o O ( ascending vs descending )
Khisanth Limbic_Region: wouldn't it have to be $^bar and $^foo?
autrijus $^begin $^end
$^head $^tail 19:46
$^init $^last
Corion $^birth $^death
Limbic_Region $^elvis $^lives 19:47
_metaperl are those auto-vivified scalars?
autrijus _metaperl: those are implicitly extracted to become the parameters
revdiablo (implicit parameters)++
autrijus for the enclosing block which must have no formal parameters
_metaperl -> $a, $b { BLOCK } 19:48
autrijus it's a neat linguistics hack.
_metaperl is not what you mean
that's something else I take it
autrijus { $^a <=> $^b }
-> $a, $b { $a <=> $b }
are the same.
_metaperl oh I see
nothingmuch does { $^a; for (@list){ warn if 19:49
PerlJam (implicit parameters)++
nothingmuch $^b ~~ $^a } }; # dwim?
well, actually i don't know what I mean
does the outer $^a make it look like for iterates $^b? or does for iterate $^a, $^b? 19:50
PerlJam nothingmuch: Then I'm sure that perl won't either and will tell you so . :)
autrijus nothingmuch: it iterates all implicit things.
nothingmuch: so the inner $^a masks the outer $^a
and that needs to be like that
otherwise all function calls are broken
theorbtwo $^foo always applies to the innermost possible set of curlies. 19:52
If you want anything more complicated, just do it explicitly.
autrijus right. it's intended to replaced the horrible atrocious kluge that is $a and $b 19:53
and not much more
although I suspect if there's no pointy form, people will abuse them.
@Larry++ # got this right 19:54
theorbtwo Well, not just the sort block, but any little block that should take params.
autrijus sure.
theorbtwo ...though I'm at the moment somewhat hard-pressed to... 19:55
Oh, for %hash.kv -> { say "$^k => $^v\n" } 19:56
...come up with another example. ;)
autrijus well, if I'm golfing
my @generators = map { $^N; coro { yield $_ for 0..$N } } 0..9;
is one char shorter than 19:57
my @generators = map -> $N { coro { yield $_ for 0..$N } } 0..9;
19:57 g1powermac_AFK is now known as g1powermac
autrijus ...but only if I can type ^N the perl5 way. 19:57
(probably not ;))
<- taken by the golf reflex
(fwiw, the "perl 5 way" means a single Ctrl-N) 19:58
nothingmuch wait, that works? 19:59
$^N causes an $N to be made?
autrijus nothingmuch: sure 20:01
what else would you expect?
nothingmuch i thought $^ was a magical sigil
that creates a var in $^ space
autrijus no
it never do such a thing
nothingmuch okay, so my example would work
except that it's just spelt differently: 20:02
autrijus yeah, if you drop the second ^
nothingmuch yep
PerlJam er ... what is the first mention of $^N supposed to do? 20:04
< autrijus> my @generators = map { $^N; coro { yield $_ for 0..$N } } 0..9;
integral "declare it" as belonging to that block...
PerlJam oh, never mind
yeah, I wasn't thinking.
autrijus it's nicer than the p5 idiom of 20:05
my $n = $_; ...
imho.
nothingmuch wonders how the fuck 4 got into has_inline_css 20:07
and why petal isn't an object 20:08
oh, crap
that's a phash
nothingmuch is used to working with blead perl, where that
'
s just a restricted hash
nothingmuch waits for Corion to return 20:09
ninereasons I remembered reading not long ago that pdcawley's dream app is a Perl 6 version of a method creator similar to Small Talk's "Refactoring Browser" 20:12
here's where he talks about that: xrl.us/f6jx
svnbot6 r3533, cognominal++ | r36@stefp: stef | 2005-05-20 22:07:16 +0200 20:13
r3533, cognominal++ | added tests four OUTER. one fails
ninereasons It seems to me that we're not far at all from being able to do that, in pugs, aren't we?
autrijus we are very close 20:14
I looked at HaRe
with its native vim support
I think we can steal them.
ninereasons exciting times. really.
autrijus =)
cognominal how come that my patches always come in two lines with svnbot6? 20:18
nothingmuch cognominal: because you need more karma
clkao because you use svk push
which means you deserve more karma 20:19
nothingmuch clkao++
cognominal clkao: is there any other way? I am clueless
20:19 sbkhh is now known as Odin-
clkao cognominal: if you don't like that line, you can use svk sm --verbatim -f . 20:20
nothingmuch darcs ;-)
clkao why type more and lose karma :p
cognominal :)
clkao sm --verbatin -f . -I actually
cognominal it is not a question of karma but of needless noise
iblech autrijus: $::(...)::(...) didn't work -- fixed and will add a test in a minute 20:21
clkao i know, we will have customisable per-command hook to adjust all this soon
autrijus --verbatim actually
ninereasons purl is really quite brilliant. I hadn't seen her before, until I joined #parrot 20:25
autrijus journal up. g'nite :)
ninereasons nite
nothingmuch ciao
cognominal purl, be rgs
ho, he is not on #perl6... 20:26
iblech nite
ninereasons no, not here, cognominal
efnet and irc.perl.net, I've heard 20:27
cognominal I always forget we are nor in irc.perl.net...
s/nor/not
svnbot6 r3534, iblech++ | * Fixed $::(...) so it understands $::some::("var")::($bar), too. 20:32
r3534, iblech++ | * Added tests for this (t/var/symbolic_deref.t).
r3535, ingy++ | pugs.pm 0.02
r3536, iblech++ | EOL at EOF and the usual svn properties added to
r3536, iblech++ | t/subroutines/splatty_in_caller_position.t.
theorbtwo wonders... 20:35
It'd be easy to hack some haskell to get pugs to tell me what sort of thing each character position is, and what matching characters are supposed to match where, and munge that, and the original file, back into colored HTML or whatever.
iblech Yeah! So userdefined ops etc. would be colored correctly! :) 20:37
Or things like use some_weird_grammar
theorbtwo I'd like to do that without hacking haskell -- be able to fully access the representation from within perl.
iblech The problem is though (but I'm partly guessing here), that Parsec, our parsing library, doesn't maintain such a representation -- look at the very first function definition of Parser.hs: 20:39
ruleProgram :: RuleParser Env
So the result is a Env, not some Position => Type hash 20:40
theorbtwo Hm, but I know we have the locations for error messages. 20:43
iblech Yeah, but as soon as a thing is sucessfully parsed, Parsec forgets about the things it's made up of 20:45
g1powermac nothingmuch: you around? There's been another battery recall for powerbooks: apple.slashdot.org/apple/05/05/20/1...&tid=3
iblech But maybe I'm wrong and there's a simple get_all_chars_and_their_types function :)
g1powermac nothingmuch: if ya could join #clusterix, that'd be great :_0
nothingmuch ours are all before that 20:46
cognominal theorbtwo, iblech, if you are interested, I have the mechanics to do dynamic higligthing 20:47
stefp.dyndns.org/add.html # click on the +, the *, or any of the operands
I am working to be able to edit with mozile too 20:48
theorbtwo Do you parse yourself, or get pugs to do it?
cognominal this was hand generated 20:49
just to proof the idea
but the idea is too generate with some parser 20:50
s/too/to/
mozile.mozdev.org/index.html 20:51
with mozille I could edit, with xmlhttprequest feed it to a parser, and get back the parsed html 20:52
so far I am stuck with mozile
but the author seems willing to help 20:53
with such dynamic highlighting, deep question about precedence will be a thing of the past 20:55
you click and you see
also getting all our code so highlight with link to the doc would be a great way to promote perl6 20:56
theorbtwo Aye. 20:57
We'd need better docs.
We need better docs anyway, though.
cognominal I will keep you posted about the progress on the mozile side
ho, I see on my apache logs, that many of you are mac jockeys... 20:58
nothingmuch what's the one day compilers link? 21:07
putter eeep! latenight irc draft lands in quickref/namespace. somewhat less buggy version uploading... 21:12
21:17 g1powermac is now known as g1powermac_AFK
svnbot6 r3537, putter++ | Edited quickref/namespace. 21:17
putter iblech: if/when you find bugs in it this evening i'd appreciate a ping... ;) tnx 21:20
iblech ok :)
putter thanks. 21:22
putter enjoys today's irc log...
iblech: what are "the usual svn properties"? 21:24
iblech putter:
svn propset svn:eol-style "native" foo # and
svn propset svn:mime-type "text/plain; charset=UTF-8" foo
putter ahh. is that doced in the source tree somewhere? 21:25
iblech I think not, but you're right, it should be 21:26
t/README maybe?
putter hmm. we don't really have a file for developers-but-not-users do we...?
iblech Not that I know 21:27
revdiablo isn't that usually called HACKING, or some such? 21:28
putter sounds plausible. "it should be in tree"+"it shouldnt be in README"+"there doesnt seem to be anywere else"./ 21:31
revdiablo++, iblech you or me? 21:32
putter putter says while still catching up on the log... ;)
iblech you -- I'm working on a hacky example of randomly overloading some operators *evilgrin* 21:33
stevan iblech++ # he's unstoppable :P
iblech :) 21:34
stevan iblech: I hope you classes are not suffering as bad as my $work :)
iblech :) Here are holidays currently :)
stevan ah
that is good
iblech: are going to the europe hackathon? 21:35
iblech Unfortunately not, misc reasons 21:36
stevan maybe you can make the Toronto one :)
putter ok
general reminder (re people missing discussions): the channel log is colabti.de/irclogger/irclogger_logs/perl6 21:37
stevan hey putter
I meant to read s12 more today
but $work has been suffering, so i needed to do that
putter hey stevan :) 21:38
work, yes. this is my weekend to get a usable resume draft written. sigh. 21:39
iblech putter: The colors of these logs suck, you may want to download the raw contents of those logs and run ./pugs examples/irclog2html.p6 log > nice.html :)
(With nice (dynamic) colors, proper alignment, etc.) 21:40
putter iblech: ooo, nifty. will try...
stevan: I was thinking I had started to get a handle on types... then I read in todays log that we have type variables (good) which I saw no sign of (oops). Back to the "library". 21:41
stevan putter: yes, thinks are quite in flux right now 21:42
putter: I am starting to worry that all this "type" business may make MMD difficult
putter iblech: irclog2html not working for me yet... but I'm still using an ancient (yesterday:) build. will up and retry. 21:46
re Colorizing p6... if only rules and parsetree was working...
iblech putter: Hm... It did work some days ago, but yes, currently it dies at runtime here, too 21:47
putter stevan: there is some nice theory for precomputing mmd, so hopefully it will just require a bit of work. 21:48
stevan hopefully
I like typing and I like MMD 21:49
I would not want to give up either :)
putter mmm, runtime changes to types... (though traits could require some tweaking to run at runtime...)
agreed.
theorbtwo We need dynamcisim to deal with "foo(Int $x where $x % 2)" 21:50
putter Is there a Prelude.p6 yet? There are starting to be things which could just as easily be implemented in p6 as hs...
stevan putter: not that I know of 21:51
putter theorbtwo: my fuzzy recollection is subtypes are only used to disambiguate candidate multis which otherwise match... 21:52
svnbot6 r3538, theorbtwo++ | More signatures. If I could fiture out a signature for mainCC in
r3538, theorbtwo++ | src/Pugs/Compile/Haskell.hs that doesn't make the compiler croak, we could
r3538, theorbtwo++ | turn off the option to not warn (and thus error, since we -Werror) on
r3538, theorbtwo++ | missing signatures.
putter s/match/tie/
theorbtwo (No, I didn't write the long description there just to karma-whore... with the emphasis on "just".) 21:53
stevan so you karma whoring was an afterthought :)
putter Ooo good sideeffect - encourages documentation. ;)
stevan or a fringe benefit :)
theorbtwo It's somewhat more likely that somebody will see the comment there and figure it out then if I just say it in here. 21:54
stevan more detailed SVN commits only make my ChangeLog job easier
so i am all for it 21:55
theorbtwo++
ninereasons p6l is sure one hoppin' place these days. 21:59
mrborisguy lots oe people here at least 22:00
haven't heard much chatter
PerlJam it comes and goes 22:01
stevan it is much more active then autrijus is awake
PerlJam several of the major players are sleeping
mrborisguy haha, okay, i see
i just downloaded haskel and got p6 installed today... so i'm new to all of this 22:02
iblech putter: I was to ping you if I found a bug
putter: so...
putter: ping
:)
svnbot6 r3539, duff++ | * Changed some wording and spacing of docs/quickref/rules
r3539, duff++ | * Added text about <?assertions> and the <-...> and <+...> forms of character class
stevan PerlJam: so what are you saying... we are all chumps :P
PerlJam stevan: no, just you ;-)
stevan :P 22:03
putter iblech: good! what is?
PerlJam mrborisguy: several of the major players *Aren't* sleeping too. See iblech and stevan.
stevan: better? :)
putter how about docs/dev/tips instead of ~/HACKING?
docs/dev/ would be new... 22:04
stevan putter: I think that is hiding it too much
putter docs/pugs_development/ ?
stevan HACKING is good IMO
revdiablo did something change in perl6 that this shouldn't work how I expect? pugs -e 'say $_ and say $_+1 for 1 .. 5'
mrborisguy PerlJam: noted.
iblech putter: Several -- BEGIN { exit } doesn't work, say "abc{ BEGIN { 3 } }def" doesn't either, my &infix:<z> = {...} doesn't. That was it, I think (committing tests for all of those in a minute)
PerlJam agrees with stevan FWIW
iblech agrees, too
revdiablo is the precedence of 'and' screwey? 22:05
putter oooh. bugs in implementation, rather than quickref/namespace still being... spacey.
stevan putter: was there a reason why HACKING was not okay?
iblech revdiablo: Seems to. Add parens around the first say $_ and it works...
revdiablo: Dunny why though 22:06
putter stevan: it just occured to me that there is nothing in docs/ which is pugs specific, and there might be more stuff (pretty pictures, etc).
Shillo Hullo, all!
stevan putter: I think nothingmuch will be putting the Achrophonisnansndhs 02 in there 22:07
hey Shillo
revdiablo iblech: maybe I should add a pugsbugs/ test?
iblech: or somewhere else better to put it?
iblech revdiablo: pugsbugs is the right location, I think
putter iblech: oh, but your bug list does invite attention... ;)
mrborisguy i've tried reading through some of the synopsises, exegesises, etc. is there a place where i should start to get some of the syntax down?
iblech ;)
Shillo Somebody mentioned on the list that he worked on control blocks (FIRST, NEXT, &co). I just made them parse (although I'm not sure what's the rigth thing to return from a stub).
stevan mrborisguy: there is a quickref somewhere 22:08
revdiablo iblech: ok, writing...
stevan and tests are also a good place ot start
mrborisguy: and there are several modules in ext/
Shillo Wonder who that was, so we coordinate.
mrborisguy reading through the tests you mean?
stevan mrborisguy: examples/ is also an excellent place
mrborisguy i'll try that
stevan mrborisguy: yes, although reading tests is not that exciting :)
mrborisguy i looked few a few of the examples, i'll keep mulling around in there then
stevan but they can be a good reference 22:09
stevan uses the tests for syntax reference all the time :)
mrborisguy but the quickref is in the p6 distrobution somewhere? i'll find it then
stevan docs/quickref maybe, I am not sure,..
there is also a perl6 cookbook in there too
one second lemme open the pugs project :)
so i can stop guessing :
mrborisguy haha, don't worry about it 22:10
i'll find them
putter stevan: re HACKING... README is (from irc) already not being read, and more top level clutter isnt going to help...:(
stevan mrborisguy: docs/quickref
putter s/not being/sometimes not being/
stevan putter: README is boring,.. HACKING is exciting :) 22:11
HACKME
putter :)
ninereasons I think that the tests are very educational.
stevan where is the perl6 cookbook? I cannot seem to find it
ninereasons examples 22:12
stevan :)
mrborisguy: examples/cookbook is a first draft of the perl6 cookbook
mrborisguy thanks! 22:13
ninereasons lots of cookbook work to do, still, mrborisguy
if you get the bug, you can help
stevan yes that is true ninereasons
mrborisguy i'll do my best!
i've still gotta get p6 on my main windows machine though
i was just playing around, and got it on my debian machine
putter stevan: I went with docs/development/ tips. i have a thing about top-level namespace clutter...;) 22:15
22:15 knewt_ is now known as knewt
stevan putter: I can respect that. I am a namespace nazi myself :) 22:15
putter :)
stevan I am actually thinking that Pugs is in need of some spring cleaning 22:16
theorbtwo So am I, stevan. 22:17
ninereasons fp.pm gets more cool by degrees each day
svnbot6 r3540, putter++ | Added docs/development/ and docs/development/tips.
stevan ninereasons: yes it does :)
I also think it might be time to start moving some ext/ modules to CPAN or something 22:18
theorbtwo wonders if he wants to hack the haskell to output some sort of description with Poses, or if he wants to hack the reflection to be able to do it from within perl code. 22:19
iblech Agreed, but there're two problems: 1. some examples/ may stop working out of the box (as $user hasn't some module installed) and 2. here and the Pugs svn repo there're much more people than on CPAN/FreePAN 22:20
putter: FYI, tests checked in 22:21
stevan iblech: good points
revdiablo now I wonder whether it really is and precedence, or something else. but I called the test 'and_precedence.t' ... I guess someone can rename it if they figure out what's really causing it 22:23
svnbot6 r3541, iblech++ | * Added &:: test (symbolic_deref.t) and my &infix:<...> test (operator_overloading.t).
r3541, iblech++ | * Added example for random operator overloading
r3541, iblech++ | (examples/obfu/random_operator_overloading.p6). While doing that, I noticed
r3541, iblech++ | several bugs:
r3541, iblech++ | * BEGIN { exit } doesn't work (tested now in t/pugsbugs/exit_in_begin.t).
r3541, iblech++ | * say "abc{ BEGIN {...} }def" doesn't work (tested now in
r3541, iblech++ | t/pugsbugs/begin_in_strings.t).
r3541, iblech++ | * my &::("infix:<baz>") doesn't work (added test to operator_overloading.t).
r3542, iblech++ | Moved operator_overloading.t to t/operators/.
r3543, revdiablo++ | bug with precedence of and, perhaps?
stevan now THATS karma whoring :P 22:24
iblech :D
ninereasons not that it matters, but maybe if the revision number has been seen, the incrementor could be skipped 22:25
stevan ninereasons: nah,... it's karma for writing long descriptions, which help me with my changelog 22:26
ninereasons it's all good then, :-)
stevan I *want* to encourage the behavior :)
iblech Thought that too, and it would be trivial to implement that, *but*: This'd destroy the vertical alignment
mrborisguy haha 22:27
stevan iblech++ # thinking about the aesthetic impact :)
theorbtwo iblech: you could put in __ instead of ++. They probably have the same visual width.
iblech And even if we s/++/ /, then the alignment is still b0rked on non-fixed fonts (and the webinterface of iblechbot uses proportional fonts, so...)
ninereasons maybe you could concatenate an incrementor per length($desc) 22:28
stevan ok, time for food,... later all &
svnbot6 r3544, putter++ | trivial tweak of quickref/rules.
ninereasons bon apetit
putter iblech: tnx
putter waves to stevan 22:30
iblech gonna sleep, cu :) 22:32
putter bye iblech 22:36
its time to pause when you typo "typo" "topo". 22:42
svnbot6 r3545, putter++ | comments on quickref/rules.
r3546, putter++ | topo
r3547, putter++ | more quickref/rules fiddling
r3548, iblech++ | Added the type signature theorbtwo++ wanted, I think.
mrborisguy reading through the cookbook, nearly right away the syntax my ( $var1,$var2 ) = <fox dog>; is used right away 22:53
is it just assumed that reader should know the <..> syntax?
revdiablo is the cookbook supposed to be for beginners? 22:55
mrborisguy (in 01-00introduction.p6)
revdiablo I always thought it was supposed to be good practices, whether they're friendly to beginners or not. 22:56
mrborisguy yeah, i'm not sure, that's why i'm asking
what assumptions are made about cookbook readers
revdiablo well, I could be wrong too. it's just what I thought... 22:57
Odin-LAP Well, what sort of assumptions does the P5 version make? 22:58
mrborisguy well i certainly have no clout around here... just thought i'd throw that out there from the beginner's point of view 22:59
i guess reading through more of it: from the point of view of new to perl in general, alot of this stuff would be awfully hard to understand for a beginner. coming from perl5, not bad though. so maybe the assumption is a little bit more than 'reader knows next to nothing' 23:02
svnbot6 r3549, putter++ | a last trivial tweak of quickref/rules
putter it's not karma whoring, just flakiness. 23:03
mrborisguy: fresh eyeballs are a useful resource. if you write down the parts you found puzzling, we could start a "hints for smoothly getting started" doc. even better, you could right now put it up on the wiki pugs.kwiki.org/ 23:05
oh, no you cant. the wiki is down. rsn though.
mrborisguy alright, i'll see what i can do 23:06
i'll probably just wait till the wiki is back up, and after i've read through a bunch more 23:11
theorbtwo G'night, all. 23:20
Shillo G'night, folks. 23:24
Juerd putter++ autrijus++ iblech++ aankhen++ duff++ kolibrie++ # quickref 23:29
Khisanth revdiablo: cookbook sounds like it should be more for at least moderately experienced people 23:36
revdiablo Khisanth: I agree
I think watering it down would detract from its usefulness 23:37
eric256 ++ from me to on that.. .my dumbed down stuff is just examples ;) cookbook should be working solutions to common problems 23:42
i thought gather was suppose to be lazy....how can you see that in action? 23:44
revdiablo eric256: it's not lazy yet, afaik, they still want to hash out the semantics on p6l 23:48
putter as of 17:57 it was strict
revdiablo "they" being the people who actually do stuff around here, as opposed to me. ;)
putter list is lazy though. sub *postfix:<...>($n){list $n..3000000000000000000000000} [3...][0..2] 23:49
eric256 didn't even know there was a list statment 23:50
revdiablo I like nothingmuch's idea for lazy {}
eric256 my @b = list 1...; # parses.... 23:51
@b[5]; # kills interactive pugs...
putter yeah, assignment to an @array seems to be forcing it. 23:52
eric256 how can you tell it is lazy if you don't assing it to an array? 23:53
putter oh, wait. your using an unmodified pugs. yes, ... is busted.
eric256 you modified your pugs to work?
putter not really. just the previous sub *postfix:<...> kludge. I wanted to see if something would start working if half bounded ranges did. 23:54
eric256 ohh. gotcha. 23:55
theorbtwo Back.
eric256 so just make sure you never accidentaly for @inf_lazy_list something or you will be waiting a long long time. ;)
theorbtwo Well, unless the body of the loop does something to end the loop early, which it is certianly free to do. 23:56
putter hears pugs asking, in a marvin android voice, "are you as bored with this loop as I am?" 23:57
actually, some languages readily handle the concept of "I expect to be done by foo. If I'm not, kick me." 23:59