svn switch --relocate svn.openfoundry.org/pugs svn.pugscode.org/pugs/ | run.pugscode.org | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com | dev.pugscode.org/
Set by putter on 11 February 2007.
00:02 drupek12 joined 00:11 Loccccs joined 00:25 explorer joined 00:34 forsaken joined 00:48 Debolaz joined
svnbot6 r15498 | lwall++ | Lookahead for P5ish 'for' code was wrong 01:05
01:22 IllvilJa joined 01:30 buetow joined 01:31 Khisanth joined 01:48 dolmans joined 01:58 buetow joined 02:18 forsaken joined 02:19 dmq joined 02:28 Minidin joined 02:45 araujo joined 02:47 araujo joined 02:49 REPLeffect joined 02:59 GabrielVieira joined 03:00 pbuetow joined 03:11 scw_ is now known as scw 03:17 Schwern joined 03:18 Khisanth joined 03:30 nperez joined 03:47 kanru joined 03:51 weinig is now known as weinig__, weinig__ is now known as weinig 04:07 mako132_ joined 04:19 nekokak joined 04:23 geoffb joined 04:26 dj_goku joined 04:31 amnesiac joined 04:57 anm joined 04:59 justatheory joined
TimToady TheDamian suggests one simplification would be to get rid of the &foo\(1,2,3,:mice<blind>) form and stick with the longer form &foo.assuming(1,2,3,:mice<blind>) 05:12
anybody want to stick up for the short form?
05:25 dolmans joined 05:35 weinig is now known as weinig|zZzZ
TimToady I'll take that as a no. :) 05:36
specbot6 r14312 | larry++ | Some clarifications and oversights noted by TheDamian++. 05:39
r14312 | larry++ | The &foo\($bar) shorthand for &foo.assuming($bar) is now gone.
svnbot6 r15499 | lwall++ | Deleted short form of .assuming 05:43
05:43 GabrielVieira2 joined 05:59 DHGE joined
specbot6 r14313 | larry++ | Q: Can February March? A: No, but April May... 05:59
allbery_b not the best time to ask such questions, perhaps, but (having not realized such a short form existed) my vote is "ewwwwwwww!" 06:00
I keep reading it as a typo in a long dot 06:01
06:02 GabrielVieira2 is now known as GabrielVieira, revdiablo joined 06:07 revdiablo joined 06:09 ayrnieu joined 06:14 BooK_ joined 06:18 ]particle[ joined 06:20 ]particle[ left 06:23 jisom joined 06:25 jisom left, jisom joined 06:52 iblechbot joined 07:04 mauke_ joined 07:15 devogon joined
yves is away: Occupōæ½xE9 07:27
yves is back (gone 00:00:19)
07:54 mauke_ is now known as mauke 08:02 the_dormant joined 08:12 polettix joined 08:13 marmic joined 08:24 dduncan left
audreyt TimToady: ping 08:33
lambdabot audreyt: You have 1 new message. '/msg lambdabot @messages' to read it.
audreyt lambdabot: @messages
lambdabot TimToady said 15h 16m 14s ago: actually, := is already specced to fail if the type is inconsistent, S03:1003
audreyt @tell TimToady So is it okay to say "my $x; $x := [1,2,3]" works because "my $x is Any" is annotated, but "my Any $x; $x := [1,2,3]" fails because it means "my $x is Scalar of Any" and [1,2,3] is not a scalar? 08:34
lambdabot Consider it noted.
gaal hey audreyt 08:38
audreyt heya 08:39
gaal still getting an error I don't understand; could be I'm missing some instances
audreyt I managed to escape nascent Lost addiction
<- going back to coding 08:40
nopaste patch+error?
pasteling "gaal" at 192.115.25.249 pasted "enough code quoted in error, I think" (41 lines, 1.7K) at sial.org/pbot/23324
audreyt ok, see, ghc doesn't know what type pos should be
gaal there's also instance Boxable PureInt and instance Boxable Int 08:41
audreyt \ str sub (pos :: PureInt)
08:41 iblechbot joined
audreyt is one way 08:41
(Str.drop pos str)
is another way
gaal oh, the incoming type?
audreyt yeah
it only knows that it's Boxable
and it can be casted to Int
but that's insufficient info
gaal ok: changing (cast pos) to pos makes the error: 08:42
No instance for (Boxable (Int -> Val))
but that means I have an arity error somewhere doesn't it?
audreyt well, yeah 08:43
gaal I don't see it :(
audreyt can you nopaste the patch
or commit it?
gaal nopaste coming up... 08:44
pasteling "gaal" at 192.115.25.249 pasted "index" (71 lines, 2.3K) at sial.org/pbot/23325
audreyt oh ok
because it did not fit the instance
see, you are working with
PureStr -> PureStr -> Int -> Val 08:45
but your instance is a->b->c->Eval z
you need either a
a->b->c->z
or a
a->b->c->Val
gaal oh, so add 'return'?
audreyt no
08:45 the_dormant joined
audreyt add an autoderiv 08:45
-- Auto-generate pure instances from Eval instances
instance MethodPrimable (a -> b -> Eval z) a => MethodPrimable (a -> b -> z) a where asPrim f = asPrim ((\x args -> return (f x args)) :: (a -> b -> Eval z))
similar to this
but 3ary not 2 08:46
adding return would do
but that's not sufficiently pointless
gaal wow that instance is very moose
audreyt :D 08:48
gaal okay; I added the instance and now I get: No instance for (Boxable (Invocant Eval))
audreyt (customizable contexts)++
gaal instance MethodPrimable (a -> b -> c -> Eval z) a => MethodPrimable (a -> b -> c -> z) a where asPrim f = asPrim ((\x y args -> return (f x y args)) :: (a -> b -> c -> Eval z)) 08:49
audreyt ok, that means Val is not boxable atm
gaal isn't Val's box id?
audreyt correct
gaal should I add the instance or is it a mistake to have to use it? 08:50
and, how come it wasn't needed in the other methods?
audreyt because they all just return something
gaal oh, as opposed to a Val
audreyt right.
gaal because I'm already mkValing inside
okok
audreyt dunno... I can argue either way 08:51
another thought is to simply write another instance of MPrimable
that has ->Eval Val
instead of Eval z
that feels slightly cleaner
also avoids two unneccessary method calls
(the fmap mkVal)
so maybe do that instead? 08:52
gaal you mean inside the two mkVals inside the index method?
audreyt nono, I'm comparing writing another MPrimable instance
with writing an instance of Boxable Val
I think the former (writing an instance that has no fmap mkVal in it) makes more sense
feels funny to double box into id 08:53
08:53 Schwern joined
audreyt so I mean 08:53
instance (Boxable a, Boxable b, Boxable c) => MethodPrimable (a -> b -> c -> Eval Val) a where
...you know the rest...
yet another thought (hey) is to leave sensible errors 08:54
gaal oh; but then we'd need to write two insances for every new arity
potentially
audreyt well, not really, because we can autoderiv too
but well
gaal one for MPrim and one for Boxable
er sorry
audreyt one for Val and one for B
gaal one for Eval z and one for Eval Val
audreyt and one for z
the z one covers Val too 08:55
dunno, the arity is finite
not really a loss
gaal yeah this fever isn't helping my typechecker output layer
I don't see how autoderiv would work, but ok
that can happen later
audreyt nod 08:56
gaal where does the [::]ification of captures happen? in Prelude.pm ::internal methods?
that is, the rearrangement of args to a list 08:57
audreyt hm, index now returns undef instead of -1?
this is going to be fun!
gaal according to Functions.pod, yeah
audreyt ponders "undef but -1"
gaal yeah
audreyt I mean, people would rely on -1
how about -1 for now? 08:58
gaal the is 0 .. undef empty?
s/the//
audreyt feeling really bad about plain undef
it's currently specified as a warning but (0..0) 08:59
so just return -1 and we avoid the Eval-Val business altogether
gaal I think that's where it'll hurt most
audreyt I'll annotate the Functions.pod
gaal okay
better life through spec change
08:59 drrho joined
audreyt ajs_: why does index('foo', 'bar') return undef? :/ 09:00
09:01 devogon joined
args notes that he highlights on 'args' 09:01
moritz args: owned ;)
audreyt wait... you were multiple "rg" 09:02
but now you are just a single "rgs"?
moritz my girlfried is called signe, so I hilighted on that name, and got matches with "unsigned int" ;-)
audreyt was it "rg"s then and a"rgs" now, or "arg"s?
gaal /nick arghhhs 09:03
args well, I prepended an 'a' because that makes me look so cool.
gaal and lo, it compiles
audreyt Ƥrgs 09:04
that's cool
gaal audreyt: why are we using ByteString.Char8? 09:06
audreyt gaal: we shouldn't. we should use UTF8
which is a utf view of bytestring
it's in src/UTF8.hs
so just change the import line
gaal k 09:07
why wasn't that a type error?
svnbot6 r15500 | audreyt++ | * In "foo".join(1,2,3), "foo" is the separator.
r15500 | audreyt++ | * index("foo", "bar") should really be -1, or something that
r15500 | audreyt++ | numifies to -1, lest the universe collapses.
gaal newtype--
audreyt because both share the ByteString basetype
it's just the operations (index length etc)
are different
gaal hmm
audreyt it's really a view on Buf
gaal ack
audreyt and yes, we should switch to Rope once the new fps is out
with concat strings and encoding views 09:08
but The Day Is Not Today etc
should be trivial, just another import change
the API stays the same
gaal haskell++
audreyt indeed.
with the right type infrastructure in place, feels almost like cheating :) 09:09
gaal (not that I don't see the hypocricy in my -+)
audreyt <sleepingsquirrel> Programming in Haskell is like having an interactive conversation with a teleportation machine. 09:11
<sleepingsquirrel> You tell it you want to go to some place warm and sandy. The machine complains about ambiguous constraints.
<sleepingsquirrel> So you tell it that there should be plenty of free tropical fruit drinks. It carps 'Inferred location less polymorphic than expected'.
<sleepingsquirrel> After a few more iterations, there's a little puff of smoke, and at the sound of the chimes, you discover you're now on the beach in Tahiti.
<sleepingsquirrel> And although you've used the machine many times before, you can't help but be impressed that it usually 'Just works' most of the time.
</quote>
09:12 MetaGod joined, elmex joined
gaal :-) 09:14
svnbot6 r15501 | gaal++ | * use UUndef instead of () for undefined Vals
r15502 | gaal++ | * chop and index
audreyt gaal: Pad now carries Types... it's been a year but hey, we got there :)
audreyt is finishing up the type-annotation commit 09:15
interesting tidbit: "my $x is Int; my $y = 3; $x := $y" fails
I think people will take some time to learn that "my Int $x" and "my $x is Int" means totally different things. 09:16
gaal find src -name \*\.hs\* | xargs grep Char8 | wc -l => 29
that can't be right
audreyt most of the time it doesn't matter
but yeah, changing them all to UTF8 would be Right 09:17
gaal on the offchance somebody does some op somewhere
that would be a bummer to debug
audreyt ayeaye
gaal what's the vi equivalient to 'cw' that changes up to next whitespace? 09:19
args cE ?
gaal yeah, great thanks 09:20
huh. my equals key and my left ctrl key stopped working. this is interesting. 09:32
huh! but +, which is shiftequals, works 09:33
oi, minus doesn't work either
</3 computers
audreyt ew
gaal bbiab... 09:34
masak audreyt: so, what is the difference between "my Int $x" and "my $x is Int"? 09:44
audreyt masak: the former is shorthand for 09:45
"my $x is Scalar of Int"
in Haskell-speak:
x :: TVar Integer
x :: Integer
masak oki
audreyt the latter can only be let-rebound
not assigned
for I hope obvious reasons
masak yes
gaal time to get a new keyboard I gues... 09:46
audreyt gaal: best luck
you have on spare handy?
gaal hm I can use the old laptop's
this makes little sense, but I found that if I hit equals really hard, it sometimes does emit a keypress; when shift is depressed it's more likely yo 09:47
*to
reminds me of the time I had a keyboard whose lowestbut one row was defunct 09:49
this was in the dos days; you could hit altnumkeypad to get a char
but 1,2,3 were also dead
luckily, the number you typed was taken modulo 2**8
great, five and six are dead too 09:50
life is ridiculous
audreyt :/ 09:52
gaal rehi from laptop. screen++
oh and foo says hi 09:53
audreyt hi foo!
gaal "mrrrow" 09:54
audreyt "the next day"?
PadEntryMulti is dead, yay.
gaal I think she means something more along the lines of "oh you are nice and warm" 09:55
gaal ponders adding a feature to ghci's :e to position the cursor at last error, or better integration with vim quickfix in general 09:56
svnbot6 r15503 | gaal++ | * Don't mention ByteString.Char8 in places where an accidental 09:59
r15503 | gaal++ | string op would truncate the char. Use UTF8 view of ByteString
r15503 | gaal++ | instead.
r15503 | gaal++ | (You may need to rebuild after this commit if you're using ghci)
gaal audreyt: how are mutating methods expressed? eg p5chop 10:03
audreyt gaal: they are (Scalar of Str) methods 10:08
not Str methods
self can't be declared rw
so we punt.
maybe add a comment to that effect
10:08 BooK joined
svnbot6 r15504 | gaal++ | * Pugs.Meta.Str: Prefer UTF8 functions to Prelude ones for golf value 10:08
gaal thought so... the docs will be messy on this point :/ 10:09
audreyt nod.
gaal unless they are tooled to bunch X of Foo together with Foo
audreyt sorry, need to bbiab to focus on killing EntryMulti 10:12
10:18 chris2 joined 10:33 jisom_ joined 10:42 rfordinal joined 10:53 pbuetow joined
gaal how is * expressed in newVal, eg.: 10:55
our List multi method comb ( Str $input: Rule $matcher = /\S+/, Int $limit = * ) is export
10:59 buetow joined, penk joined 11:11 kanru joined
svnbot6 r15505 | fglock++ | PCR - fixed <+[a]+digit> 11:18
r15505 | fglock++ | - t/regex/from_perl6_rules/stdrules.t - all tests pass
11:18 fglock joined
gaal ... dispatch fails ungracefully: 11:22
?eval vv("asdf").index("s")
11:22 evalbot_r15496 is now known as evalbot_r15497
evalbot_r15497 1 11:22
gaal huh? that's a segfault for me
moritz what does vv() do?
gaal because I didn't add a "pos" argument 11:23
moritz: it constructs the value as a newVal node instead of an oldVal one
we are in the ongoing process of replacing much of the way a parsed Perl 6 program is represented
moritz: to do it in a gradual manner rather than enter a cave and rip off everyhtgin and install the new representation, we added a vv() function that says, although you normally take this as an oldval, it isn't 11:24
?eval vv("asdf").index("s",0) 11:25
evalbot_r15497 1
gaal ?eval vv("asdf").index("s",3)
evalbot_r15497 -1
moritz gaal: so it's something that will not be part of final p6, right?
gaal right
huh. it works correctly here...
?eval vv("asdf").split(" ")
evalbot_r15497 (" ",) 11:26
gaal ah. it's the old version of the function...
anyay, I'm getting:
pugs> vv("asdf").index("s",vv(0))
*** Cannot coerce from Pugs.Val.PureInt to Int
(without the vv on 0 too) 11:27
audreyt rehi 11:29
gaal heya
I may need to lie down for a bit soon...
audreyt this means coerceVal for the Int instance isn't working yet
gaal committing what I have so far 11:30
audreyt k
PadEntryMulti is gone
all entries are now typed
constants actually work
and Multi code is now a proper Code object that just happens to contain other variants
however it broke pretty much everything
still fixing now ;)
gaal :))
audreyt gotta go through the red-inducing period before yellow-inducing 11:31
gaal I had to touch Pugs.AST.Internals to get non-ghci build working, for some reason (PadEntry YAML instance missing) 11:32
svnbot6 r15506 | gaal++ | * a few more Str methods
audreyt k
gaal but I guess once it's removed that problem will go away :)
audreyt that's my fault
the comment there needs to be nixed
betweeh the two PadEntry variants
gaal yeah I moved it after the drift hint
audreyt cool
gaal yeah, committing then
audreyt Could not find module `Pugs.Prim.String': 11:33
Use -v to see a list of the files searched for.
svnbot6 r15507 | gaal++ | * unbreak the build
gaal oi fixing
audreyt util/add-text-fie
:)
gaal++
gaal pull 11:34
nap, bbiab & 11:35
svnbot6 r15508 | gaal++ | * unbreak the build again
audreyt @tell TimToady I'm going to assume that there's nothing as "anonymous multi sub"; i.e. only &name gets the multi-merging treatment and not $name.
lambdabot Consider it noted.
11:36 buetow__ joined 11:38 buetow__ joined 11:41 b00t joined
audreyt @tell TimToady I'm going to assume that there's nothing as "anonymous multi sub"; i.e. only &name gets the multi-merging treatment and not $name. 11:48
lambdabot Consider it noted.
audreyt oops, retold
fglock audreyt: in 6-on-5, I've been thinking about implementing p6 pads as p5 classes 11:51
vars are accessors, and inner pads are inherited classes
11:52 iblechbot joined
fglock pads are actually instances of these classes 11:53
gaal that would be way cute! 12:27
12:31 buetow joined
gaal mhm editing P.M.Str still triggers massive rebuild. I wonder why... 12:31
12:42 fglock joined 12:44 REPLeffect joined 12:53 buetow joined 12:59 Psyche^ joined 13:05 pbuetow joined 13:07 Psyche^ is now known as Patterner 13:13 weinig|zZzZ is now known as weinig|bbl 13:15 dec_ joined 13:18 Limbic_Region joined 13:25 the_dormant joined 13:30 elmex joined 13:46 IllvilJa joined
gaal mooses 13:54
13:55 buetow joined 14:00 fglock joined
fglock gaal: re cute - was it about pad-class in 6-on-5? 14:03
14:04 Psyche^ joined
kolibrie fglock: that is my impression 14:06
fglock kolibrie: I'm back to debugging PCR infinite loops 14:07
kolibrie ouch. I thought that was fixed
fglock I found new ones 14:08
kolibrie ahh 14:09
fglock there is a problem with backtracking and zero-width matches
kolibrie if it backtracks, then matches a zero-width match? 14:10
fglock I didn't fully understand the problem yet
kolibrie <token> | <''>
fglock it seems that even '^' can be a problem 14:12
kolibrie so, something to do with backtracking and zero-width matches, but the exact problem is still to be determined?
gaal fglock: yeah, the Perl 5 object system proves its flexibility once again :) 14:14
14:15 rindolf joined
fglock gaal: yes :) I had that idea when I unified 'vtable' and 'pad' in the mp6-on-C prototype 14:16
14:17 Psyche^ is now known as Patterner
fglock kolibrie: the problem is near lines 60-90 in Pugs::Runtime::Regex 14:18
14:21 spinclad joined
kolibrie fglock: looks like there are lots of (commented out) print statements there (area of previous debugging) 14:25
fglock the current problem with kp6 is too many indirection - "$x" is compiled to $closure->pad->Scalar_x->FETCH 14:26
kolibrie: yes, that's a troublesome point in the module 14:28
replacing Pugs::Runtime::Regex with putter's regex engine is a possible solution 14:33
I'd need p6-on-jvm for a $job project 14:44
svnbot6 r15509 | gaal++ | * split-on-a-string method. Can be made more efficient. 14:48
14:48 iblechbot joined
audreyt rehi! 15:13
kolibrie audreyt: good morning/evening 15:15
audreyt :) 15:16
<- still taking pugs apart and seeing massive reds in smokes
meaning, not yet ready to check in 15:17
15:17 Psyche^ joined
kolibrie thank you 15:17
gaal moose 15:18
kolibrie it is very exciting seeing so much activity recently - audreyt feeling better, fglock back from vacation, etc. 15:19
audreyt :) 15:20
kolibrie audreyt: did plans for you to visit Boston in May ever materialize? 15:21
audreyt I did not hear back, so the only plan now is July visit to Mountain View 15:22
kolibrie doubts he will be driving through Mountain View in July
driving through Boston in May is much more likely
gaal audreyt: how newval-ready is VRule? should I transcribe methods that use res, such as $s.split(//)? 15:26
audreyt gaal: sure. just add Boxable to VRule 15:28
and add a cast in Pugs.AST line 61
so fromVal can work
that's all it takes
Debolaz is disappointed he couldn't get types.pm to work. :/
For a brief moment, I had hoped for typing in perl 5. 15:30
audreyt typesafety.pm 15:31
?
16:10 ilogger2 joined
Debolaz Limbic_Region: sassign is an op. 16:12
audreyt scalar-assign I bet
Limbic_Region ahh 16:14
teach me to only half pay attention
16:20 vel joined 16:58 Aankhen`` joined, CardinalNumber joined 17:07 fglock joined 17:12 SCalimlim joined 17:17 CardinalNumber is now known as ProperNoun
specbot6 r14314 | audreyt++ | * S06: Instead of introducing the conjectural concept of 17:17
r14314 | audreyt++ | single-semicolon delimited multiple-longnames, delegate
r14314 | audreyt++ | the discussion to S12 and present the non-controversial
r14314 | audreyt++ | double-semicolon form as the example instead.
gaal (I punted on Val<VRule> for now due to circularity issues) 17:19
audreyt gaal: I have this algorithmic moose to solve 17:22
gaal yes?
audreyt I'll brainstorm it here and check for sanity 17:23
ok. I've eliminated MkEntryMulti.
gaal summons anatoly
audreyt now a multi is simply a Val that contains a set of Code
just as we planned
there are two issues here.
one is that we need to write
instance Monoid PureSig 17:24
such that when we are faced with three multis
we can find the common-subset-interface of it to advertise to the outside world
gaal *nod* 17:25
17:25 Kattana joined
audreyt which means we need to Monoid on Cxt 17:25
and LValueness
for each param, as well
17:25 anatolyv joined
audreyt so let's see... rw `mappend` nonrw = rw 17:26
CxtItem `mappend` CxtList = ???
gaal hey anatolyv
audreyt anatolyv: greetings
anatolyv hey audrey, gaal
17:27 justatheory joined
audreyt now anatolyv is here I'll move on to issue #2 17:27
namely to implement S12:796 17:28
gaal "The order in which candidates are considered is defined by a topological sort"... 17:29
audreyt yes
we have a Set of Signature here, and a single CaptVal
wolverian is writing a Num instance the sanest way to get a negation operation for your datatype? :)
audreyt wolverian: or define -: or something
wolverian yeah. I was looking for Data.Abelian or so... ;)
audreyt the CaptVal is already reduced according to the multi's proto-sig
i.e. the `mconcat` of all its variants 17:30
gaal nod
TimToady audreyt: I suspect Scalar has to be smart enough to be able to wrap up an Any into a Scalar of Any when bound.
lambdabot TimToady: You have 3 new messages. '/msg lambdabot @messages' to read them.
audreyt so we have a partial ordering between the Sig, defined over the CaptVal 17:31
[particle] i'd like to see a bot that can convert synopsis verses to text
S12:796?
gaal [particle]++ # great idea
wolverian I want a bot that rewrites the synopses in pentameter 17:32
audreyt what's a good way to write the topological sort itself?
ingy morning
gaal heya ingy
TimToady and I think not worrying about multi on anons is fine, since the purpose of multies is to share a short name, and anons ain't got one.
17:32 elmex joined
ingy hi gaal 17:32
audreyt we have: (candidates :: Set Sig), (compare :: Sig -> Sig -> Ordering), and we'd like to find a Sig that is GT every other 17:33
I suspect there is something in Data.Graph.Inductive.Basic that simply solves this 17:34
gaal yes, since your exposition already abstraced out the Perlish parts
lookign there. 17:35
audreyt *nod*
17:35 phiker joined
audreyt I'd like to not code topological sort myself if possible; I'll get it wrong surely, esp 1:35am now :) 17:36
wolverian Data.Graph has topSort certainly
so does inductive, but not in .Basic, forgot where
audreyt the function should be 17:37
Set Sig -> Maybe Sig
wolverian oh, .DFS
audreyt it returns Just iff there's only one valid topsort
in all other case it's Nothing
gaal @index topSort
lambdabot Data.Graph
wolverian @index topsort 17:38
lambdabot Data.Graph.Inductive.Query.DFS, Data.Graph.Inductive.Query, Data.Graph.Inductive
gaal "A topological sort of the graph. The order is partially specified by the condition that a vertex i precedes j whenever j is reachable from i but not vice versa.
"
not quite what we want though?
audreyt the one in Inductive.Query is
provided by dfs 17:39
gaal ahhh
audreyt topsort' :: Graph gr => gr a b -> [a]
gaal so, listToMaybe . topSort'
audreyt can you (or wolverian, or anatolyv) test that it does work? :) 17:40
gaal you mean outside of Perl yes? :)
TimToady but let me think about the binding think some more
audreyt in Hs, yes.
anatolyv ugh, probably not me, i'm disconnected from my stuff at the moment :)
gaal sure :)
audreyt woot :) that will get us True Multi Dispatch 17:41
as currently proto already works
and subs does shadow multis
gaal woot
audreyt TimToady: so is nameds part of the long name, or not? 17:42
anatolyv is topsort enough, for practical purposes? maybe there's an incentive to put more fundamental types first, among uncomparables
wolverian sorry, my coding laptop is offline at the moment, hopefully gaal can hack it :)
audreyt S06 and S12 are a bit confusing here
anatolyv foo(Int) and foo(Moose)
TimToady not sure what you mean by "nameds" 17:43
oh, named params
it's still too early :(
gaal have coffee, will be sentient
Aankhen`` LMAO. 17:44
audreyt TimToady: multi foo (:$x!) {...}
multi foo (Int :$x!) { ... }
TimToady at the moment the official story is that only positionals (and nameds remapped as positional with proto) participate in 6.0.0, but it's erroneous to assume nameds won't be added later
audreyt k 17:45
TimToady however, if we decide we know how to add them before 6.0.0, that'd be nice
'course, I have a vague recollection that I used nameds in longnames somewhere in *STD
audreyt slurpies are part of longname already...
and they come after nameds in zoning
so it's a bit contradictory, considering ;;'s placement 17:46
TimToady I think I was only relying on failure if there is no such parameter name
fglock what does a long name look like? (or is it just a data structure)
audreyt fglock: currently in Pugs, a longname is simply a Signature
I was trying to determine if it's a restricted form of Signature 17:47
or if the full form is sane enough to use
gaal praises Data.Graph.Inductive.Example
TimToady I suppose we should aim for what the user expects, and then see where it needs optimizing 17:48
audreyt k
TimToady: so the earlier issue #1 (instance Monoid Signature)
TimToady and the user will likely expect nameds to participate as if bound already
wolverian gaal, are you finding inductive sane to work with?
audreyt in p6speak, that issue can be phreased: should p6 generate protos from several multis of no proto is present?
gaal wolverian: haven't really started yet! 17:49
wolverian okay :)
audreyt that is, it seems to me that we need to somehow find a "common subset" that subsumes all candidates
wolverian I found it hard, but that was probably because I didn't read the paper until later
TimToady seems like it could lead to a false generalization if the user is planning to add more multis later via eval, which is officially within the lexical scope 17:50
audreyt because that is the only way we can propagate common type/context/lvalueness contexts into the expressions
consider:
TimToady or eval has to recalculate the proto
audreyt I was leaning toward recalculating the proto
TimToady recalc of proto is okay for eval, I expect
audreyt multi f (Int $x, Str $y) {}; multi f (Int $x, Moose $y) {} 17:51
f(want(), want())
or rather
TimToady i know what you mena
*mean
audreyt yeah.
so is it safe to say (that is, to test) that the first expr gets Int as want? 17:52
TimToady you think the want type is the intersection of the proto and the actual (if known) context?
phiker mugwump, ping
audreyt uhm, what actual?
TimToady er, right
audreyt the want type is the bound-as-proto, and proto is calculated by intersection if not present 17:53
reason this is needed is that anything evaluated as ITEM can't go back and be reevaluated as LIST, and vice versa
TimToady in other words, can it be the actual context
@foo ||= @bar 17:54
lambdabot Maybe you meant: faq ft todo yow
audreyt that's solved at macro level
same as =
more like
multi f (Int, *@x) {}; multi f (Str, *@x) {}
pasteling "gaal" at 192.115.25.249 pasted "tiny D.G.I.Q.DFS.topsort example" (30 lines, 1K) at sial.org/pbot/23334 17:55
audreyt f("foo", =<>)
and =<> would like to know it can read all lines
pasteling "gaal" at 192.115.25.249 pasted "here is the definition of kin248 from that example" (4 lines, 236B) at sial.org/pbot/23335
audreyt before it enters multi dispatch
TimToady basically, can we partially dispatch on generated proto
audreyt or rather, we had a
Debolaz Does pugs support installing into a custom prefix now btw?
audreyt Capt Exp
which is a capture of expressions 17:56
we'd like to reduce it to Capt Val
which is a capture of reduced values
but we can't use any information on the actual multis
because multi dispatch acts on values
but I'd like to have some hint
if proto is present, it's specced to be the hint
but if it's not, spec is silent
and I'd like it to dwim, namely find the unifying proto that all multis agree 17:57
TimToady type inferencey
audreyt and unify to Any, that is to say VAR() context with no type hints
TimToady Int|Str
audreyt if things disagree on context
Int|Str is fine, as types can unify like that 17:58
but ITEM/LIST is nonunifiable...
Int|Any is just Any, too
it is type inferency, but otherwise in the face of
f(g())
without a proto f and with only multi f
TimToady so basically, can we relax/tighten the rule that says if you don't know, it's list context, if all participating multis show item? 17:59
then you know it's item.
I think we can do that.
audreyt yes. also, if any of multis want rw, we want rw.
TimToady seems fine to me, as long as we recalc in eval.
audreyt since we can always get ITEM/LIST out of a lvalue
but not the other way around
TimToady (if necessary)
audreyt yup 18:00
yay.
wolverian is the enum spec still in flux?
audreyt Debolaz: custom prefix?
TimToady seems dwtwy enough.
*dwtmy 18:01
audreyt ?eval sub prefix:<~Y~> ($x) { "$x will dwim, or at least do something..." }; ~Y~ "Perl 6"
evalbot_r15509 "Perl 6 will dwim, or at least do something..." 18:02
audreyt Debolaz: do you mean that?
TimToady wolverian: it's been pretty solid for a while, unless we get pushback from the darn implementors. :)
wolverian: did you want to tweak something?
hmm, with the proto generation, enum collisions could just be considered 0-ary functions that generate a proto that can't match anything. 18:04
then you automatically get the Ada semantics of failing if two modules export conflicting names to the same namespace. 18:05
audreyt but enums ne multis...
18:05 mr_ank joined
TimToady just thinking mechanism 18:05
audreyt k
TimToady enums are types and constant values at the same time 18:06
audreyt goes back implementing the preceding steps toward bogo, er topo, sort
TimToady and constants can be represented by 0-ary subs
as in "use constant"
if they were represented with 0-ary multies we might get collision detection for freebies 18:07
is all I'm saying
audreyt ah.
they share long names, though
TimToady longname and shortname is the same for () 18:08
isn't it?
audreyt true. but the spec currently says on colliding longname, later one masks
S12:775
this is done before proto autogen
maybe a redefinition warning? 18:09
TimToady that would be fine for enums too, I suppose
audreyt *nod* then already plan to do that
TimToady as you were
back to backlogging...
gaal audreyt: was the tiny demo useful or do you need more? 18:12
(see 2 nopastes above)
audreyt gaal: I think I'm deep-in-other-parts enough that I'd like a complete implementation :) 18:13
18:13 anatolyv left
gaal of what? :) 18:13
audreyt dispatch :: (Set a) -> (a -> a -> Ordering) -> Maybe a
this :)
gaal k :)
audreyt thanks! :) 18:14
Debolaz audreyt: Last time I tried to install to /usr/local (perl is in /usr/pkg), it installed a lot of stuff in /usr/pkg
audreyt @djinn [a] -> (a -> a -> Ordering) -> Maybe a
lambdabot f _ _ = Nothing
audreyt ok... _very_ useful, thanks djinn
gaal pwned
audreyt Debolaz: perl Makefile.PL PREFIX= doesn't dtrt? 18:15
TimToady audreyt: now I'm wondering if Scalar/Any is really Any/any, and := just autoboxes the [...] any into an Any.
audreyt ok... let's see
Scalar is something that can accept infix:<=> 18:16
Debolaz audreyt: I'll update to the most recent version, try again, and put up the full output of the installation if it fails.
audreyt Debolaz: k
Debolaz: also maketicket on dev.pugscode.org lest we forget
(you do have a commit bit right?)
TimToady: and [...] can't quite be assigned to. 18:17
allbery_b the pugs INSTALL document does say that PREFIX= does not DTRT
Debolaz audreyt: Yes.
audreyt my $x := [1,2,3]; $x = 3; # will fail
but the binding succeeds because $x is unannotated
however, I'd expect
allbery_b "XXXX NOTE!!!!!!!! PREFIX doesn't actually work right now."
audreyt my $x is Scalar := [1,2,3] # to fail right there 18:18
wolverian TimToady, not really, just thinking about data Foo = Bar | Baz in perl6, thinking "enum" is a weird name for that.
audreyt otoh,
my $x is Any := [1,2,3] # ought to work
(sometimes I wonder if we should just allow * in type context so people won't look for a ::Any, because there isn't.)
i.e. there is no concrete ^Any that does anything meaningful
rather it's only meaningful as a type
in any case. 18:19
wolverian then again, "data" is a pretty horrid name too
audreyt my $x is Int := 1; $x := 2; # should work
my $x is Scalar := 1; # should fail
the question was
my Any $x; # should it be ignored and treated the same as "my $x"? 18:20
my intuition is yes
but
my Object $x; # means "my $x is Scalar of Object"
so
my Object $x; $x := [1,2,3] # can fail
</working-assumptions>
TimToady maybe just silently turn "my Any $x" into "my $x"? 18:21
audreyt *nod*
my Int $x; $x := 3; # should this fail or box?
I guess box
TimToady that's probably what they want 18:22
audreyt my $x is Int := 0; # works
TimToady though = would get them there
audreyt my $x is Int := 0; $x = 123 # fails
that much is given
fglock random idea... - make different versions of mp6 with backend-optimized capabilities
audreyt yeah. the question is to when to fail
I think fail later is fin 18:23
fine
because, that is what happens in
sub f (Int $x is rw) { ... }; f(3) 18:24
TimToady I'd say it's one of those things where it's guaranteed to fail at runtime but okay to prognosticate at compile time when you know it will fail at runtime
audreyt sure. but what if the user only read it?
my Int $x; $x := 3; say $x + 3;
kosher the? 18:25
kosher then?
TimToady why not?
audreyt cool
TimToady is the = that will fail
audreyt my Int $x; $x := [6,7,8]; # fails? Coerce-Array-to-3?
coercing would be rather horrible, yet that's what currently happens with the uncommitted pugs 18:26
TimToady but we can know that in the lexical scope, probably, assuming some sub doesn't rebind it
audreyt (because Int([6,7,8]) == 3)
TimToady sure, I think we can just blame the user there 18:27
audreyt ok...
I guess :)
audreyt goes back blaming the user
TimToady attempted coercion is how we see if the types are compatible, I guess.
audreyt *nod* 18:28
ajs_ If coercing and boxing can be told apart, I would expect that only the latter would ever be allowed with :=. Coercing implies the creation of a temporary that may have little or no relation to the given data to which the user thinks they're binding.
audreyt currently the coercion is performed in this order
Int([6,7,8]) calls first Array.Int
if not found, then &Int(Array) 18:29
i.e. the thing being coerced gets the first say
this is good enough in the simplistic view of the world
thong I wonder how can it plan nicely with perl6:Int-1.0.0
[particle] *coughs* 18:30
audreyt ajs_: yes, hence "horrible" above
ajs_ Is := really coercing though? Should it even touch the coercing logic? Or is ^foo.box an identity for all high-level types that gets invoked anywhere that boxing might be required? 18:32
TimToady what's the problem with that? Int can only be aliased to a single module longname in a given lexical scope
audreyt TimToady: sure. but what if MyArray wants to define two methods 18:33
18:33 offby1 joined
audreyt one for Int-1.0 and one for Int-2.0? 18:33
do we have a 18:34
sub "\0\0\0" { ... }
form?
TimToady that's part of why I was thinking about going to a module name more of the form Int:(:ver(1.0), :auth<JRANDOM>)
ajs_ goes back to work
TimToady or something like that 18:35
audreyt Int:<1.0 JRandom>
etc
but got your point
TimToady would prefer extensible :foo inside
audreyt but that means we extend that to var space too
TimToady but Int:ver():auth() would maybe work
audreyt can live with that 18:36
hopefully canonicalize the part nameds with simple sort
TimToady was wondering if we keep the Int-1.0 form as sugar
audreyt so it can end up storing as a simple string
and not worry about normalization
noncomparable IDs are really bad :)
TimToady *nod*
18:36 explorer joined
TimToady but basicaly it's a name mangling discipline 18:37
with real delims on what will be mangled
audreyt yup
Int:ver<3>:ver<4>
same as Int:ver<4>?
TimToady Int:ver(v3|v4)? 18:38
audreyt ask because of validity of infix:<+><-><*></>
TimToady hmm
audreyt would prefer it to just mean infix:</>
infix:<+>:<->:<*>:</> really 18:39
TimToady that sounds to me rather like P5's last-value-of-the-list-itis
audreyt but same thing
*nod*
ok, so maybe not, but
infix:<x>:<y>
infix:<y>:<x>
wondering if they mean the same thing as
TimToady maybe no dups allowed for a given adverb
audreyt infix:<x y>
actualy
best if they don't 18:40
TimToady with nameds, dups come in as [,,]
audreyt then we have a very good syntax
circumfix:<(>:<)>
TimToady same as :<( )>
seems good
audreyt cool
PerlJam greetings #perl6 18:41
audreyt so any infix with the second part becomes ternary?
infix:<foo>:<bar>
3 foo bar 4
er 18:42
3 foo 4 bar 5
TimToady maybe--I just hardwired it to look for a properly precedented EXPR for ??!!
but could probably generalize
audreyt k 18:43
TimToady PerlJam: howdy doody
audreyt so when Pugs.Parser sees infix:<=>
18:43 Psyche^ joined
audreyt it should install infix:sym<=> 18:43
in order for STD-hook to work?
TimToady infix:<=> is the name of the sub, infix:sym<=> is the name of the rule that parses the sub 18:44
audreyt the symness is determined by \w-ness of first char?
okay.
TimToady have to keep the two names straight
PerlJam Do either of you have a good email address for chromatic?
TimToady or STD can't talk about its own infix:<=>
audreyt PerlJam: @wgz.org 18:45
PerlJam audreyt: thanks.
audreyt np :)
TimToady: that's all for it now :) thanks for the explanation
TimToady hmm, well, I was think of the non-symness determined by the \W-ness, but yes
audreyt btw, implementatation of STATUS still on hold, but it's not of priority now :) 18:46
TimToady in backlog?
audreyt quite a while ago
TimToady k
audreyt the comment was %hash.:exists{3,4,5}
can't be passed as .STATUS(exists => {3,4,5})
for obvious reasons
so spec is bogus 18:47
TimToady direct will probably be okay
audreyt k then
so .:foo just translates to ~~ foo
so .:foo just translates to ~~ :foo
that's easy enough
TimToady still need to work the inversion in there somehow 18:48
so that the pattern controls the meaning
well, will think about that later 18:49
back to the backlog &
audreyt :)
18:50 Psyche^ is now known as Patterner
fglock I wonder if it makes sense for pugs to link to perl-5.9.x, and then use the new regex engine in PCR 18:53
PerlJam fglock: why not? If you need bleeding edge ghc, why not up the perl requirement too :) 18:54
fglock yes 18:55
audreyt fglock: or you can check $^V...
and load two different backends
18:58 jisom joined
TimToady Is there any important reason why prototypes like Int should be considered true rather than false 18:59
audreyt eval ?Int 19:00
TimToady I would like index to always return a StrPos, but it would be nice if the bare StrPos was false
audreyt ?eval ?Int
TimToady it's currently true
evalbot_r15509 Bool::False
TimToady odd
audreyt a bare anything is already false
TimToady was true here
audreyt as well as undefined
TimToady ?eval say true Int 19:01
evalbot_r15509 OUTPUT[ā¤] Bool::True
TimToady okay, misread the return
audreyt :D
fglock how about to return a Match object
TimToady good. changing to always return StrPos, which can be false
audreyt so StrPos of 0 is true
?
TimToady yes
but you should not be thinking of them as integers, grr!!!
audreyt ok, that makes a lot more sense than 0/undef. 19:02
sure.
TimToady Match seems like overkill
PerlJam I'd thought that bare "types" were our typed-undef constructors and should be false anyway
TimToady as long as we get a good message if you use an undefined StrPos, I'm happy 19:03
audreyt that is correct.
undefined StrPos numifies to Error, I'd expect
or rather, Failure.
I would rather undefined Int numify to Failure too... 19:04
but undefined Str stringify to "Str" ;)
gaal audreyt: okay, the library topsort (of course) doesn't deal with cycles. it uses reverse postorder of dfs, as far as i can see simply giving wrong output if the graph has cycles
audreyt gaal: ok...
gaal so we need to implement something ourselves 19:05
audreyt sad :/
gaal that unifies items into an, uh, isoset to invent a term, as they are discovered to be cyclical
fglock dmq: ping? 19:06
gaal is big-O important here at all? how many sigs do we have in the candidate set? 19:07
svnbot6 r15510 | lwall++ | Just the definition of index flapping in the breeze...
audreyt well, we do that all the time :)
but we can memoize the decisions
gaal sure, but it may be one of those things where complexity is dwarfed by concrete implementation 19:08
audreyt sure, so maybe just brute force something
I can think of plenty of O(n^2) algorithms...
gaal not that I'm 100% clear on how to do that yet
fglock audreyt: re plan to use ropes - how does this affects pugs using p5strings/regexes 19:10
audreyt fglock: not at all 19:13
TimToady the problem with going to Tahiti by constraints is that most people just want to say "Take me to Tahiti" most of the time. It's the brandname as a shortcut for thought problem, basically, but there are times when named equivalence is just a heck of a lot easier than structural.
gaal TimToady: but task a C programmer with writing a doubling function, and he'll just assume it's on ints, most of the time 19:15
because int is a bogus brandname for number 19:16
or, and I know you like this one, sleep(42.5) 19:17
TimToady you'll notice I was shifting the blame to the user again. :)
ajs_ Dunno if this was said, but with respect to the "no dups of a given adverb" discussion, above, what about overriding an expanded capture? eg: 19:18
foo(|($c), :x<1>) # my capture-expanding syntax might be wrong
Does that fail if :x is given in $c? 19:19
TimToady good question, at the moment I think it's defined to turn the x arg into a list of values
but that's maybe not what was intended
audreyt actually, a hypothetical list
gaal audreyt: this really looks O(n^more than 2) to me; consider that a cycle may in fact play together with other nodes in another cycle
audreyt if @x is at the receiving end it gets the list 19:20
TimToady oh, right, that's how we handled it
nevermind
audreyt otherwise it gets last
S06:454
<- was just implementing that very part :)
ajs_ coolness
PerlJam sounds sane to me.
TimToady and here I thought you were just smart.
audreyt :) 19:21
TimToady shifting the blame to the implementor...
PerlJam It probably helps to have an eidetic memory :)
TimToady my wife has one of those, but it's singularly unhelpful with geographical problems unless she's been looking at a map.
audreyt gaal: true. to run the comparisons is n^2 19:22
gaal there's only so many maps...
audreyt what, you mean there are only finite worlds?
gaal there are certainly unmapped worlds... 19:23
PerlJam audreyt: no, we've only generated a finite number of 2d representations.
audreyt but I thought each world is a map of itself...
...never mind :)
TimToady gaal: you're confusing the map function with the data territory 19:24
gaal greps for his map of puns
ajs_ domain and codomain confusion? Quite common
19:25 CardinalNumber joined
TimToady map is the shortname, but map:of<Italy>:in<1492> is a longer name... 19:25
gaal that would make for some interesting detours in a trip... 19:26
old enough, and you don't get the Himalayas 19:27
(I bet your maps of Italy don't have the Himalayas...) 19:28
TimToady just returns a MapPos that is false 19:29
audreyt ok, rerunning smokes to see if we stil fail 99% of it...
gaal audreyt: are all Sigs comparable to each other, necessarily? 19:30
and doesn't the comparison have to take place under context of the present capture? 19:31
audreyt gaal: sure, we assume that f already closes over the capture
which is why it's not (Ord Sig) =>
gaal oh ok...
wolverian where do the cycles come from? 19:32
gaal outer space?
I remember spinclad and putter discussing zombies when figuring out multi dispatch 19:33
it was kinda scary!
audreyt well, strictly speaking, there are ties, but I'm not sure there are cycles
wolverian hm, that'd make for fun error messages... "Error: Too many zombies from outer space"
audreyt pugs> moose() 19:34
*** No such subroutine: "&moose"
pugs> kill()
*** No compatible multi variant found: "&kill"
yay, finally got that to work
the second message can use some English help
gaal you call that working? /me rushes to add a global &moose...
audreyt lol 19:35
obra if gaal gets &moose, I demand &squirrel
moritz wants &beaver ;)
audreyt obra: I didn't know that you're fond of squirrels... 19:36
mugwump phiker: hello
[particle] i reserve &parrot
phiker mugwump, I saw that there has been a recent update of cpan6.org
and the "contribute"-link was removed
kolibrie claims &hummingbird 19:37
phiker so thereĀ“s some work going on again?
(and the sponsors list was added)
moritz it seems they are finished, no need for more contributors ;-)
Debolaz Ah crap, if I try to install pugs multiple times it'll ignore the files already installed and there's no uninstall so I have to remove all files manually from all the various directories in order to produce a usefull install paste.. 19:38
gaal but really then: what scenario is the spec conceiving in which there are cycles?
Debolaz Well, at least it seems that /lib/perl6 is the sinner anyway, it installs that in the perl 5 prefix rather than the PREFIX that I specified. 19:39
allbery_b thinks doing make install on pugs is something of a bad idea until it's released
especially given that INSTALL documents $PREFIX as being b0rked
Debolaz allbery_b: Yes, but Audrey asked if PREFIX did the right thing above. :-) 19:40
moritz yay, build .debs ;)
obra audreyt: moose + squirrel.
gaal and is the ordering assured associative? specifically, is it guaranteed that if x EQ y, and z LT x, that also z LT y?
Debolaz So I figured I'd give it a spin.
audreyt obra: ah, got it now.
gaal allbery_b: I think releasing pugs is a bad idea until somebody fixes the installer :)
mugwump phiker, markov got some sponsorship for his idea. I don't know what his plan for managing contributions is now 19:41
audreyt gaal: no, not that.
phiker so heĀ“ll continue with the xml-schema-stuff?
audreyt gaal: otherwise we'll just use mergesort
mugwump I haven't seen any change in direction on that front
19:42 CardinalNumber is now known as ProperNoun
phiker :( 19:42
19:43 Endymion joined
gaal then how do we correctly infer tie groups? do we have to start with comparing everybody to everybody else? (not very topsort any more) 19:43
audreyt gaal: that was the naive algorithm I mentioned 19:44
then we get n*(n-1)/2 Ordering and work with them 19:45
mugwump he has written XML::Compile, which apparently does XML Schema validation in pure perl and lets you transform to YAML tidily 19:46
gaal I still don't really get it; in a usual dag of this kind, you have a partial ordering, but if you assume no cycles then relations are associative so long as it's a connected graph. right?
audreyt if we are clever, and know that in [a,b,c] we have a<>b and a>c, we don't need to calculate b,c
gaal audreyt: earlier you said we aren't guaranteed associativity? 19:47
which is what I'm not getting. where can cycles show up in the concrete problem? 19:49
19:51 thepler joined
audreyt A:(Str, Int) B:(Str, Odd) C:(Int, Str) with \(Odd, Int) we have A<>C B>A B<>C 19:53
if <> is =, then B>A, A=C should gte B>C
but it's not =
er sorry, \(Int, Odd). 19:55
assuming Int :>: Odd and both are compatible (can be casted to) Str 19:56
fglock is this supposed to work? pugs -e ' use v5; printf "version is v%vd\n", $^V; '
audreyt actually, change Str to Object would work too.
fglock pugs: Printf.printf: bad formatting char v
audreyt worksforme 19:57
older version of pugs?
fglock yes
audreyt ?eval use v5; printf "version is v%vd\n", $^V;
evalbot_r15509 1.0
audreyt hm.
?eval use v5; sprintf "version is v%vd\n", $^V;
gaal uh, we allow v5 in evalbot?
evalbot_r15509 "version is v5.8.8\n" 19:58
audreyt better.
19:58 riffraff joined
gaal not very safe.. 19:58
audreyt why not?
?eval use v5; `cat /etc/passwd`
evalbot_r15509 Error eval perl5: "sub { use ops (':default', 'binmode', 'entereval');my ($__evalbot_print) = @_;; `cat /etc/passwd`ā¤ā¤}"ā¤*** 'quoted execution (``, qx)' trapped by operation mask at (eval 2) line 1.ā¤ā¤Error: Undefined subroutine &main:: called.ā¤
audreyt you see, perl5 also has a sandbox.
gaal where's it implemented? Safe? 19:59
audreyt ops
same thing
gaal cool
riffraff hello
gaal this is pretty new, isn't it?
audreyt 5.00307 20:00
not exactly very new
moritz hi riffraff ;)
gaal I... never heard of it :(
mugwump predates that I think
audreyt :) 20:01
mugwump: corelist ops says that
mugwump added in perl5.002beta1.2b1g
audreyt Safe is 5.002, though
20:01 dduncan joined
audreyt so you may be right 20:01
er, ok :)
mugwump++
dduncan are any of you familiar with a language named Lua? 20:02
audreyt mugwump: you mean 5.002b1g, right?
I was wondering if perl had three-part versions before... :) 20:03
dduncan perl sort of had 3 part versions since 5.6.0 at least, if not 5.0.0
mugwump yes, that's right. the announcement in the patch was "This is patch.2b1g to perl5.002beta1."
dduncan or before
mugwump sure, the SUBVERSION
ayrnieu man perlhist 20:04
dduncan - yes, why?
dduncan yesterday I was talking with someone in RL about my DBMS project and they strongly recommended I looked at the Lua language ... apparently a lot of design principles of what I was doing was in that language 20:05
eg, a metamodel 20:06
everything being tables, or something
so now people have given me comparisons to both Ada and Lua
ayrnieu Yes. It's not really an obscure language :-)
[particle] there's a lua impl on parrot 20:07
dduncan while I had heard the name before, I didn't know anything else about it until yesterday
it also occurred to me that there may be considerable overlap between what one can do with Lua's metamodel and Perl 6's, so I almost wondered if Lua was one of the inspirations for Perl 6 design 20:08
or if there was some common influence on those lines
ayrnieu particle - rt.perl.org/rt3/Ticket/Display.html?id=41726 :-) 20:09
lambdabot Title: #41726: [PATCH] make lua fail more gracefully with an exception handler
dduncan yes, I saw the comment about it being on Parrot
ayrnieu dduncan - which comment do you mean? 20:10
dduncan [particle]: there's a lua impl on parrot
2 minutes ago
audreyt hm, only 1000 new failures so far 20:11
ayrnieu ah, you know, not everything said in the channel is directed at you. You don't have to wierdly acknowledge it like that..
also, weirdly.
audreyt I guess I'll have to fix them later. till tomorrow... &
gaal good night, audreyt 20:12
gaal sleeps also
TimToady night
dduncan ayrnieu, well it seemed like it was, given the strong coincidence
I mention Lua out of the blue, something not usually brought up here, one person says its on Parrot, and someone else shows a ticket that proves the point 20:13
ayrnieu I'm sure that more careful reading can clear things up for you.
dduncan but no matter, its history now
riffraff sorry for the dumb question: for foo() -> $a,$b {} (wehre foo returns an array of pairs) should assign both $a and $b, right? 20:14
moritz it should assign a pair to each I guess 20:15
riffraff oh 20:16
still doesn't work, cause $b comes out undefined
moritz riffraff: but you should not rely on my p6-"knowledge"
riffraff: even number of items?
riffraff well, I still appreciate your help :)
moritz ?eval for (1 .. 3) -> my $a, $b { print "a: $a; b: $b " } 20:17
evalbot_r15509 OUTPUT[a: 1; b: 2 a: 3; b: ] undef
riffraff argh 20:18
moritz funny, at home I get "undeclared variable "$b" in the last iteration
[particle] as a warning? 20:19
dduncan aren't they spelled $^a and $^b or some such now?
riffraff moritz: same here
dduncan the special sort variables
riffraff the special ones don't work with for loops, it seem 20:20
moritz dduncan: not when you explitly declare them with ->
riffraff at least on my box
dduncan oh never mind, I see you declared them explicitly
20:20 rashakil joined, amnesiac joined 20:23 Southen joined
fglock is there a recent build of pugs for darwin? 20:23
riffraff I'm running it on my macbook, if that counts 20:24
I mean: it compiles :)
svnbot6 r15511 | gabriele++ | solved 99problems 36 and 37
fglock is there a way to specify the perl5 path when building pugs? 20:29
I'll try it with 'path/to/perl Makefile.PL' 20:30
mm - "... Detected uninstalled Perl. Trying to continue." 20:33
moritz os $obj.clone implented?
20:36 dec joined
moritz apparently not really.. 20:37
fglock moritz: $obj1 = $obj2 should clone by default 20:39
moritz fglock: $a = $b.clone doesn't clone arrays 20:40
fglock ?eval $a=[1..3];$b=$a;$b[1]=42;$a 20:41
evalbot_r15509 [1, 42, 3]
fglock :(
moritz or with classes: 20:42
?eval class A { has @.a is rw }; my $b=A.new; $b.a[0]=3; my $c = $b.clone; $c.a[0]=2; say $b.a[0]
evalbot_r15509 OUTPUT[2ā¤] Bool::True
moritz so how do you deep clone arrays? 20:43
2d-arrays, that is
20:43 stevan_ joined
moritz and secondly, are assignnemnts to 'self' allowed? 20:45
fglock got it: ./pugs -e ' use v5; printf "version is v%vd\n", $^V; ' # version is v5.9.4
kolibrie fglock: yay! 20:46
fglock ?eval $a=[1..3];$b=@($a);$b[1]=42;$a
evalbot_r15509 [1, 42, 3]
moritz well, my Sudoku solver will have to wait until cloning is implemented (and easy accessible) ;) 20:47
fglock ?eval $a=[1..3];$b=[@($a)];$b[1]=42;$a
evalbot_r15509 [1, 2, 3] 20:48
fglock that's perl5ish
moritz that's very... intuitiv ;)
20:49 ashleyb joined
broquaint ?eval [1,2,3].clone() 20:49
evalbot_r15509 Error: Pattern match failure in do expression at src/Pugs/Prim.hs:1309:4-14
tene ?eval @a = 1..3; @b = @a; @b[1]=42; @a 20:50
evalbot_r15509 [1, 2, 3]
moritz tene++
tene fglock, moritz: $array is a reference to an array. the reference was being cloned, not the array.
moritz tene: and know the same for objects that contain nested arrays ;)
tene moritz: eh? 20:51
moritz tene: well, I have a class that 'has' an array of arrays... 20:52
tene: and I'd like to be able to clone instances of that class
tene: deeply clone, that is
20:52 the_dormant joined 20:53 BooK joined 20:54 awwaiid_ joined
tene does Perl 6 have arrays of arrays instead of just arrays of references to arrays? 20:54
moritz the latter, I guess 20:55
kolibrie there are no references in Perl 6
moritz I just use @a = [1, 2], [3, 4]
and access it via @a[0][1]
tene ?eval @a = [1..3],[1..3],[1..3] 20:56
evalbot_r15509 [[1, 2, 3], [1, 2, 3], [1, 2, 3]]
[particle] ?eval @a= [1..2],[1..2]; @b = @a; @b[1][1] = 42; @a 20:57
evalbot_r15509 [[1, 2], [1, 42]]
tene There are always multidimensional arrays, which I don't think have been implemented yet and have had changing syntax recently. 20:58
Juerd tene: What was formerly called "a reference to an array", is now called "an array", and behaves the same way 20:59
[particle] looks like either we can't figure out deep clone, or it's broken
Juerd tene: Depending on the sigil, @ or $, the array flattens in list context, or not. 21:00
tene Juerd: 21:01
?eval $a = 1..3; $b = $a; $b[0]=42; $a 21:02
evalbot_r15509 [42, 2, 3]
tene ?eval @a= [1..2],[1..2]; @b = @a; @b[1][1] = 42; @a
evalbot_r15509 [[1, 2], [1, 42]] 21:03
tene what is that behavior if not references to arrays?
Juerd tene: As said, they behave like before. 21:04
21:04 bernhard joined
tene I don't understand what you're saying, then. 21:04
21:05 awwaiid joined
rhr out of curiosity, why was @array.join("...") changed to "...".join(@array)? I liked the way things like @array.pick(3).join("x") read 21:18
tene (1..3).join('x') 21:19
?eval (1..3).join('x')
evalbot_r15509 "1x2x3"
tene ?eval (1..100).pick(3).join('x')
evalbot_r15509 "67x77x24"
tene rhr: what exactly is the problem? 21:20
[particle] ?eval "x".join(1..3)
evalbot_r15509 "1x2x3"
[particle] rhr: it works either way
moritz that's... magic
[particle] it's christmas!
moritz not quite ;) 21:21
rhr see dev.pugscode.org/changeset/15500, it was just changed afaics
lambdabot Title: Changeset 15500 - Pugs - Trac
rhr in the spec anyway
[particle] ?eval 'x'.join('y') 21:22
evalbot_r15509 "y"
[particle] ?eval 'x'.join('')
evalbot_r15509 ""
Aankhen`` stevan_: Ping? 21:32
21:36 larsen_ joined 21:40 justatheory_ joined 21:51 iblechbot joined
Gothmog__ ?eval ('x').join('y') 21:53
evalbot_r15509 "y"
Gothmog__ ?eval ['x'].join('y')
evalbot_r15509 "x"
TimToady ?eval ('x',).join('y') 21:56
?eval ('x',).join('y')
evalbot_r15509 "x"
TimToady parens by themselve cannot turn a scalar into a list 21:57
& 21:59
svnbot6 r15512 | lwall++ | Whack on the cat() a bit.
stevan_ Aankhen``: pong 22:01
Aankhen`` stevan_: I was about to ask you about Moose, but peregrin answered my questions. Thanks anyway. ^_^ 22:02
22:04 devogon joined 22:06 Psyche^ joined 22:07 koye joined
Gothmog__ So, () just forces precedence, and , creates a list. 22:08
mj41 hi, is there any way how to get forgotten svn passwd? username rootmj, thanks 22:09
tene mj41: that's why you should allow keyloggers on your system, so all your passwords get published on the internet for easy retrieval. 22:10
stevan_ Aankhen``: irc.perl.org#moose is the best place to ask :)
Aankhen`` Yup, joined there at his behest. ;-)
22:22 Psyche^ is now known as Patterner 22:29 [particle] joined 22:32 dduncan left 22:38 gnuvince joined 23:25 Limbic_Region joined 23:33 justatheory joined 23:57 forsaken joined 23:58 forsaken joined