pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | <stevan> Moose... it's the new Camel ":P | .pmc == PPI source filters! Set by Alias_ on 16 March 2006. |
|||
svnbot6 | r10527 | lwall++ | Last array_cap test can't match C in $0; @bases only contains G, A, and T | 00:11 | |
TimToady | audreyt: speaking of which, I'm failing the last five tests of that file with an imcc error using embedded parrot. | 00:12 | |
which is why my smokes have five more failures than yours... | 00:13 | ||
00:29
elmex joined
00:42
rashakil__ joined,
Quellism joined
00:53
Ymmv joined
00:55
ludan joined
00:56
mako132_ joined
01:05
rashakil joined
|
|||
TimToady | audreyt: I'm beginning to think we've defaulted lvalues wrong in assignment parsing, and that only "obviously scalar" lvalues should default to scalar assignment parsing. | 01:37 | |
$a, @foo[1], @foo[$a], @foo[+expr] are fairly obviously scalar. | 01:39 | ||
01:39
Ymmv joined
|
|||
audreyt | well | 01:39 | |
that goes back to | 01:40 | ||
@foo[+func()] and %bar{~func()} | |||
lambdabot | Unknown command, try @list | ||
audreyt | and it must cascade, so @foo[@bar[1]] is scalar too | ||
TimToady | but in general the harm of accidentally guessing list is just a misparse in the presence of commas. | 01:41 | |
audreyt | yes. | ||
TimToady | and $a = 1, $b = 2 is about as complicated as it gets. | ||
audreyt | well, and also flattening. | ||
@foo[func()] = %blah; | 01:42 | ||
lambdabot | Unknown command, try @list | ||
audreyt | but I gree it seems saner than ($foo[1])= | ||
TimToady | well, sure, but I'd say that's obviously intended to be list. | ||
audreyt | I'd agree. | ||
TimToady | I keep wondering how often we'd have to explain why exactly lvalue subscripts default differently than rvalue. | 01:43 | |
audreyt | so, fix the S* yet again? it helps that this new default is easier to implement. | ||
right, because it agrees with rvalue. | |||
TimToady | So I'd even be inclined to say that nothing more complicated than $x gets scalar by default. | ||
audreyt | @foo[1] = func(); | 01:44 | |
lambdabot | Unknown command, try @list | ||
audreyt | I think 1 is as good as +1 | ||
and +1 needs to be scalar | 01:45 | ||
01:45
sri__ joined
|
|||
audreyt | forcing [+1] instead of [1] is, like, bad | 01:45 | |
TimToady | yeah... | ||
so basically we need a category "obviously scalar". I can argue the recursion either way. | 01:46 | ||
problem with recursion is @foo[@reallylongvariablename[$x]] tends to hide the scalaraness. | 01:47 | ||
the 2nd @ makes it look like a slice | |||
I think a very short list of scalars would be best, and no recursion. | 01:49 | ||
01:49
shachaf joined
|
|||
audreyt | otoh, @ary[%foo{$this}] is quite obviously scalar to me... | 01:49 | |
@ary[+%foo{$this}] is a bit weird | 01:50 | ||
lambdabot | Unknown command, try @list | ||
TimToady | yeah, and a lot of indirection in numeric programming... :/ | ||
audreyt | nod. | ||
I think recursion is a good idea for this.. | |||
TimToady | and @foo[+@bar[$x]] makes it look like you're asking for the len until you see the subscript | 01:51 | |
audreyt | indeed | ||
TimToady | okay, then yes on recursion, but still a very short list. | 01:52 | |
audreyt | but no peeking at return type of protos for funcalls. | ||
TimToady | right. | ||
audreyt | k. | ||
in that sense, + and ~ becomes metasyntactic | 01:53 | ||
[+...] and {~...} that is | |||
TimToady | [+...] | ||
*nod* | |||
reminds me of {|a|...} from Ruby. | |||
audreyt | *nod* | 01:54 | |
TimToady | 'course, it's not really, since [+$a and $b] | ||
audreyt | ok. I think I can get that into 6.2.12 if it's specced in time :) | ||
TimToady | did you see my carpage about array_cap.t? | 01:55 | |
audreyt | yes. | ||
TimToady | anything else you want last-minute speccage on? | ||
audreyt | couldn't get embedparrot going here | ||
so will look a bit later and/or switch to the old laptop | |||
well, nothing I can think of right now | 01:56 | ||
TimToady | btw has $x is just a lexically scoped alias for $!x, much like "our" | ||
so not visible in reopened class. | 01:57 | ||
audreyt | oh hm. | ||
class { has $!x; method m { $x } } | |||
kosher? | |||
TimToady | I don't think so. | ||
on the "our" principle | 01:58 | ||
audreyt | S12 line365 says otherwise | ||
TimToady | means you can force yourself to say $!x everywhere, which is arguably good | ||
yeah, hadn't thought of the our connection back then. | 01:59 | ||
audreyt | ok. aslong as there's away to force $x disambig | ||
and "has $.x" doesn;t' allow bare $x | |||
and neither does "has $!x" | |||
TimToady | right. | ||
audreyt | I think the "has $x" sugar is survivable | ||
cmarcelo | audreyt: when you have time, look at my messages when you were idle (I paste it if you need).. | 02:06 | |
audreyt | TimToady: btw, a syntactic question | 02:09 | |
cmarcelo: yes, I'm adding atomically{} to Pugs | |||
give me 5 mins, almost there | |||
TimToady: consider | 02:10 | ||
sub foo { | |||
is rw; | |||
} | |||
is this the same as "sub foo is rw" ? | |||
and if yes, I have another unification in mind :) | |||
cmarcelo | "atomically {}" as in STM? pugs interpreter already support atomic blocks? | 02:11 | |
audreyt | yes. | ||
cmarcelo | ps: prelude is working just fine here now... | 02:12 | |
audreyt | yay | ||
TimToady | what unification do you have in mind? | ||
audreyt | namely, have the | 02:13 | |
class { ... } | |||
form return something that is a genuine Code | |||
and unify the bareword-as-class detection by having | 02:14 | ||
class Foo { ... } | |||
install a &Foo that is the closure | |||
to be used as the coercer/constructor | |||
and have the "class Foo {...}" form return that thing as well | |||
this means Foo is always &Foo | |||
which returns ::Foo when called with null-dimension args | 02:15 | ||
and all "is ..." traits hang to the closest closure | |||
end of probably-insane idea. | |||
this is so that | |||
sub foo is atomic {...} | |||
and | |||
{ is atomic; ... } | |||
falls out automagically | |||
TimToady | have to think about it some. defined(Foo) and such | 02:16 | |
audreyt | *nod* | 02:17 | |
TimToady | can probably unify the syntax, just not sure about the semantics | 02:18 | |
{ is sig\(...); ... } for you Ruby lovers. | 02:19 | ||
well, that's really from Smalltalk | |||
merlyn | speaking of smalltalk, I'm reviewing Kent Beck "Smalltalk Best Practice Patterns" for use in an OOP talk, and I am reminded of just how darn *good* it is. Everything in that book should be easy to do in Perl6. And I mean that in both directions. :) | 02:20 | |
02:21
rashakil_ joined
02:31
justatheory joined
|
|||
audreyt | gaal++ # comp unit version field for bytecode | 02:41 | |
blib6/lib/*.yml is now obsolete again... please remove before making pugs (but the err msg this time aroudn is netter now) | |||
s/netter/better/ | |||
TimToady | okay, assignment is respecced. was it soon enough to get into .12? :) | 02:48 | |
audreyt | yes :) | 02:49 | |
TimToady++ | |||
TimToady | of course, I glossed over the question of "what is a literal?" | ||
audreyt | there's some pun involving "due respec" here but I can't quite see it... | 02:51 | |
oh btw | |||
[-1] should be fine too | 02:52 | ||
as is [-func()] | |||
TimToady | right | ||
I was also wondering about ? and !, but left them out | |||
audreyt | interestingly, that forces +int | 02:53 | |
though arguably int is more arrayish than +. | |||
but oh well. | |||
TimToady | yes | ||
Hmm. @foo[+$i++] is a bit ugly. | 02:54 | ||
merlyn | or even @foo[+++$i] | ||
TimToady | that wouldn't even parse right | ||
merlyn | @foo[+ ++$i] ? | ||
TimToady | maybe we should define it in terms of precedence | ||
lambdabot | Unknown command, try @list | ||
TimToady | that's what it'd have to be right now | 02:55 | |
audreyt | I like the prec idea. | 02:58 | |
TimToady | defining by precedence wouldn't be terribly clean either, since there are lots of tight operators that imply listiness, such as unary @ | ||
audreyt | in the symunary prec, we handpick "scalarish" things | ||
anything tighter than it is considered literal-scalarish | 02:59 | ||
then the nestedness follows from that as .[] is tighter | |||
though that doesn't quite apply to .(). oy. | 03:00 | ||
03:00
rdice joined
|
|||
TimToady | could drive it as low as additive, if we hand-unpick xx | 03:00 | |
could also say in the range from autoincrement to additive (with exceptions) | 03:02 | ||
but a little strange to disallow @foo[.chars] | |||
but we really can't allow general methods there if we don't allow general subs. | 03:04 | ||
so maybe we just fudge and say "scalar math and string operators". | 03:05 | ||
and maybe just unaries. | 03:06 | ||
audreyt | yeah. | 03:12 | |
03:12
glasser joined
|
|||
glasser | i am told that the lambdacamels know the secret of ghc under darwinports on osx intel | 03:13 | |
audreyt | there is no secret... | ||
pugs.blogs.com/pugs/2006/05/ghcmacintel_por.html | |||
glasser | in fact, i am told that you know the incantation, audrey :) | ||
audreyt | well I've made a bindist :) | 03:14 | |
clkao grins | |||
glasser | merci | ||
audreyt | np :) | ||
glasser | hmm, one could make a portfile that builds out of cvs head... | 03:15 | |
(like emacs-devel) | |||
03:16
coumbes joined
|
|||
audreyt | but you need a bindist to bootstrap, unless you are willing to wait 5hr for unregisterised stage1 | 03:16 | |
glasser | ah good point. (i think i was actually doing that on mac ppc) | ||
clkao so looking forward to hackathons | 03:17 | ||
glasser | oh, so once this is installed i'll be able to install it again via dp or something? | ||
clkao: i'm on for tuesday | |||
clkao | yay | ||
glasser | svk on afs it is | ||
(though i think i just missed ghudson today :) ) | |||
clkao | i managed to say hi before he fled | 03:18 | |
i think he stayed for less than 30min | |||
audreyt | glasser: once it's installed you can easily make form any ghc trunk checkout, yes | 03:22 | |
yay, it's done... bbiab | 03:27 | ||
svnbot6 | r10528 | audreyt++ | * Expose Software Transactional Memory to the userland. | ||
r10528 | audreyt++ | * Provisional (unspecced) syntax: | |||
r10528 | audreyt++ | my ($x, $y); | |||
r10528 | audreyt++ | async { | |||
r10528 | audreyt++ | atomically { | |||
r10528 | audreyt++ | $x = $y + 1; | |||
r10528 | audreyt++ | $y = $x + 1; | |||
r10528 | audreyt++ | } | |||
r10528 | audreyt++ | } for 1..5; | |||
r10528 | audreyt++ | say "($x, $y)" # Guaranteed to be (9, 10) | |||
r10528 | audreyt++ | * Bump CompUnit version to 2; existing .yml in blib6/lib and other | |||
r10528 | audreyt++ | places need to be removed. | |||
obra | hi gang | 03:31 | |
clkao | lo | ||
TimToady | howdy | 03:33 | |
?eval my $x = 0; my $y = 0; my @foo = ({ atomically { $x = $y + 1; $y = $x + 1; } }) xx 5; @foo>>.(); say "($x, $y)"; | 03:38 | ||
03:38
evalbot_10525 is now known as evalbot_10528
|
|||
evalbot_10528 | Error: unexpected ">" expecting "::", term postfix, comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | 03:38 | |
TimToady | ?eval my $x = 0; my $y = 0; my @foo = ({ atomically { $x = $y + 1; $y = $x + 1; } }) xx 5; @foo.>>.(); say "($x, $y)"; | ||
evalbot_10528 | Error: unexpected ">" expecting ".", subroutine name, array subscript, hash subscript or code subscript | ||
TimToady | ?eval my $x = 0; my $y = 0; my @foo = ({ atomically { $x = $y + 1; $y = $x + 1; } }) xx 5; @foo.Ā».(); say "($x, $y)"; | 03:39 | |
evalbot_10528 | Error: unexpected "\\" expecting ".", subroutine name, array subscript, hash subscript or code subscript | ||
TimToady | ?eval my $x = 0; my $y = 0; my @foo = ({ atomically { $x = $y + 1; $y = $x + 1; } }) xx 5; @fooĀ».(); say "($x, $y)"; | ||
evalbot_10528 | Error: Cannot cast from VList [VCode (MkCode {isMulti = False, subName = "<anon>", subType = SubBlock, subEnv = Just (MkEnv {envContext = CxtItem (mkType "Any"), envLValue = False, envLexical = MkPad (padToList [("$?1",[(<ref>,<ref>)]),("$_",[(<ref>,<ref>)]),("$__evalbot_print",[(<ref>,<ref>)]),("$code",[(<ref>,<ref>)]),("$lang",[(<ref>,<ref>)]),("$x",[(<ref>,<ref>)]),("$y",[(<ref>,<ref>)]),("&?BLOCK_EXIT",[(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>) | ||
TimToady | ?eval my $x = 0; my $y = 0; my @foo = ({ atomically { $x = $y + 1; $y = $x + 1; } },) xx 5; @fooĀ».(); say "($x, $y)"; | 03:40 | |
evalbot_10528 | Error: Cannot cast from VList [VCode (MkCode {isMulti = False, subName = "<anon>", subType = SubBlock, subEnv = Just (MkEnv {envContext = CxtSlurpy (mkType "Any"), envLValue = False, envLexical = MkPad (padToList [("$?1",[(<ref>,<ref>)]),("$_",[(<ref>,<ref>)]),("$__evalbot_print",[(<ref>,<ref>)]),("$code",[(<ref>,<ref>)]),("$lang",[(<ref>,<ref>)]),("$x",[(<ref>,<ref>)]),("$y",[(<ref>,<ref>)]),("&?BLOCK_EXIT",[(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref | ||
TimToady | ?eval my $x = 0; my $y = 0; my @foo = (sub () { atomically { $x = $y + 1; $y = $x + 1; } },) xx 5; @fooĀ».(); say "($x, $y)"; | 03:41 | |
evalbot_10528 | Error: Cannot cast from VList [VCode (MkCode {isMulti = False, subName = "<anon>", subType = SubRoutine, subEnv = Just (MkEnv {envContext = CxtSlurpy (mkType "Any"), envLValue = False, envLexical = MkPad (padToList [("$?1",[(<ref>,<ref>)]),("$_",[(<ref>,<ref>)]),("$__evalbot_print",[(<ref>,<ref>)]),("$code",[(<ref>,<ref>)]),("$lang",[(<ref>,<ref>)]),("$x",[(<ref>,<ref>)]),("$y",[(<ref>,<ref>)]),("&?BLOCK_EXIT",[(<ref>,<ref>),(<ref>,<ref>),(<ref>,<r | ||
TimToady | aah well, I'll stop wasting bandwidth. | ||
QtPlatypus | ?eval my $a = Bool::True | Bool::False; $a | 03:46 | |
evalbot_10528 | \(Bool::False | Bool::True) | ||
QtPlatypus | ?eval my $a = Bool::True | Bool::False; my $b = $a && not $a; $b | 03:47 | |
evalbot_10528 | \Bool::False | ||
TimToady | eek | 03:48 | |
Building Pugs-6.2.11... | |||
unknown RTS option: -N2 | |||
Build failed: 256 at util/build_pugs.pl line 96. | 03:49 | ||
make: *** [pugs] Error 2 | |||
that's after realclean... | 03:50 | ||
glasser | audreyt: durr, I'm dumb today... how do I actually install your bindist? | 03:56 | |
TimToady | also getting some: Unrecognised flags: -p when I reconfigure | 03:59 | |
TimToady wanders off to find some dinner. & | 04:00 | ||
04:04
Captain_Fourier joined
|
|||
Captain_Fourier | hello | 04:04 | |
audreyt | glasser: sh configure make make install etc | 04:08 | |
TimToady: fixed | |||
Captain_Fourier | hmm is perl6 out yet | 04:09 | |
or should i just play with pugs | |||
svnbot6 | r10529 | audreyt++ | * oops, left debug flags in | ||
audreyt | Captain_Fourier: you can also play with parrot if you are interested in VMs | 04:10 | |
svnbot6 | r10530 | audreyt++ | * older Cabals doesn't have -p. | ||
glasser | oh i see | 04:14 | |
bah, it installs, but it does not run, because i don't have libreadline where it wants it | 04:18 | ||
maybe i should have given some args to configure | |||
audreyt | mm | 04:21 | |
install libreadline5 via ports first | |||
Captain_Fourier | is there a good tutorial on pugs | 04:22 | |
audreyt | Captain_Fourier: svn.openfoundry.org/pugs/docs/articles/tpr.pod | ||
Captain_Fourier | thanks | ||
audreyt | np :) | 04:23 | |
Captain_Fourier | i read that using perldoc right? | 04:24 | |
audreyt | yes | ||
or pod2html | |||
Captain_Fourier | yum | 04:26 | |
04:28
mako132_ joined
|
|||
svnbot6 | r10531 | audreyt++ | * Pugs.Prim.Numeric: remove a defaulting warning. | 04:41 | |
audreyt goes back looking at HsJudy | 04:47 | ||
04:47
glasser joined
|
|||
svnbot6 | r10532 | audreyt++ | * Restore object finalization outside STM blocks. | 04:50 | |
r10532 | audreyt++ | * Relax Thread.yield() to be usable in atomic blocks. | |||
glasser | Oh wow, we've got STM in perl 6 now? | 04:54 | |
cmarcelo | audreyt: =) | 04:55 | |
glasser | What sorts of things can you put in an atomic block? | ||
audreyt | "safe" things | 04:57 | |
things that you can put into evalbot | |||
conceptually, things that only affects the memory, and can be cancelled. | |||
svnbot6 | r10533 | audreyt++ | * restore object destruction outside STM for real | 04:59 | |
audreyt | no "eval" currently as it conceptually invokes compiler | 05:00 | |
may be relaxed later | 05:01 | ||
try{} is fine though | |||
spinclad | audreyt, cmarcelo: sorry i've been away, and sorry for poor testing. | 05:09 | |
cmarcelo | spinclad: np.. did you see the test program I commited? | 05:10 | |
spinclad | not yet, will svn up first | ||
can take a quick look tonight and give more time to it tomorrow | 05:11 | ||
audreyt | spinclad: no prob, don't need to be sorry :) | ||
cmarcelo | spinclad: ok.. tks =) | 05:12 | |
audreyt | cmarcelo: ok. so for GHC, the two "10" are different heap objects | 05:17 | |
for both StablePtr and StableName purposes | 05:18 | ||
it seems that a general "Set" has to be implemented as JudyHS with StablePtr as value | 05:20 | ||
the BitSet itself is probbly only good for things that are isomorphic to Int32 | |||
05:23
khisanth_ joined
05:24
khisanth_ is now known as Khisanth
|
|||
cmarcelo | audreyt: so, with only StablePtr and StableName isn't possible to use Haskell values as indexes... or even worse, as the two 10's aren't the same heap obj, using them as index AND "guarding" them from the GC wouldn't be easy... | 05:27 | |
spinclad | i presume two refs to the same 10 will count as the same... | 05:28 | |
cmarcelo | audreyt: general "Set" => but using what to index.. didnt get it.. | 05:29 | |
audreyt | cmarcelo: use Storable image, or a custom-defined class | 05:30 | |
svnbot6 | r10534 | szabgab++ | examples/perldoc.p6 - naive perldoc reader | ||
r10534 | szabgab++ | -This line, and those below, will be ignored-- | |||
r10534 | szabgab++ | AM perldoc.p6 | |||
audreyt | give me a sec | ||
05:32
stevan__ is now known as stevan
|
|||
cmarcelo | spinclad: i think so, but sometimes he creates two "different" 10's then. in my test i explicit create a 10, and [1..10] creates another. | 05:32 | |
spinclad | 05:39 | ||
(oop) | |||
and each time you run that same [1..10], it's another | 05:40 | ||
or could be (thinking of maclisp smallnums and bignums) | 05:41 | ||
cmarcelo | audreyt: i'm reading Storable docs now.. Is it derivable? or the programmer must instance explicitly for each new type? | ||
spinclad: what do you mean? | 05:42 | ||
audreyt | cmarcelo: DrIFT and SerTH are possible directions | 05:45 | |
svnbot6 | r10535 | audreyt++ | * one possible way to encode haskell value into Value with Hashable | ||
audreyt | cmarcelo: Hashable is one possibility (just checked in) | ||
spinclad | smallnums XX fixnums up to some size fit in a pointer, so pointer identity was identity for them; larger fixnums and bignums could have multiple copies of the same value. | 05:48 | |
05:51
knewt joined
|
|||
audreyt | cmarcelo: also cf. www.eecs.tufts.edu/~rdocki01/docs/e...UniqueHash | 05:57 | |
we can reuse that definition | |||
so that toList is only possible on BitSet for ReversibleHash instances | 05:58 | ||
and generally you can only use get/set on them | |||
makes (some) sense? | 05:59 | ||
cmarcelo | audreyt: yes (i'm digesting all the info)... but, | 06:00 | |
(if "digesting" sounded odd, ignore hehe)... String isn't UniqueHashable, for example right? | |||
06:01
ayrnieu joined
|
|||
cmarcelo | or arbitrary integer.. in your instance for Hashable Integer, it "may" happen a collision? or i'm missing something? | 06:02 | |
audreyt | that would be correct, yes | 06:05 | |
actually, the classes in www.eecs.tufts.edu/~rdocki01/docs/e...index.html | 06:06 | ||
is a very good API design guide | |||
cmarcelo | audreyt: actually, thinking about it now, using StablePtr as Indexes forces the existence of Indexes objects in memory, and this isn't always necessary... | 06:07 | |
audreyt | StableName has no such problem | ||
also, if using StablePtr | 06:08 | ||
you can hook a Finalizer | |||
so that it's freed when the judy itself is freed | |||
BitSet roughly corresponds to www.eecs.tufts.edu/~rdocki01/docs/e...umSet.html | 06:09 | ||
I think we can safely demand Enum on a | |||
that solves the bijection problem | |||
unlike EnumSet, we are in IO, so maybe it's okay to allow IO too on to/from Enum conversions | 06:10 | ||
06:12
shachaf joined
|
|||
audreyt | class EnumIO a where | 06:12 | |
toEnumIO :: Int -> IO a | 06:13 | ||
fromEnum :: a -> IO Int | |||
instance Enum a => EnumIO a where | |||
toEnumIO = return . toEnum | |||
fromEnumIO = return . fromEnum | |||
that's one possibility. | 06:14 | ||
(s/fromEnum ::/fromEnumIO ::/) | |||
and then BitSet will demand EnumIO a | 06:15 | ||
cmarcelo | nice! well, I'll try to come up with a better BitSet2 (unifying it back to BitSet) using this classes. but this demands (Enum a), won't restrict BitSet scope too much? | ||
audreyt | and you can either derive Enum | ||
or write your own toEnumIO / fromEnumIO instances | |||
well, but that's all we can promise really | |||
we can go one step further and stub this definition of toEnumIO | |||
toEnumIO = fail "This is one-way hash, sorry" -- default implementation in EnumIO | 06:16 | ||
so that Integer can supply fromEnumIO as irreversible hash | |||
but toEnumIO and fromEnumIO are bad names. | |||
maybe hashIO and unhashIO separated to two classes | 06:17 | ||
and toList will demand the stronger class ReversibleHash | |||
which is a subclass of Hash | |||
anyway... you got the idea already. improvise :) | |||
maybe HashIO and ReversibleHashIO... | |||
cmarcelo | ok =).. | 06:18 | |
audreyt | cmarcelo++ | ||
brb | 06:20 | ||
spinclad | cmarcelo: yes, that looks strangely familiar :) | 06:21 | |
but /me has timed out for tonight... will debug tomorrow | 06:22 | ||
& | |||
cmarcelo | spinclad: bye! =) | ||
audreyt goes fixing the remaining 4 fails | |||
sleep(3) well, spinclad | 06:23 | ||
cmarcelo | @localtime audreyt | ||
lambdabot | Local time for audreyt is Sun Jun 4 08:23:27 2006 | ||
spinclad | .oO{ thanks ... ooh, look, shiny } | ||
audreyt | it's 2:23pm here | ||
cmarcelo | audreyt: is this correct? | ||
spinclad | @localtime cmarcelo | ||
lambdabot | Local time for cmarcelo is Sun Jun 4 03:23:58 | ||
audreyt | no; I'm using feather.perl6.nl | ||
spinclad | .oO{ 03:25... brazil? } | 06:25 | |
cmarcelo | audreyt: i'm going to sleep now, will try to get something commited before your next "wake cycle"... | ||
audreyt | cool | ||
cmarcelo++ | |||
cmarcelo | spinclad: yes =) | ||
fglock is brazilian too, right? | |||
spinclad | ys | ||
s//e/ | 06:26 | ||
audreyt | cmarcelo: once we got this working, I'll convert Pugs.Prim to use that instead of IntSet | ||
spinclad | also ruoso i seem to recall | ||
audreyt | since it's conceptually the same thign as a StateT IntSet | 06:27 | |
but I suspect much faster. we'll see if the FFI overhead is too high | |||
cmarcelo | YAPC::Brasil happened few weeks before I discover #perl6 I think... =P | ||
spinclad | .oO{ & } | ||
cmarcelo | audreyt: Pugs.Prim conversion => cool. | 06:29 | |
well. bye | |||
& | |||
06:29
cmarcelo left
|
|||
audreyt | spinclad: shut the computer down; it helps | 06:29 | |
06:30
iblechbot joined
06:36
Aankhen`` joined
|
|||
audreyt | bbiab | 06:37 | |
06:55
Captain_Fourier left
06:57
chihchun joined
08:01
penk joined
|
|||
svnbot6 | r10536 | audreyt++ | * shift-from-function-array-arg.t - mark as TODO; pending capturizing. | 08:04 | |
r10537 | audreyt++ | * slow-parse-fail.t: this is now 1)fast 2)passing | |||
r10538 | audreyt++ | * pair_boolean.t: revive this test; Pair objects are always true. | 08:10 | ||
r10539 | audreyt++ | * empty_list_in_map.t: fix plan | 08:14 | ||
r10538 | audreyt++ | * pair_boolean.t: revive this test; Pair objects are always true. | |||
08:14
chihchun joined
|
|||
svnbot6 | r10540 | audreyt++ | * "sub f (@x) {}" now causes the argument of f(...) to be evaluted | 08:16 | |
r10540 | audreyt++ | in item, not slurpy, context. This means f([1,2,3]) now works | |||
r10540 | audreyt++ | as specced. | |||
08:16
chihchun joined
08:34
andara joined
08:46
Odin- joined
08:51
Odin-LAP joined
09:16
evalbot_10528 is now known as evalbot_10540
|
|||
svnbot6 | r10541 | audreyt++ | * hash.t: Now that defaulting works the other way around, hashes | 09:26 | |
r10541 | audreyt++ | resume the bias-to-the-right behaviour, consistent with Perl 5: | |||
r10541 | audreyt++ | my %hash = (x => 1, x => 2); | |||
r10541 | audreyt++ | %hash<x>; # 2 | |||
r10542 | audreyt++ | * want.t: fix context expectation | 09:32 | ||
09:35
andara joined
|
|||
svnbot6 | r10543 | audreyt++ | * f(()) should pass &f an empty list, not "undef". | 09:47 | |
09:48
elmex joined
|
|||
svnbot6 | r10544 | audreyt++ | * subroutine.t: unTODO passing tests. | 09:48 | |
09:51
iblechbot joined
|
|||
svnbot6 | r10545 | audreyt++ | * splice.t: fix context expectations | 09:51 | |
r10546 | audreyt++ | * HTML::Entities - unTODO passing tests and chase for context changes | 09:54 | ||
r10547 | audreyt++ | * Perl6::Container::Array: adjust test TODOness | |||
10:01
vytautas joined
10:02
kanru joined
|
|||
svnbot6 | r10548 | audreyt++ | * unicode.t: "\xABCD" is unicode literals, not UTF8 codepoints! | 10:10 | |
r10549 | audreyt++ | * hyperop.t: fix test count | |||
r10550 | audreyt++ | * use_perl_6.t: fix test count | |||
r10551 | audreyt++ | * arith.t: fix test plan | |||
10:11
chris2 joined
|
|||
svnbot6 | r10552 | audreyt++ | * unTODO, fix test plan, etc. | 10:13 | |
10:13
ludan joined
10:32
nperez joined
|
|||
svnbot6 | r10553 | audreyt++ | * ext/Perl6-Grammar/: Makefile.PL. | 10:42 | |
r10553 | audreyt++ | * This module is somewhat duplicated with lrep's grammars, | |||
r10553 | audreyt++ | the .pg grammars in src/Pugs/Parser/, and Parrot/Perl6's grammars. | |||
r10553 | audreyt++ | Not sure what to do with it, but it passes tests, so it's still in. | |||
r10554 | audreyt++ | * yaml_harness: hand-adjust the first child to run 2/3 of | |||
r10554 | audreyt++ | other children, to balance against the fact that ext/ | |||
r10554 | audreyt++ | is more time-consuming. | |||
10:44
szbalint joined
|
|||
svnbot6 | r10555 | audreyt++ | * Set::Infinite: Fix inconsistent use of $.set and @.set. | 10:51 | |
andara | ?eval my $g=($x){return $x+1};my $f=sub ($n_,$f_) { return $f_($n_+1)} };say $f($n,$g); | 10:52 | |
svnbot6 | r10556 | audreyt++ | * Pugs.Eval: %.foo is now consitently a hash and never an array or otherwise. | ||
r10556 | audreyt++ | Ditto for @.foo. | |||
10:53
evalbot_10540 is now known as evalbot_10554
|
|||
evalbot_10554 | user error (incompatible version number for compilation unit) Error: unexpected "}" expecting comment, operator, ";" or end of input | 10:53 | |
andara | ?eval my $g=($x){return $x+1};my $f=sub ($n_,$f_) { return $f_($n_+1)} ;say $f($n,$g); | ||
10:53
evalbot_10554 is now known as evalbot_10555
|
|||
evalbot_10555 | Error: Undeclared variable: "$x" | 10:53 | |
andara | ?eval my $g=($x){return $x+1};my $f=sub ($n_,$f_) { return $f_($n_+1)} };say $f(5,$g); | ||
svnbot6 | r10557 | audreyt++ | * reverse.t: unTODO passing test. | ||
evalbot_10555 | Error: unexpected "}" expecting comment, operator, ";" or end of input | ||
andara | ?eval my $g=($x){return $x+1};my $f=sub ($n_,$f_) { return $f_($n_+1)} ;say $f(5,$g); | 10:54 | |
evalbot_10555 | Error: Undeclared variable: "$x" | ||
audreyt | you want "sub ($x)" | ||
or "$x->" | |||
andara | thanks! | ||
audreyt | er I mean "->$x" | 10:55 | |
andara | ?eval my $g=sub ($x){return $x+1};my $f=sub ($n_,$f_) { return $f_($n_+1)} ;say $f(5,$g); | ||
evalbot_10555 | OUTPUT[7 ] Bool::True | ||
andara | ?eval my $n=5;my $f=sub ($n_,$f_) { if($n_<2) { return 1} else {return $n_*$f_($n_-1)} };say $f($n,$f); | 10:56 | |
evalbot_10555 | Error: Undeclared variable: "$f_" | ||
audreyt | ?eval y $g = {$^x+1}; my $f = { $^f($^a_+1)}; $f(5,$g); | ||
evalbot_10555 | Error: No such method in class Any: "&y" | ||
audreyt | ?eval my $g = {$^x+1}; my $f = { $^f($^a_+1)}; $f(5,$g); | ||
evalbot_10555 | 7 | ||
andara | Does perl6 have recursive lambdas? | ||
audreyt | sure do | ||
andara | what's wrong with my code then? | 10:57 | |
audreyt | ?Eval { $_ ?? $_ * &?BLOCK($_-1) !! 1 }.(10) | ||
?eval { $_ ?? $_ * &?BLOCK($_-1) !! 1 }.(10) | |||
evalbot_10555 | 3628800 | ||
audreyt | ?eval my $n=5;my $f=sub ($n_, $f_) { if ($n_<2) { 1} else { $n_*$f_($n_-1, $f_)} }; say $f($n,$f); | 10:59 | |
evalbot_10555 | OUTPUT[120 ] Bool::True | ||
audreyt | andara: you didn't give the $f_() invocation its fixpoint | ||
so on the second time around $f_ wasn't bound | |||
$_f($n_-1, $f_), instead of $_f($n_-1) | |||
andara | stupid of me. thanks audrey | ||
audreyt | you can curry the $f_ using $f.assuming(f_ => $f_) | ||
also can ben written as $f.assuming(:$f_) | 11:00 | ||
andara | ?eval for 5 -> $n { for (sub ($n_,$f_) { if($n_<2) { return 1} else {return $n_*$f_($n_-1,$f_)} }) -> $f { say $f($n,$f) }}; | ||
11:00
evalbot_10555 is now known as evalbot_10557
|
|||
evalbot_10557 | Error: unexpected "$" expecting comment, operator or ")" | 11:00 | |
nperez | heh, spam on parrot rt | 11:04 | |
11:05
TimToady joined
|
|||
audreyt | yay, all tests passed for me. | 11:08 | |
audreyt dinner & | |||
andara | ?eval for 5 -> $n { for sub ($n_,$f_) { if($n_<2) { return 1} else {return $n_*$f_($n_-1,$f_)} } -> $f { say $f($n,$f) }} | 11:09 | |
evalbot_10557 | Error: unexpected "$" expecting comment, operator or ")" | ||
audreyt | andara: to play with \calculus, try this | 11:11 | |
?eval (-> $n { -> $f { say $f($n,$f) }.( sub ($n_,$f_) { if($n_<2) { return 1} else {return $n_*$f_($n_-1,$f_)} }) }).(5) | |||
evalbot_10557 | OUTPUT[120 ] Bool::True | ||
audreyt | or, with lexical shadowing | 11:12 | |
?eval (-> $n { -> $f { $f($n,$f) }.( -> $n, $f { $n<2 ?? 1 !! $n*$f($n-1,$f) }) }).(5) | |||
andara | so you use .() to pass the argument values, not for () | ||
evalbot_10557 | 120 | ||
audreyt | yeah. for is iterator | ||
andara | yes, but shouldn't it work on 1-elt lists like for 5-> ? | 11:13 | |
audreyt | ?eval for 5 -> $n { -> $f { $f($n,$f) }.( -> $n, $f { $n<2 ?? 1 !! $n*$f($n-1,$f) }) } | 11:14 | |
evalbot_10557 | undef | ||
audreyt | ?eval for 5 -> $n { -> $f { say $f($n,$f) }.( -> $n, $f { $n<2 ?? 1 !! $n*$f($n-1,$f) }) } | ||
evalbot_10557 | OUTPUT[120 ] undef | ||
audreyt | it's a parsebug, I think | 11:15 | |
andara | np. I like the .() notation fine, it's closer to \calc | 11:16 | |
audreyt | ?eval for 5 -> $n { for (-> $n, $f { $n < 2 ?? 1 !! $n*$f($n-1,$f) }) -> $f { say $f($n, $f) } } | ||
evalbot_10557 | OUTPUT[120 ] undef | ||
audreyt | actually it works | ||
you need the explicit () after the "for" | 11:17 | ||
otherwise | |||
for ... {} | |||
is always interpreted such that the {} is the loop body | |||
andara | couldn't have worked that out for myself. thanks a lot! | 11:18 | |
audreyt | no prob :) it helps to have an installed version of pugs that tells you which column offset the parsefail occurs | ||
:) | |||
andara | cheers | 11:21 | |
11:43
rindolf joined
|
|||
beppu | ?eval my $string = "hello"; $string =~ s:/hello/goodbye/; $string; | 11:49 | |
evalbot_10557 | Error: unexpected end of input expecting "\\", "$/", "$!" or ":" | ||
beppu | ?eval my $string = "hello"; | ||
evalbot_10557 | \"hello" | ||
QtPlatypus | ?eval my $string = "hello"; $string =~ s/hello/goodbye/; $string; | 11:50 | |
evalbot_10557 | \"<Subst>" | ||
prefiks | ?eval my $string = "hello"; $string ~~ s/hello/goodbye/; $string | 11:51 | |
evalbot_10557 | \"goodbye" | ||
beppu | prefiks: thank you!!! | ||
QtPlatypus | Can anyone explain what I did? | ||
prefiks | $a =~ $b == $a = $a ~ $b | 11:52 | |
11:52
neoesque joined
|
|||
beppu | what does the ~ operator do nowadays? | 11:52 | |
prefiks | string concatenation | 11:53 | |
11:53
rashakil joined
|
|||
beppu feels like such a noob. | 11:53 | ||
ayrnieu | ?eval [~] <a b c> | ||
evalbot_10557 | "abc" | ||
beppu | i see.... | ||
nperez | the whole angle brackets for literals throws me everytime i see it | ||
11:54
iblechbot joined
|
|||
beppu | I was too embarassed to ask how to do these basic things. ;) | 11:54 | |
QtPlatypus | I thouth that $a ~= $b == $a = $a ~ $b | ||
?eval my $a =1; $a += 2;$a | |||
nperez | ?eval $a ~= $b == $a = $a ~ $b | ||
evalbot_10557 | \3 | ||
Error: Undeclared variable: "$a" | |||
prefiks | hm... then =~ will assign + stringifaction ;) | 11:55 | |
QtPlatypus | ?eval my $a =1; $a =+ 2;$a | ||
evalbot_10557 | \2 | ||
QtPlatypus | Now I understand | ||
wolverian | ?eval ~1 | ||
evalbot_10557 | "1" | ||
beppu | QtPlatypus: I think you can think of perl 6's ~= as perl 5's .= . | ||
nperez | ?eval my $a =1; $a =~ 1; say $a; | ||
evalbot_10557 | OUTPUT[1 ] Bool::True | ||
wolverian | prefiks, prefix:<~> is a generic stringification operator. =~ just means = ~ | 11:56 | |
QtPlatypus | I thouth that $a =~ $b is $a = ~ $b | ||
wolverian | QtPlatypus, it is. | ||
QtPlatypus | Now thingss make sence to me. | ||
beppu | ?eval [~] "hello", ", ", "world" | 11:57 | |
evalbot_10557 | "hello, world" | ||
prefiks | ?eval [\~] "hello", ", ", "world" | ||
evalbot_10557 | ("hello", "hello, ", "hello, world") | ||
beppu | that \ was magical -- does it have a name? | 11:58 | |
wolverian | triangulation? :) it is equivalent to 'scan' in functional languages. | ||
ayrnieu | [~|+] <0 1 2> # guess. | ||
?eval [~|+] <0 1 2> # guess. | |||
wolverian | > scan (+) [1,2,3] | ||
evalbot_10557 | Error: unexpected "[" or "|" expecting program | ||
lambdabot | Not in scope: `scan' | ||
wolverian | oops | ||
> scanl1 (+) [1,2,3] | |||
lambdabot | [1,3,6] | ||
QtPlatypus | ?eval [~~] "All","All","All" | ||
evalbot_10557 | Bool::True | ||
wolverian | ?eval [\+] 1,2,3 | ||
evalbot_10557 | (1, 3, 6) | 11:59 | |
wolverian | see :) | ||
beppu | that's powerful... | ||
all these new ways to loop... | |||
QtPlatypus | ?eval [\,] (0..4) | 12:02 | |
evalbot_10557 | Error: No such method in class List: "&prefix:[\\,]" | ||
12:02
nperez joined
|
|||
beppu | ?eval [,] 0..4 | 12:04 | |
evalbot_10557 | (0, 1, 2, 3, 4) | 12:05 | |
beppu | I wonder why \, doesn't work. | ||
12:07
frodo72 joined
|
|||
prefiks | say &prefix:<,> | 12:07 | |
?eval say &prefix:<,> | |||
evalbot_10557 | Error: Undeclared variable: "&prefix:," | ||
prefiks | ?eval say &prefix:<+> | 12:08 | |
evalbot_10557 | OUTPUT[<SubPrim(+)> ] Bool::True | ||
wolverian | seems to be a special case | ||
QtPlatypus | Prefix , doesn't exist. | 12:10 | |
?eval +0 | |||
evalbot_10557 | 0 | 12:11 | |
QtPlatypus | ?eval ,0 | ||
evalbot_10557 | Error: unexpected "," expecting program | ||
prefiks | ?eval say &infix:<+> | ||
evalbot_10557 | OUTPUT[<SubPrim(+)> ] Bool::True | ||
prefiks | ?eval say &infix:<,> | ||
evalbot_10557 | Error: Undeclared variable: "&infix:," | ||
wolverian | oh, right | 12:13 | |
[\,] 1,2,3 is ,1,2... | |||
prefiks | it uses infix op i think... | 12:14 | |
QtPlatypus | ?eval [,] | ||
prefiks | ?eval [\*] 1,2,3 | ||
evalbot_10557 | () | ||
(1, 2, 6) | |||
prefiks | ?eval *1*2*3 | ||
evalbot_10557 | 6.0 | ||
12:14
frodo72 is now known as PolettiX
|
|||
QtPlatypus | It doesn't use the perfix , | 12:14 | |
12:15
PolettiX is now known as frodo72
|
|||
prefiks | example with < should be better choice ;) | 12:16 | |
12:17
frodo72 is now known as froh-doh,
frodo72 joined
12:30
elmex joined
12:43
justatheory joined,
Ymmv joined
12:54
avar joined
12:59
gaal joined
13:00
lisppaste3 joined
|
|||
pasteling | "masak" at 130.238.83.176 pasted "can't make pugs. something with DrIFT.Perl5. here's what it says" (16 lines, 968B) at sial.org/pbot/17569 | 13:25 | |
masak | anyone encountered this before? | 13:26 | |
audreyt | sec | 13:27 | |
kill all .hi and .o files recursively | 13:28 | ||
" perl Makefile.PL ; make realclean" should do this if you don't mind wasting a bit time | |||
masak | i'll try | ||
brb | |||
audreyt | otherwise just rm dist/build/src/DrIFT | ||
.* | |||
and continue make'ing | |||
13:29
oylenshpeegul joined
|
|||
masak | seems to be working after make'ing realclean. thx | 13:31 | |
13:38
nothingmuch joined
13:48
oylenshpeegul left,
oozy joined
13:54
apple-gunkies joined
13:57
bjoern_ joined
|
|||
audreyt | can someone help writing a test for S03? | 14:09 | |
www.nntp.perl.org/group/perl.perl6....uage/25464 | |||
in order for it to be implemented in time for release | |||
the various "simple" lvalue-carrying-context forms need to be tested | |||
14:12
weinig is now known as weinig|work
14:26
dolmans joined
|
|||
audreyt | journal up; g'nite *wave8 7 | 14:36 | |
journal up; g'nite *wave* & | 14:37 | ||
15:03
Ymmv joined
15:16
rashakil_ joined
15:18
jsiracusa joined
15:29
KingDiamond joined
15:41
lichtkind joined
15:53
weinig|work is now known as weinig
|
|||
gaal | ouch, gmane doing s/@/[at]/g is painful in code | 15:57 | |
15:59
iblechbot joined
|
|||
rindolf | Hi gaal | 16:02 | |
gaal: how was the beach party? | |||
gaal: nntp.perl.org does that too. | |||
gaal: you can try using NNTP. | |||
gaal | hi rindolf. was great, but I was still a little under the weather. apparently it did me good, because I'm better now. | 16:04 | |
16:04
weinig is now known as weinig|work
|
|||
rindolf | gaal: great. | 16:04 | |
gaal | anyway, that was re: a link I followed. I subscribe to lists I'm interested in, generally speaking | ||
but this is not important. :) | |||
16:07
amnesiac joined
16:30
cmarcelo joined
16:35
cmarcelo left
17:02
cmarcelo joined
17:03
sri_ joined
17:32
Limbic_Region joined
17:35
elmex_ joined
17:40
elmex joined
17:41
elmex joined
18:02
prefiks joined
18:18
ludan joined
18:22
penk joined
18:26
penk joined
18:51
prefiks joined
18:55
mako132_ joined
18:57
trym joined
19:00
weinig|work_ joined
19:09
trym_ joined,
penk joined
19:30
cognominal joined
19:47
chris2 joined,
weinig|work_ is now known as weinig|work
19:50
macroron joined
20:03
SamB joined
20:20
penk joined
20:26
Captain_Fourier joined
|
|||
Captain_Fourier | what languages does parrot work with | 20:26 | |
elmex | :) nice question | 20:33 | |
Captain_Fourier | no i have a project i want to use it for | 20:34 | |
elmex | i guess ask the mailing list | ||
Captain_Fourier | but it would be using parrot to turn ocaml into javascript | ||
integral | (there's #parrot on irc.perl.org, that might be more awake, but the ML is good) | ||
Captain_Fourier: umm, that's not what parrot does | |||
parrot's a VM itself, so it can run bytecode produced by compilers. it's not designed for translating between languages | 20:35 | ||
so you could run ocaml *alongside* javascript if both compiled to parrot bytecode. | |||
Captain_Fourier | oh i thought there was a reversal process where parrot bytecode can be transformed back into the language | 20:36 | |
cognominal | part of parrot is a parser called pge that impements most of the synopsis 12. If you want to parse stuff and generate stuff from it, that can be a good bet. | ||
Captain_Fourier | ok | ||
cognominal | In a sense pge is very high level, on the other hand, I am not sure you cam yet use it without knowing the parrot assembler | 20:37 | |
see ./compiler/pge in the parrot distribution | 20:38 | ||
Captain_Fourier | ok | ||
cognominal | anyway you are on the wrong channel. go to #parrot on irc.perl.org | 20:39 | |
20:39
prefiks joined
|
|||
Captain_Fourier | ok | 20:39 | |
cognominal | see dev.perl.org/perl6/doc/design/syn/S05.html about the specification of the parser (in the Perl6 realm) | 20:41 | |
it is S05 and not S12. silly me | |||
Captain_Fourier | hmm | 20:44 | |
cognominal | parrot is moving fast so the tests are often more up to date than the doc | ||
so be sure to see ./t/compilers/pge | |||
anyway go to #parrot | 20:45 | ||
Captain_Fourier | ok | 20:49 | |
21:04
weinig|work is now known as weinig
|
|||
szbalint | TimToady: typo in S03: s/argumetns/arguments/ | 21:14 | |
stevan | audreyt: ping | 21:19 | |
21:21
elmex joined
|
|||
Captain_Fourier | ?eval "Hello Channel".split(" ")[0] | 21:27 | |
evalbot_10557 | \"Hello" | ||
21:37
mako132_ joined
|
|||
beppu | Captain_Fourier: Coincidentally, that line is valid ruby, too. | 21:49 | |
Captain_Fourier | yeah im wondering which is faster | ||
ruby or perl6 | |||
TimToady | audreyt: the following segfaults my pugs: regex Y { [x]? <x>} /a/ | 21:52 | |
It seems to be space sensitive. If I delete the space just inside the {, it doesn't segv. | 21:53 | ||
21:53
mako132_ joined
|
|||
TimToady | if I change the first x to a . it says | 21:54 | |
error:imcc:syntax error, unexpected '\n', expecting '(' | |||
in file 'EVAL_1' line 58 | |||
anyway, this is the cut-down version of what is coredumping my ext/Perl6-Grammar/t/basic.t test. | |||
I haven't cut down the array_cap.t failure, but it gets this error message: | 21:57 | ||
error:imcc:syntax error, unexpected ']' | |||
in file 'EVAL_22' line 79 | |||
hth & | |||
21:59
weinig joined
22:26
unobe______ joined,
unobe______ is now known as unobe
22:33
fhork joined
22:44
avar joined
22:47
weinig is now known as weinig|away,
weinig|away is now known as weinig
22:48
weinig is now known as weinig|away
|
|||
prefiks | ?eval my @a=(1,2,3); @a>>++ | 23:01 | |
evalbot_10557 | Error: Can't modify constant item: VInt 1 | ||
prefiks | ?eval sub postfix:<!>($arg){ [*] ^$arg};my @a=(1,2,3); @a>>! | 23:02 | |
evalbot_10557 | (0.0, 0.0, 0.0) | ||
prefiks | ?eval sub postfix:<!>($arg){ [*] ^$arg}; 5! | ||
evalbot_10557 | 0.0 | ||
prefiks | ?eval sub postfix:<!>($arg){ [*] 1..$arg}; 5! | ||
evalbot_10557 | 120 | ||
prefiks | ?eval sub postfix:<!>($arg){ [*] 1..$arg};my @a=(1,2,3); @a>>! | ||
evalbot_10557 | (1, 2, 6) | ||
Captain_Fourier | ?eval sub prefix:<#>($arg) { [++] 'a'..$arg; #'a' | 23:09 | |
evalbot_10557 | Error: unexpected "p" expecting comment, subroutine parameters, trait or block | ||
Captain_Fourier | ?eval sub prefix:<!>($arg) { [++] 'a'..$arg; !'a' | 23:10 | |
evalbot_10557 | Error: unexpected "[" expecting comment, ";", statements or "}" | ||
audreyt | ++ is not infix | ||
Juerd | Captain_Fourier: What did you think [++] would mean? | 23:11 | |
Maybe we can suggest an alternative operator that does what you want. | 23:12 | ||
Captain_Fourier | string concatanation | ||
Juerd | Captain_Fourier: That's ~ | ||
prefiks | ~ | ||
Juerd | So, in list reduction form: [~] | ||
Captain_Fourier | ?eval sub prefix:<!>($arg) { [~] 'a'..$arg; !'a' | ||
evalbot_10557 | Error: unexpected end of input expecting term postfix, comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or "}" | ||
Captain_Fourier | ?eval sub prefix:<!>($arg) { [~] 'a'..$arg; !'g' | ||
Juerd | Now I do wonder where you got ++ for strings from :) | ||
evalbot_10557 | Error: unexpected end of input expecting term postfix, comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or "}" | ||
audreyt | ?eval sub prefix:<!>($arg) { [~] 'a'..$arg }; !'g' | ||
Juerd | Captain_Fourier: That probably doesn't work, for two reasons. | ||
Captain_Fourier | ?eval sub prefix:<!>($arg) { [~] 'a'..$arg;} !'g' | ||
evalbot_10557 | "abcdefg" | ||
Juerd | You're missing the closing } | ||
evalbot_10557 | "abcdefg" | ||
Juerd | And you probably can't use an operator WHILE defining it, but I'm not sure about that. | 23:13 | |
Captain_Fourier | recrusive operators! | ||
Juerd | ?eval sub postfix:<!>($n) { $n == 1 ?? 1 :: $n * ($n - 1)! } 4! | 23:15 | |
evalbot_10557 | Error: unexpected ":" expecting comment, operator or "!!" | ||
Juerd | Heh | ||
Nice that it explicitly mentions !! in the error message :) | |||
?eval sub postfix:<!>($n) { $n == 1 ?? 1 !! $n * ($n - 1)! } 4! | |||
evalbot_10557 | Error: unexpected "!" expecting term postfix, comment, operator, ">>+&<<", ">>+<<<", ">>+><<", ">>xx<<", ">>~&<<", ">>~<<<", ">>~><<", ">>%<<", ">>*<<", ">>/<<", ">>x<<", "\187+&\171", "\187+<\171", "\187+>\171", "\187xx\171", "\187~&\171", "\187~<\171", "\187~>\171", "\187%\171", "\187*\171", "\187/\171", "\187x\171", "+&", "+<", "+>", "xx", "~&", "~<", "~>", "%", "*", "/", "x", "??", postfix conditional, postfix loop, postfix iteration, ";" or " | ||
23:15
bjoern_h joined
|
|||
Juerd | Not nice that it mentions almost the entire language now ;) | 23:16 | |
?eval sub postfix:<!>($n) { $n == 1 ?? 1 !! $n * ($n - 1)! }; 4! | |||
evalbot_10557 | Error: unexpected "!" expecting term postfix, comment, operator, ">>+&<<", ">>+<<<", ">>+><<", ">>xx<<", ">>~&<<", ">>~<<<", ">>~><<", ">>%<<", ">>*<<", ">>/<<", ">>x<<", "\187+&\171", "\187+<\171", "\187+>\171", "\187xx\171", "\187~&\171", "\187~<\171", "\187~>\171", "\187%\171", "\187*\171", "\187/\171", "\187x\171", "+&", "+<", "+>", "xx", "~&", "~<", "~>", "%", "*", "/", "x", "??", postfix conditional, postfix loop, postfix iteration, ";" or " | ||
audreyt | fixing that ;) | ||
Juerd | And wow, >>x<< are all different ops :) | ||
audreyt | write a test? actually | ||
Captain_Fourier | recursively defined operators would be interesting | ||
audreyt | Captain_Fourier: write a test for that? | 23:17 | |
Juerd | Captain_Fourier: Certainly, but I wonder how they could be parsed :) | ||
Captain_Fourier | ok | ||
is there a guide for writing a test | |||
audreyt | and do you have a commit bit yet? if not, may I hve your email plase | ||
Juerd | That means you need to install the parsing bit immediately when the signature is known :) | ||
Captain_Fourier: Just look at the other tests | |||
Captain_Fourier | commit bit? | ||
Juerd | Captain_Fourier: In general, you write: ok(test, "it works"), where test is a boolean expression, and "it works" is a somewhat better description than "it works". | 23:18 | |
audreyt | Captain_Fourier: the username/passwd for checking in into svn.openfoundry.org/pugs/ | ||
Juerd | Captain_Fourier: A commit bit means you get to commit the test into pugs yourself. | ||
Captain_Fourier | yeah i dont have that | ||
Juerd | Captain_Fourier: Which means you don't have to waste audreyt's time by sending a patch, that she than has to apply: you're getting write access to pugs so you can do it yourself :) | 23:19 | |
audreyt | I can send you one. which email addr should I send it to? | ||
Juerd | Captain_Fourier: You'll get one :) | ||
Captain_Fourier | [email@hidden.address] | ||
i think i just guarenteed spam from that email | |||
Juerd was, a year or so ago, very surprised about the commit bit policy surrounding pugs, but nowadays thinks it's weird that so few projects work like this :) | 23:20 | ||
Captain_Fourier: Indeed :) | |||
But no worries - you'd get spam sooner or later anyway | |||
Captain_Fourier | ok | ||
Juerd | At least now you have something to blame for it | ||
Captain_Fourier | yeah | 23:21 | |
23:22
cognominal joined
|
|||
audreyt | Captain_Fourier: do you already have a svn checkout of pugs? | 23:22 | |
Captain_Fourier | i have a darcs checkout | ||
audreyt | oh ok. sadly darcs is readonly | ||
I kept meaning to improve that with svk's tailor.py support | |||
(or remedying the lack of) | 23:23 | ||
obra | audreyt: that might make a good hackathon target | ||
Captain_Fourier | tailor is great svn->darcs | ||
audreyt | but for the time being, please do a svn checkout too | ||
Captain_Fourier | not the other way | ||
ok | |||
audreyt | obra: not without clkao present | ||
clkao | need a python/perl bilingual to do darcs | ||
obra | audreyt: conveniently, that won't be a problem | ||
clkao | audreyt: i will be in boston after yapc | ||
;) | |||
obra | We'll have him until 9 july | ||
audreyt | ooooh! | ||
obra | Thanks to Best Practical | 23:24 | |
"Now it's a corporate priority to have him here for hackathons" | |||
audreyt blames, er, annotates, er, praises Best Practical | |||
obra | clkao: should we tell #perl6 about the thing we need to announce on monday? | ||
Juerd | audreyt: I was wondering why darcs is still used for pugs | 23:25 | |
audreyt | Juerd: so we can get a constant influx of committers that uses ++ for string concat | ||
Juerd | audreyt: They'd probably have used svn or svk if darcs wasn't there | ||
audreyt | I doubt that, really :) | 23:26 | |
Captain_Fourier | im sorry i like darcs | ||
audreyt | Captain_Fourier: no need to be sorry, lotsa people here prefer darcs to svn | 23:27 | |
me included | |||
Captain_Fourier | plus i probably wouldnt have tried pugs if i didnt have ghci installed | ||
audreyt | *nod* | ||
Captain_Fourier: btw, commit bit sent, check your email; try adding yourself to AUTHORS and commit it | |||
welcome aboard :) | 23:28 | ||
Juerd | Yay, committers++ | ||
(Both in the karma and in the +=1 sense) | |||
audreyt | Captain_Fourier: so maybe write a t/operators/recursive_definition.t | 23:30 | |
look at other tests in the same dir for how | |||
Captain_Fourier | ok | 23:32 | |
23:33
cognominal joined
|
|||
Captain_Fourier | so my test would go into that file | 23:36 | |
audreyt | yup | 23:38 | |
Captain_Fourier | ok cool will do | 23:39 | |
audreyt | Captain_Fourier++ | ||
I need to run for a bit... be back in ~6 hours, hopefully with lots of offline commits :) | 23:44 |