The Return of the Journal : pugs.blogs.com/ | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6
Set by GammaRay on 31 December 2005.
pasteling "aufrank" at 65.37.87.113 pasted "YAML bug during compilation of Pugs.AST.Internals" (25 lines, 1.7K) at sial.org/pbot/15472 00:01
00:07 penk joined 00:09 mjl69 joined
aufrank audreyt: ping 00:13
gaal: ping
ingy: ping 00:14
tewk ll 00:18
00:21 Cryptic_K joined 00:37 knewt_ joined 00:54 stevan_ joined 01:06 dolmans joined 01:15 dec joined
dec perlbot: tutorial 01:16
perlbot perlmonks.org/index.pl?node=Tutorials | perl.com/cs/user/query/q/6?id_topic=74 | learn.perl.org/ | books.perl.org/onlinebooks | perl-begin.berlios.de/tutorials/ | learn.perl.org/library/beginning_perl/
dec perlbot: perl6 tutorial
damnit.
01:21 scook0 joined 01:23 penk left
scook0 dec: looking for anything in particular? 01:23
dec Not really. I want to get started with perl6 :) 01:24
the language mostly, not development of pugs.
scook0 I don't know how much 'tutorial'-type material there is... 01:25
01:25 jiing_mIRC joined
scook0 have you looked at the Synopses? 01:25
there's also svn.openfoundry.org/pugs/docs/quickref/
dec The synopses will be a good start.
I'll go check them out.
Thanks :)
scook0 dec: try to get recent ones though, as I've heard some sites only have older versions 01:26
dec I was looking at dev.perl.org/perl6/doc/synopsis.html 01:27
I know this is a pretty ambiguous question..... but how "stable" is perl6 under pugs? 01:28
theorbtwo Depends what you mean by stable. It will pretty reliably, I think, do the same thing when you do the same thing multiple times. 01:29
Things that are working tend to stay working across upgrades to pugs.
OTOH, there are large swaths of functionality that is specced but not there... 01:30
...and the spec itself changes fairly often.
dec hehe.. okay, thanks 01:31
01:34 oylenshpeegul joined 01:35 Cryptic_K joined 01:37 penk joined 01:45 putter joined
putter theorbtwo: two thoughts in the category of random brainstorming about p6 editing aids: 01:46
theorbtwo nopaste? 01:47
Er, nevermind, is in topic.
01:48 oylenshpeegul left
putter it would be nice to have an "explain" function which took a section of source (aka "line noise"), and explained wtf it all means. I imaging if one had a thousandth cent for each time it was used by new p6 users, one would quickly be rich. 01:48
putter was thinking, hmm, nopaste _could_ be an interesting editing aid !;)
pasteling "theorbtwo" at 212.225.34.71 pasted "#!/usr/bin/perl use warnings;" (170 lines, 4.6K) at sial.org/pbot/15473 01:49
theorbtwo Hm, "WTF it all means" is /way/ too open to interpretation. 01:50
Anyway, to use that, do something along the lines of ./pugs -CParse-YAML whatever.pl | perl colorize.pl | less, and look for the Handled: bit.
putter hmm... which raises the question, do any of the AES mention docstrings, or otherwise the mechanically accessible documentation of code? one could have a macro which doc "ffooo" which also grabbed $?SUB, $?LINE, etc. Perhaps even grab and set-to-empty-string the preceeding $=POD? 01:51
theorbtwo Also, if the last line is not "Got them all!", there's a bug.
putter looking....
theorbtwo It is, quite obviously, not done yet.
putter in p6 it will get easier, eg, you can replace the big if with multis. multi handle_it(pugs::Var $x) {...} 01:57
theorbtwo I could probably do a lot of visual clean-up now.
For example, instead of a big if on the class of $it in handle_it, I could inject a method into the handled classes. 01:58
putter multi methods, aka, instant injection :)
I wonder if yaml has a way to do a tree walk. so one doesnt need to do the @yaml_lines thing. 01:59
na, never mind. 02:01
theorbtwo I wanted to do it before YAML parsing, though -- until I switched to YAML::Syck, I needed to set up the class mapping.
dec damnit, i'm in over my head already and i'm only up to the 2nd Perl6 spec. :P 02:05
putter oh, before I forget, the other editing random idea was to have an "expand", which converts say <<{+@a}>> into say quote_with_interpolation(closure_in_quote(array_length(@a))). which is reversible.
dec: the learning curve on p6 is going to be major issue. it will be like p5 - everyone uses a dialect, with just a subset of the language's features. unlike with p5, it may be critical to establish a "common dialect kernel". a "default to doing it one way". or the CPAN experience of "I see the code. I have no idea what it means" may become common. 02:10
dec Mmmm. The code I understand, it is the literal english specifications of the code that I don't. 02:11
theorbtwo Anyway, putter, one of the major issues with that code seems to be that I'm still not getting as much in the way of location information as I'd like. 02:13
putter you might want to start with docs/other/porting_howto and looking through the examples/ . just to start with the experience of "yes, this is perl, i still have a feel for this, even if I'm not yet clear on all the details". the synopses are like a language reference spec, chopped up, pasted on index cards, and tossed up into the air and onto a desk (well, maybe not quite that bad). you have to get a feel for the big picture first. 02:14
dec: ah, neat, just as I anticipated. :) :) 02:15
dec Yes, I'm reading the porting howto's at the moment. They've made the most sense so far. :) 02:17
I like the 'for @baz -> $foo { ... }' syntax. it's sexy. :)
robkinyon seen stevan 02:18
jabbot robkinyon: stevan was seen 7 hours 38 minutes 32 seconds ago
robkinyon seen stevan_
jabbot robkinyon: stevan_ was seen 7 hours 44 minutes 40 seconds ago
putter theorbtwo: there used to be a _lot_ more pos'es. they were making things visually cluttered and obscure for backend development, so the number dropped dramatically. I'm not sure how to handle that. -C is somewhat a small peep-hole to make complex requests. -C Parser-YAML-LotsOfPos ;)
theorbtwo dec: Also, very general, which is very very good. 02:19
dec theorbtwo - yes, indeed 02:20
I just wish I knew _why_ these things had been changed and what the significance of it is.
But to learn that, I'd have to read through the specs - which I don't understand.
:P
putter There is a wiki pugs.kwiki.org/ . Perhaps we should start a page GettingStartedAdvice? Then as you think "oh, it thought it was foo, but it turned out to be bar", or "hee was very useful to clarify qux", we could collect that. so the next person has a leg-up. it's hard for folks who already know something to put 02:22
02:22 luqui joined
putter themselves back in the mental space of not knowing, to well judge what's useful/needed. 02:22
dec I'll try and keep some notes as I learn :) 02:23
scook0 putter: I think the wiki is now deprecated in favour of putting reusable docs straight in svn
putter dec: actually, the _why_, the design rationale, is mostly only available on the p6l mailing list. there's another book for someone to help write.
dec Oh ok. 02:24
02:24 penk left
dec Maybe I should subscribe to the mailing list then :) 02:24
putter scook0: true. but for something like this... most newbies wont have a commit bit during the time of interest. even pugs isnt doing "hi, I heard about p6, and wanted to kno [interrupt - "here, have a commit bit"]". close, but not quite ;) 02:26
theorbtwo wonders if his metacommitter bit is still active.
putter www.nntp.perl.org/group/perl.perl6.compiler aspn.activestate.com/ASPN/Mail/Brow...6-language 02:27
from the wiki ;). there really needs to be a way to do two-way wiki-svn integration.
like a mailing-list<->newgroup gateway. 02:28
02:29 Amnesiac joined
putter wonders is test-driven development is quite the right thing. adding tests for unimplemented language features is a wonderful Right Thing. but spending time on :16<3a> alternate-base number representation, instead of on say piln, seems suboptimal. 02:32
putter goes off to add parsing for :16<3a>...
SamB well, you have to write the low-hanging tests 02:34
putter no question. but maybe they should go in as / be quickly changed to :todo<feature>. 02:35
dolmans i am now reading the Synopses, there are reduction operators [*] @array, dose there still a normal `reduce' operator, i think sometimes i prefer use english word
putter dont even have to be low-hanging. it would be useful for someone to do a systematic walk through the synopses, generating missing tests.
luqui dolmans, yes, "reduce" still exists 02:36
dolmans luqui: thx
luqui dolmans, yeah, english is nice, but reduce is especially necessary for reductions that aren't over a predefined infix operator... 02:38
SamB luqui: what? you people still need infix ops *predefined*? 02:39
how primitive!
luqui yeah... haskell's simple syntax is nice for not having to predefine operators 02:40
unfortunately, perl 6's syntax is about as far from simple as it gets
theorbtwo Writing any operator as prefix is easy, but AFAIK, there's no simple way to infixify a prefix op.
luqui ? 02:41
I don't follow theorbtwo
are you talking about, eg. haskell's `op` syntax? 02:42
theorbtwo Yeah.
There's no p6 equiv to it.
luqui say $foo; $foo.say
(though that's not in general equivalent)
dolmans i heard ruby even can 1.print; am i right? 02:43
luqui but that's because print is actually a method on numerals
02:43 vel__ joined
putter macro prepostcircumfix:<` `>($lhs,$op,$rhs) { "$op($lhs,$rhs)" } ? or something like that. 02:43
luqui doubts the correctness of the now-ubiquitous $foo.say 02:44
putter, incircumfix:<` `> ?
putter could be. I remembered postcircumfix, and extrapolated ;)
theorbtwo That's prefix:<$op>($lhs, $rhs), though. 02:45
Other then that, IWFM, assuming `` isn't gramatically ambigious there.
putter there's a table in one of the AES
luqui `` isn't in the language yet IIRC
it's the character that everybody will use for their custom operators.... 02:46
because it's the only one on the keyboard that doesn't already have a meaning!
\xe6var can I define a "n-fix"? i.e. a n-ary operator nary<? :> ($x, $y, $z) ... nary:<x y z> ($x, $y, $z, $a) ...
putter "macro's... your only one line away from having anything you want in the language" (not really of course)
luqui: lol 02:47
luqui \xe6var, well, not currently
SamB luqui: isn't that outfix?
\xe6var luqui: I mean in perl 6-foo
putter "and battle was joined over the precious "only character on the keyboard that doesnt (yet) already have a meaning"" 02:48
luqui \xe6var, right, and as currently specced, there's no *easy* way to do that
but I'm trying to get the OPP general enough to handle such arbitrary definitions
SamB putter: this is probably why p6 does that unicode thing
\xe6var luqui: woo;)
luqui but it may be that I'm trying to solve the LALR parsing problem 02:49
putter and, where's that link, the keyboard where each keyface has a led display... and keyboards are getting wizzier.
luqui which isn't dynamically modifiable
theorbtwo likes the key on his keyboard that means pretty much anything. 02:50
compose++
putter wants a full unicode keyboard. fiddle with say the num pad, and all the main keys walk over code space.
SamB wishes he had one of those
luqui ack, pugs is not building!
theorbtwo putter: It's just some fake photos and advertising copy.
luqui investigates 02:51
putter bummer. eventually...
theorbtwo I'm using europan keyboards with an en_US layout, which leaves the key just to the right of shift open to be a compose key.
SamB I should be using a Windows key as that... 02:52
02:53 vel__ left
putter \xe6var: that would be great. make the smalltalkers feel at home. cant quite do it yet. 02:53
theorbtwo I would, but I'm using an old IBM type M without a win key on my desktop. 02:55
putter really just wants to have 36 version of macro prefix:<:16>($n) {...}. but :16 is a little to weird a name for the parser at present. and the prelude doesnt need more cruft. sigh. "piln, piln, ra!" 02:57
slate.tunes.org/ Slate is a nice modern smalltalk-family language. use Languages::Slate::OnPerl6; ... ;) 02:59
svnbot6 r8713 | luqui++ | "fixed" the build by removing envImplicit from the YAMLization. Clearly 03:08
r8713 | luqui++ | this is wrong, but it's important to have our software building.
03:10 hcarty joined
putter ok, I'm going to punt on :8<15>. what I'd like to do is refactor possiblyApplyMacro to get a... ruleApplyMacroFoo? something which fails if the given name is not a macro. then pairAdverb can try :mumble as a macro before doing the usual. is that plausible? 03:11
anyway, experience suggests that flavor of parser mod can have an unfortunate impact on parse speed. so something to do after release, when there is time to detect and address. 03:12
luqui++
audreyt luqui: how did P.A.Internals fail envImplicit for you? it worksforme 03:20
(not that you should revert the change; I'd just like to know the error msg)
I just woke up -- going to find food and shop around for a bit; be back in ~4 hours
luqui no instance for YAML () 03:22
audreyt fixing 03:26
aha, you have parrotembed. 03:27
putter ?eval 3
audreyt s/parrotembed/perlembed/ 03:28
ok, fixed, but I don't have time to test/commit now 03:29
bbl 03:30
putter imaginary irc log: <audreyt> I have to leave now. <lambdacamel> problem mumble... <audreyt> well, I debugged it leaving the kitchen, wrote a fix walking through the living room, but now I've hit the front door and will have to test/commit later. <lambdacamel> ok, thanks. just another day at pugs. 03:34
hey, a real bug! is {("a" => 42),}.ref supposed to be ::Block? 03:35
doesnt like the ",", even with a second pair present. 03:36
03:54 hcarty left
luqui putter, you know, it might just be a ::Block 03:57
{} dwimmery is supposed to be stupid
i.e. { a => 42 } is a hash but { (a => 42) } might be a block 03:58
04:03 brentp left
putter luqui: maybe. but {("a" => 2),("b" => 3)} has to be a hash, no? a list of two pairs wrapped with {}? 04:09
luqui why? 04:10
{ "a" => 2, "b" => 3 } is equivalent
I'd say that (a => 2), (b => 3) is not a list of two pairs; it's a list of two expressions
we're doing syntactic dwimmery, which is tough to think about
it might be best to ignore parentheses
putter the parser is currently handling hashes by parsing them as blocks, and then groveling over the ast asking "does this look like a misparsed hash?". ;) inherently fragile. so I'm exploring whether the grovel missed a node.
luqui putter, it's a very well-defined "does this look like a misparsed hash?" 04:11
S04 IIRC
putter {("a" => 2)} parses as a hash...
luqui if the thing in the block is "either a pair or a list whose first element is a pair"
putter, then that might be wrong
(or a hash)
it's a question of interpretation 04:12
is (a => 2) a pair or not?
because: sub foo() { a => 2 } { foo() } is not a hash
by spec
luqui wonders if we should kill {} as a hash constructor, and simultaneously ducks 04:13
i.e. maybe we should do what we're doing with sets
and allow lists to double as hashes
but that's being very radical
and probably "enemy of the perl people" 04:14
putter back 04:23
I believe there was an Ann'otation node where the groveler wasnt expecting one. but adding that case completely breaks things, so I'm not understanding something. 04:25
luqui: the other ideas I'm afraid I have insufficient brain for just now. mindlessly emulating a tree walk is (maybe) just within reach. then its end of day 04:27
can one pattern match against one field of a mumble? exp@MkCode { subBody = bod } ? 04:33
luqui: i suspect what happens is that in sub foo() {} context, the block to hash conversion is not attemped. 04:36
luqui putter, yes you can match against one field 04:37
putter, I meant that: sub foo() { blah blah; a => 2 } { foo() } is not a hash
because foo() is not a pair
even though it will eventually return a pair
it is not one *syntactically*, and the hash/code dwimmery is a syntactic dwimmery 04:38
luqui will be in and out for a while... 04:39
Khisanth meh why not just leave it as sub { } 04:40
putter luqui: oh, yes.
Khisanth: huh?
Khisanth as opposed to overloading {} 04:41
putter oh, the problem is {("a" => 3)} is parsing as a hash (correctly according to the tests), but {("a" => 3),} is not. nor {("a" => 3),("b" => 4)}. 04:43
04:43 jiing_mIRC joined
Khisanth heh I guess somethings just don't change 04:44
putter they show up as Blocks. the parser works by parsing both as blocks, and then goes back and pattern matches the tree to see if it should be a hash instead. my working hypothesis is that pattern match doesnt quite handle the current ast. 04:45
s/both/blocks and hashes/
anyone know if Parser.hs file state ends up somewhere else? I'm in the odd state where svn diff is null, but when ./pugs is recreated, it's different than it was before I fiddled with Parser.hs. :( 04:55
04:55 dolmans left 05:12 stevan__ joined 05:29 justatheory joined
putter Anyone know why this 05:31
Stmts (Syn "\\{}" [Syn "," [Ann (Pos (MkPos "<interactive>" 1 4 1 12)) (App (Var "&infix:=>") Nothing [Ann (Cxt (CxtItem (mkType "Str"))) (Val (VStr "a")),Val (VInt 3)])]]) Noop 05:32
would be undef?
s/be/evaluate to/
05:40 justatheory joined
pasteling "putter" at 66.30.119.55 pasted "unfinished Parser.hs patch to address a hash misparse and t/builtins/perl.t failure" (33 lines, 1.3K) at sial.org/pbot/15478 05:41
putter end of day for me. paste has what seems to be an "almost but not quite" fix for the hash misparse. 05:42
good luck, and good night &
05:43 justatheory joined 05:53 mjl69 joined 05:55 elmex joined 05:57 Medvekoma joined 06:03 blm joined 06:37 GeJ joined 06:58 phredmoyer joined, phredmoyer left 07:11 stevan_ joined 07:14 tsume joined, tsume left 07:15 Cryptic_K left 07:16 gilby joined 07:32 iblechbot joined 07:44 brianski joined 08:03 __Ace__ joined
__Ace__ so, its possible to dl perl6 for testing? 08:04
luqui __Ace__, yep 08:05
__Ace__ ok, from where? :)
luqui __Ace__, well, what platform are you on?
__Ace__ Windows
luqui hmmm, so you probably need a binary
__Ace__ would prefer that yes :) 08:06
luqui there is a binary distro, but I don't quite remember what it's called. I'm looking.
tewk __Ace__: perl6 is a long ways from being finished, but you can definately start playing with pugs.
gaal pxperl
tewk PXPerl
luqui gaal, tewk, thanks 08:07
gaal I wonder how well-updated it is
luqui 6.2.9
tewk Last I checked, it wasn't :( 08:08
yep
luqui we're currently at 6.2.10... so, barring the amazing dev speed of pugs, it doesn't seem *too* out-of-date
gaal there were over 1000 commits since the last release :)
luqui but I don't really follow the release cycle
ahh. well, it'll give you a feel in any case 08:09
__Ace__ so, pugs is Perl6 alpha?
tewk Yeah, but .11 is coming soon and a lot has been changing
__Ace__: Yes. It really is a Perl6 interpreter at this point.
luqui __Ace__, yes, maybe even pre-alpha
it's a bootstrap... maybe, depending on how things go 08:10
tewk luqui is right, while very functional and fun to play with, it certainly isn't feature complete.
But then again I don't think all the features have even been defined yet :) 08:11
__Ace__ so, what is the eta for perl6 to be done anyway?
luqui tewk, it's pretty close. We're missing some details of the module system, and we're missing parametric roles and a type system, but other than that it's okay
__Ace__, by christmas
:-)
__Ace__ :) 08:12
luqui (not committing to which christmas, of course)
__Ace__ hey, no Win32:: in PXPerl! :) 08:13
08:14 pdcawley joined 08:51 G2 joined 08:57 kane_ joined 09:06 dec_ joined 09:08 nnunley joined 09:48 Cryptic_K joined
audreyt rehi! 09:54
audreyt goes back relenging 09:57
10:08 scw_ joined
svnbot6 r8714 | audreyt++ | * The deriving error has nothing to do with envImplicit 10:14
r8714 | audreyt++ | (and everything to do with PerlSV had a duplicate YAML
r8714 | audreyt++ | instance) -- fix it correctly.
r8715 | audreyt++ | * update symbolic_deref.t on CALLER with the recent env change. 10:17
r8716 | audreyt++ | * fix syck's warnings about missing prototypes.
r8717 | audreyt++ | * repair t/syntax/parsing/sub_calls.t regression: 10:29
r8717 | audreyt++ | Foo .(1)
r8717 | audreyt++ | is calling &Foo, not ::Foo.
r8718 | audreyt++ | * Eliminate both C and Haskell warnings from Data.Yaml.Syck. 10:35
r8719 | audreyt++ | * Ditto for DrIFT.YAML.
r8720 | audreyt++ | * Remove not (yet) used modules from Pugs.cabal: FPS, DrIFT.Binary. 10:38
r8721 | audreyt++ | * further suprress hsc warnings in D.Y.Syck.
10:42 joepurl joined 10:44 elmex joined
luqui audreyt, ping 10:55
audreyt pong. 10:56
luqui I've been thinking about an object model based on virtual classes
and I wanted to bounce it off you before I go and write about it
audreyt go ahead, I'll take your brain dump
audreyt is still relenging, so will reply slower
luqui isn't sure what relenging means...
svnbot6 r8722 | audreyt++ | * numbers.t: all underscore-related subtests now pass. 10:57
luqui we kill the concept of a parameterized type.
or, rather, parameterized class I suppose. Keep types out of it for the moment.
instead, we use the neat concept of a virtual class to provide all parameterization 10:58
consider: class List { class of {}; method fetch (Int --> of) {...} }
then a 'List of Int' is an anonymous subclass of List where "of" has been overriden to be int. 10:59
theorbtwo Morning, all.
audreyt theorbtwo: yo
luqui you could also sugar up other Foo[Bar] parameterizations to do a similar thing to named class members 11:00
audreyt you can override inner classes when you subclass stuff?
integral that would imply that classes are looked up via inheritance like methods! 11:01
audreyt that is weird.
integral it's a bit like perl5...
audreyt prior art?
luqui A12?
audreyt integral: not inner classes, no
luqui I think it talks about it a little bit.
audreyt A12 talks about everything a little bit.
it's not in S12 ;)
luqui :-p
anyway, suppose you can 11:02
11:02 chris2 joined
audreyt so innerc classes are just like methods 11:02
okay, go ahead... this is starting to sound voodoo
luqui I'm trying to go somewhere pretty nonconventional...
anyway, a generic sub:
audreyt it's fine as long as you can write down its semantic :) 11:03
luqui sub foo (SomeParametricRole ::R $x) { my R::of $y; ... }
so it's kinda like a compile-time method
okay, bringing types back into the picture: 11:04
a member class is not *exactly* like a method
because its usage imposes subtyping constraints on the class in which it is used 11:05
If it is used covariantly (return) within its outer class, then you must override it with a subclass of itself to maintain proper subtyping 11:06
svnbot6 r8723 | audreyt++ | * new backend: -CParse-Pretty, to show a pretty parse tree.
luqui and vice versa for contravariant (you must override it with a superclass of itself)
this pretty much requires that anything that has a member class is closed
however--it's possible to override it with things that don't satisfy these constraints 11:07
audreyt so you're talking about encoding generic types using overrided subclassing
luqui yep
audreyt it sounds like exactly what GJ does
luqui GJ?
audreyt so before you reinvent their proven alrogithm:
algorithm, even
homepages.inf.ed.ac.uk/wadler/gj/Documents/
it's now part of Java 1.5 11:08
luqui wonders how audreyt knows so many things about so many languages
audreyt (also see Scala's encoding in vObj.)
luqui okay, let me dump a few more lines, then I'll read
audreyt cool :)
luqui so, you can override a "generic" class with something that doesn't satisfy the aforementioned subtyping constrants 11:09
and that's okay, but you don't get a subtype back
so we're really talking about something more general than subclassing
it's more like "role composition" on a module level
something that does a role is not necessarily a subtype of that role
in fact, a role may not define a conventional type at all
but more like a typeclass predicate
and that's where you get generic modules 11:10
which is where this whole line of reasoning started
luqui thinks </dump>
audreyt I think you really want both the GJ paper and the vObj paper :) 11:11
I think the generics encoding is sane.
11:11 ohsix joined
luqui cool 11:12
luqui reads
audreyt though if we have dependent typing (type-operators-taking-value-parameters), the encoding of generics is far easier
luqui but type inference is pretty much dead...
audreyt not so; we'd require annotations
but p6 always require annotations for staticness
so we are on safe ground.
luqui hmm.. perhaps
audreyt i.e. it's late binding if you omit all type annotations by default 11:13
(cf. "two-level lambda calculus")
which discusses the early/late binding stuff. also the "Inlining as staged computation" paper linked from my blog -- but definitely GJ/vObj first
luqui thanks 11:14
audreyt s/also/the dynamic-and-static binding regime is also discussed in/
np :)
luqui is definitely going to brainstorm his masters thesis with audreyt to make sure he doesn't do something that someone else has done 11:15
if audreyt can't think of anybody who's done it, then it definitely hasn't been done! :-)
audreyt nah. ;) 11:16
I've just been spending way too much time on PL papers.
<- knows nothing about math, which is luqui's major
luqui but my focus is theoretical computer science
audreyt *nod*
luqui reads... for real 11:17
11:17 dec joined
luqui audreyt, do you know about pizza? 11:20
audreyt yup
luqui "in pizza the type of an expression may depend on the type expected by its context"
sounds like perl...
audreyt yeah, GJ grew out from Pizza 11:21
luqui so I just read :-)
audreyt well, it's not really like perl ;) the context is static
luqui so perl has more of an MMD context...
audreyt it's more like early bound multis decided by return types
luqui oh right, I meant to argue with you about your context conclusions
audreyt sure, go ahead :) 11:22
(with code, if possible)
(I mean demo code, not haskell prototype)
luqui so you claim that the "parametric" context model doesn't require the multiple inheritance restriction
in order for "want" to be well-defined 11:23
before I argue this, I'll define what I mean for want to be well-defined
that is, if want A and want B are both true, then A <: B or B <: A
that means that you can write a switch on want and be sure that you can pick an alternative unambiguously 11:24
but that definition itself seems to contradict the fact that you can have multiple inheritance
audreyt my claim is simply: 11:25
if you MI on parametric contexts, you don't get a unambiguous switch. 11:26
and we can detect and warn for that.
and if users want a MI ambiguous context, they should get it.
end of claim.
(cf. -fallow-undecided-instances in GHC)
luqui but you can't guarantee that modularly
audreyt undecidable-instances, even
why not? context, like everything else, is per compilation uint. 11:27
unit
luqui if MI is allowed, then there is no unambiguous switch that you can ever write
audreyt huh.
luqui i.e., let's say your switch is: given { want A { ... } want B { ... } }
I can just say: class C is A is B { }
and your switch is ambiguous
audreyt how is it different from any other switch? 11:28
luqui what do you mean?
audreyt i.e. not on want, but on objects that may have MI
given $obj { when A {...} when B {...} }
class C is A is B; $obj := C.new
audreyt is implementing x[1,2,3] 11:29
luqui hmmm... I remember reasoning about this when I proved the no MI thing
but, I don't seem to recall what I concluded ;-)
it had something to do with the fact that the context was a type, whereas the parameters were objects 11:30
audreyt implemented 11:31
leo_ audreyt: what should happen with this code: sub f ($x) { sub g () { print $x }; } f(10); g();
audreyt context has a static meaning as a type
and a dynamic meaning as an object
luqui audreyt, what kind of object is it?
it's certainly not the same kind of object as the parameters 11:32
"I'm expecting a 1"
audreyt luqui: a Cxt, I think
it's implemented as such currently
luqui ahh, but Cxt is a thing like "Int"
which is a type
it's an object, but its meaning is at the type level
audreyt ...so? 11:33
Int is also an object.
luqui so my conclusion had something to do with that :-p
audreyt my $obj = Int;
and you can also given/when on $obj.
leo_: 10.
leo_: larry's ruling
luqui let me try to rereason my way through this
11:34 nnunley joined
audreyt leo_: I think it's intuitive, or at least easy to explain. 11:34
certainly much more so than "will not stay shared"
luqui audreyt, what about: sub f ($x) { sub g() { print $x } } f(10); f(20); g();
audreyt luqui: 20, surely
luqui that's kind of nightmarish for concurrency 11:35
audreyt not so under STM.
luqui but I guess it's not that different from a shared var.
audreyt invites luqui to forget locking
indeed
leo_ audreyt: yes, the difference to the p6l post is though, that g() isn't called inside f(), therefore it's a bit tricky to create the closure
luqui it just seems wrong to allow that
sub f ($x) { sub g() { print $x } } g(); 11:36
audreyt leo_: but your :outer is already generated
leo_: since we have the invariant that the outer has to be allocated before inner
theorbtwo It seems wrong to /do/ that. I'm not so sure about /allowing/ it.
audreyt leo_: so surely you can ignore the call chain and perform tne closing at compile (LexInfo composition) time?
luqui sub f ($x, $i) { sub g() { print $x } f($x+1, $i-1) if $i } f(0, 5); g();
try that one on for size! 11:37
leo_ f doesn't know anything about that it'll be closed over later
audreyt leo_: f has a lexpad; isn't that sufficient?
leo_ but no persisten context
audreyt luqui: subroutine calls are just bindings via Sigs/Args. 11:38
luqui: and bindings are just method calls on Sigs.
luqui audreyt, but which pad does g() refer to?
audreyt luqui: so that is perfectly isomorphic to { my ($x, $i); sub g {... }; ($x, $i) := (...) }
luqui it's recursive, so there's not a single pad
audreyt luqui: you end up with a lexical scope dominated by dynamic scoping 11:39
luqui: which is, again, not something perl5 cannot do
luqui s/cannot/can/?
audreyt perl5 can do that happily
luqui oh...
audreyt *f = sub { *g = sub { ... } }
does that for you 11:40
luqui audreyt, so the order of the sub def matters!?
audreyt luqui: sure, if one is inner of another
luqui: that is pretty much inescapable
luqui I suppose it is if we allow this behavior
theorbtwo I've been operating on the assumption that every time sub x {...} is executed, you redefine the existing sub x.
That seems to follow the behavior being specced, no?
luqui theorbtwo, but sub x() { } is compile time! 11:41
audreyt theorbtwo: yes and yes.
luqui: it is _also_ runtime.
luqui audreyt, but:
audreyt perl subs has long have this dual nature
luqui if 0 { sub foo() { 42 } } foo()
audreyt it's closed once at compile time
luqui hmm, okay
audreyt and the closed as neccessary at runtime
s/the/then/
luqui that just gives me the shivers 11:42
but maybe it's a ideological issue
audreyt I actually like this :)
theorbtwo luqui: Um, so don't use it?
audreyt and note that python and ruby closes _only_ at runtime
which ought to give you more shivers.
luqui theorbtwo, I'm a language designer, it's my job to try to argue about things that give me the shivers
because it will probably give others the shivers too
but I'm used to losing arguments :-)
audreyt, yes, I'm aware of ruby's runtime-onlyness, which is very shiverifying 11:43
audreyt 12:37 < leo_> but no persisten context
leo_: elaborate?
leo_: you mean the regs are not allocated yet?
11:44 DaGo joined
leo_ if f(10) is called, it just returns and destroys the context 11:44
audreyt leo_: yes, and it should rebind g's context, no?
leo_ it doesn't know about sub g :outer(f)
luqui audreyt, time for some serious argument multitasking 11:45
audreyt, what does "want" mean?
if you're in Scalar context, should want Num return true?
leo_ it's different to the example posted on p6l
luqui if you're in Int context, should want Num return true?
audreyt leo_: yup, I see that... I'd like to know the feasibility of ignoring the call chain
leo_ I can it make working if needed 11:46
the p6l thingy already works, printing 20, 110
audreyt I think larry's (and my) preference is to make it work, if it doesn't harm performance much 11:47
but if outer has to belong in caller chian, then we still need a way to encode
{my $x; sub g {}}
which should always work
but yet violates the outer-in-caller criteria
so ignoring the call chain altogether is preferred
leo_ ok, I'll give it a try 11:48
audreyt luqui: surely not
luqui audreyt, in either case?
(I'm assuming that Int <: Num <: Scalar)
audreyt luqui: nod... I think want Num should return true on Int context, but not on Scalar context. 11:49
luqui want Foo asks if Cxt ~~ Foo 11:50
audreyt "do you want something that can fit into a Num?"
although I can argue bothways
luqui I think that a Num would fit into a Scalar
audreyt "do you want something that returning a Num would do?"
theorbtwo "If I returned a Num, would that satisfy you" is surely the more interesting question? 11:51
luqui oh wait, your language is unambiguous
theorbtwo, but it's not
luqui tries to find a wording for the reason 11:52
audreyt theorbtwo: I think too that it's the more interesting question. however, that question is answered by the regular typechecker, so it may make sense for "want" to work the other way.
i.e.
use Want; if (want('BOOL')) { ... } 11:53
luqui surely if you asked "am I in Numeric context" then an Int context should say that you are
audreyt the ... probably should not be run when the caller is expecting Any.
luqui Well, I think "if want" is a dubious construct anyway
want is more of an MMD concept
audreyt (the purpose of "want" is to reverse the variance.)
luqui: that was P5.
(Want.pm) 11:54
luqui knows
I've been saying "want switch", but I think thinking of it in terms of MMD will be more productive
and maybe "want" isn't a predicate but its own switch-like construct
because subtyping happens within it
and Java-like exception catching ordering deps suck 11:55
audreyt $ ./pugs -e 'say "\d[65,66,67,]"'
ABC
luqui but anyway, if we go with theorbtwo and say that "will it fit" is the more interesting question
theorbtwo It seems to me like the simplest thing to do is to make want just return the context, and you can put it on whichever side of ~~ you want.
luqui theorbtwo, *we*'re having trouble thinking about which way is right 11:56
audreyt theorbtwo: actually, S06 agrees with you.
theorbtwo: though the default "given want" places it at LHS of ~~
luqui so want Num returns false in Int context?
audreyt given want { when Num { ... } }
and want is Int
hurray, passes.
because Int~~Num is true. 11:57
it's all very consistent.
svnbot6 r8724 | audreyt++ | * implemented \x[1,2,3,].
luqui yes, but confusing
audreyt not to me, but well. :)
luqui "do you want a Num" is an ambiguous question
so a function that answers it is not going to DWIM all the time
and unless you understand the distinction between "want ~~ Foo" and "want Foo" (which I argue is hard to grasp) 11:58
then something bad (I couldn't think of a way to end that conditional ;-)
audreyt note that according to S06, want is nullary. 11:59
i'd like to keep it that way. :)
luqui really?
audreyt yes.
luqui oh, weird
I mean good
then it's not answering an ambiguous question anymore
theorbtwo grins.
audreyt ;)
luqui but you still have to grok "want ~~ Foo" and "Foo ~~ want" 12:00
audreyt which is fine
because people using wantarray should know what they are doing even in p5
luqui except my mind gets tangled around it really easily unless i step back and think really slowly and clearly
because its sortof contravariant but sortof not
audreyt, okay I buy the "know what they are doing" argument... 12:01
however! there is still the problem of return-type MMD
which one does it use? 12:02
audreyt myFunction :: forall a. IsContext a => SomeParamType -> a
myFunction = let want = typeOf (undefined :: a) in ...
is my model implemented in hs
luqui huh, hs does not match perl in that respect though
audreyt you can case over "want" just as easily.
how so? 12:03
luqui there is no return-type subtyping in hs
i.e. foo :: SomeClass a => a
means that I can return *any* a
audreyt actually it does
luqui no matter what type you want, I can give you it, as long as it is a SomeClass
audreyt no, that's not what it means 12:04
er wait
luqui maybe I'm thinking foggily, missing a level of indirection or something
audreyt your sentence can be read bothways :)
so, replace IsContext with Typeable
luqui forget the "I can return *any* a"
audreyt (which is pretty much a given for any type)
myFunction :: a
luqui foo :: Typeable a => a; foo = 42
error!
audreyt oh, you mean Int is subtype to Typeable 12:05
I see your argument
I don't agree though :)
luqui basically, with subtyping, the context is telling you something different than in haskell 12:06
haskell's context says "give me a Foo", and the well-typedness of your function guarantees that you can return a Foo
but in Perl, in Int context, you should be okay returning a Num, no? 12:07
(hmm, that last one is arguable)
let's see, how can I put this
theorbtwo You should be OK with anything that does Int.
luqui ahh, if you're switching between Scalar and List context
theorbtwo I think you're thinking of the wrong higherchy entirely...
audreyt luqui: wait, Haskell also has subtyping
luqui surely an Int context should choose the Scalar switch, not throw an error
audreyt, not on return types... 12:08
it's only contravariance that supports subtyping
I'm talking about haskell 98, not ghc
audreyt I'm talking about h98 too
luqui explain
brianski y'all sound like you must have paid attention in your compiler classes.
simple question - what's the approx. ETA for perl6?
audreyt luqui: type Circle w = Shape (CircleDelta w) 12:09
brianski: define perl6
luqui brianski, the official position is that there is no official position
brianski audreyt - uh. perl 6.0 ?
audreyt luqui: data Shape w = MkShape {...}
luqui: Circle w is subtype of Shape w. agree?
brianski luqui - so it's done when it's done kind of thing, yes?
theorbtwo wonders if he's an element of y'all.
luqui brianski, yes, mostly because it is open source
audreyt, I don't quite follow 12:10
give me a minute to look that over
brianski well, plenty of open source projects have release schedules (altho i certainly don't claim that's a good thing) - was just wondering if there was a feeling for how long, within a factor of 10. 2 weeks? 2 months? 2 years? 2 decades?
audreyt luqui: Maybe (Maybe a) is a subtype to Maybe a 12:11
luqui brianski, not the first one
:-)
audreyt, ahh, compatible
brianski heh, ok
audreyt brianski: www.perlmonks.org/?node_id=485426
brianski: in particular www.perlmonks.org/?node_id=489243
luqui audreyt, okay, that's compile-time subtyping
hmm, that's not the right axis to make the distinction
audreyt luqui: and with Typeable, you can turn it into runtime reified stuff 12:12
luqui: by applying a typeOf
to the runtime expected monomorphic return type
it's all still h98.
luqui: I argue it is exactly isomorphic :)
luqui audreyt, write a function that declares that it will return a Num, and currently returns an Int, but can be changed later without changing the sig
brianski audreyt - thx 12:13
luqui that's pretty much the prototypical example of subtyping, is it not?
use whatever polymorphic typeclassish sig you like
audreyt luqui: except the "can be changed later" bit 12:14
luqui: write that in p6 first and I'll translate.
luqui sub foo (--> Num) { 42 }
audreyt and "later"?
luqui sub foo (--> Num) { 42.5 }
it's important that the former returned something of different type than the latter
but both are subtypes of Num 12:15
audreyt (sec) 12:16
luqui tries to trace back why this is being argued... he's apparently kind of out-of-it
ahh, right, dealing with contexts with subtyping 12:17
ambiguity of "want" asking and whatnot, choose Scalar when in Int context 12:18
12:18 Whiz joined
leo_ audreyt: parrot r11221, please check the last 6 tests in t/op/lexicals.t if you find some time 12:22
audreyt handles dinner a bit -- be back in ~5min
leo_: cool
luqui: oh btw 12:24
data IsNum = forall a. Num a => MkNum a
f :: IsNum
f = MkNum (1 :: Int)
luqui audreyt, oops, you're not in haskell 98 anymore
audreyt g :: IsNum
g = MkNum (1.5 :: Float)
heh 12:25
it's simple to encode to h98
luqui it is? 12:26
audreyt yeah, if you are oleg
luqui heh
audreyt (who had encoded GADTs to h98)
wolverian maths lectures are so slow :(
luqui I'm not sure how...
wolverian, you need to get a better maths lecturer
audreyt class Term g where 12:27
wolverian perhaps. it's just logic 1 though, I don't know if you can make this not slow :)
audreyt lit :: F f Int int => Int -> g f int
luqui also finds that to make maths lectures interesting, you can be a smartass like him and have a conversation with the teacher while correcting him
audreyt etc (standard church encoding iirc)
luqui: but we can drop this silly h98 thing and back to your point please
luqui basically, should Int context choose the Scalar branch of a context switch? 12:28
or should it be an error?
audreyt my position is that there is no Int context; there is only Item[Int] context
and Item[Int] can override ~~ so it ~~Int 12:29
luqui okay: should Int context choose the Item[Num] branch of a context switch?
audreyt but doesn't mean that it .sa Int.
there is, again, no Int contxt.
there is only an Item[Int] context ;)
luqui right
do that sub and answer then :-)
suppose we are choosing between Num and Str 12:30
should Item[Int] give an error?
audreyt (again, Item[Num] and Item[Str])
luqui is abbreviating
audreyt Item[Num] ~~ Num is true
but not because of subtyping
because MMD on ~~
luqui the "smart" part of "smart match"
audreyt Item[Num].isa(Num) is probably false.
yes.
luqui do whatever transformations you will, the problem is still there 12:31
given want { when Num { thing1 } when Str { thing2 } }
s/want/Item[Int]/
audreyt then you enter thing1 branch
happily 12:32
luqui okay, and: given Item[Num] { when Int { thing1 } when Str { thing2 } }
audreyt you fall off without doing anything.
luqui so clearly that's not the MMD way
audreyt why is it not? 12:33
luqui multi foo(--> Int) { 42 } multi foo(--> Str) { "hello" }
surely a Num context should choose foo()
audreyt you mean MMD does "when (Int ~~ $_)"
given want { when (Int ~~ $_) { ... } }
luqui aye
audreyt sure
then have MMD do that 12:34
I still don't see a problem
luqui and: multi foo(--> Num) { 42 } multi foo(--> Str) { "hello" }
that should croak on Int context?
even though there is the possibility that 42 will be an Int?
12:34 Whiz left
audreyt I'd definitely argue that. 12:34
luqui (*this* was the thing about context being a type)
audreyt because --> carries a static monotype promise
and we honour that at compile time 12:35
I think, anyway.
(you can always coerce.)
luqui and so you can't use MMD to switch between numeric and String
that's outside of MMD's capability
luqui thinks about what the proto would be for foo 12:36
audreyt you can switch between a floating number and a string.
luqui it would have to return bottom...
audreyt yup
luqui audreyt, you can't use MMD to choose between scalar and list? 12:37
audreyt luqui: they are monotypes :)
luqui doesn't follow 12:38
yes, you can't be both at once by definition
but how does that help you switch between them?
audreyt multi foo (--> Single[Any]) {...}; multi foo (--> Plural[Any]) { ... };
luqui and Single[Any] ~~ Num is true? 12:39
audreyt the Any (bottom) here works bothways
Single[Any] ~~ Single[Num] is true
so is Single[Num] ~~ Single[Any]
hm, that becomes undecidable.
12:39 iblechbot joined
audreyt though still may be okay. 12:40
luqui saw the temptation to look for A <: B or B <: A, and his maxwellian beauty razor cut it off
but that's really all I'm going on right now. But I feel like I could come up with a logical reason that's not okay
audreyt then please do 12:41
luqui (we could coin this "fuzzy argumentation" akin to "fuzzy logic")
audreyt I'd still like to code it up ;)
audreyt thinks English is a terrible implementation language
luqui retreats into his lair to finish the GJ paper and come up with said example
oh--audreyt--one last thing... is Single[Any] a type? 12:42
audreyt meanwhile fixed even more tests.
luqui: it is 12:43
luqui so it seems like you've sidestepped the problem into the very same problem
strip the Single and you get right back to my flawed scheme
svnbot6 r8725 | audreyt++ | * TODOize and correct some more tests.
luqui & for a little while 12:44
audreyt luqui: not sure what you mean; why should I strip away the Single?
luqui: to strip it away is saying "replace 'class' with 'data' in your code"
(my proposal is built on separate treatment of parameterized role types) 12:45
which is part of S12 already
luqui you really think it's a good idea for ~~ to mean subtype with certain types, but not with all types?
audreyt luqui: it's already specified as such 12:46
luqui example?
audreyt it dispatches to .does() and .isa() based on RHS
and doesn't do .isa when LHS is a role
and .does/.isa means different things 12:47
luqui that's such a cop-out! :-)
they both mean subtype, that's for sure
audreyt it's part of the spec ;)
they mean it differently though.
luqui audreyt, so disregarding the spec, do you think it's a good idea? 12:48
audreyt Maybe (Maybe a) is subtype of (Maybe a); Ord is subtype of Eq.
luqui i mean for ~~ not to mean subtype when both of its arguments are types?
audreyt luqui: I think it's a good idea.
or at least, sensible. 12:49
luqui hmmm... okay, well, I need to come up with some more concrete and shocking examples then
audreyt it'd mean "compatible type"
go ahead :)
luqui my maxwellian arguments aren't working :-)
audreyt, how much longer are you going to be here?
audreyt luqui: for another ~3hr?
luqui isn't usually up at 6am 12:50
audreyt I'd like to get all tests triaged
luqui okay, so I can leave
audreyt which I've been massively distracted from :)
g'nite
luqui not g'nite
g'reading and coming back in an hour or so
I'm distracting myself
(and you)
12:50 BigBear joined
luqui adios 12:50
audreyt hm 12:56
pugs currently does
pugs foo.p6 --help
# shows pugs --help
pugs foo.p6 -- --help
# passes --help to foo.p6
that seems counterintuitive.
does anyone think the current behaviour is desirable? 12:57
gaal rehi 12:58
masak audreyt: well, it seems that after the -- argument, pugs ought to treat everything as files 12:59
including --help, imho
audreyt masak: say... what?
you mean as @ARGS, right?
masak audreyt: maybe i don't understand the problem correctly 13:00
"--" means "treat things as input files, even though they may look like options", right?
so, i read "pugs foo.p6 -- --help" as "run foo.p6 on pugs, passing the input file '--help' to it (foo.p6)" 13:01
audreyt yes. 13:02
masak so, I guess I mean as @ARGS, yes :)
audreyt the problem case is
pugs foo.p6 --help
currently it runs asif you have typed "pugs --help"
I think that behaviour should go away 13:03
masak yeah. seems like you would only want to do either one at a time
audreyt indeed
but 13:04
pugs -e "foo" --help
shows help
which I have no problem with
does that sound sane?
13:04 DaGo joined
masak audreyt: it does 13:04
audreyt good then 13:05
audreyt commiteth
13:05 DaGo joined
audreyt opera++ # multiline tooltips for the title="" attr 13:06
perfect for viewing smoke.html 13:07
audreyt mumbles something about firefox and its 5-years-unfixed-bug of tooltip truncation
masak :)
masak goes studying cell biology
wolverian audreyt, that's one of the reasons I migrated to epiphany, too. 13:10
too bad it only runs on gnome (afaik)
svnbot6 r8726 | audreyt++ | * Pugs.Run.Args: When the arg list parser encounters the script
r8726 | audreyt++ | file name, treat everything after it (even -options) as arguments.
r8726 | audreyt++ | So these two forms are now identical:
r8726 | audreyt++ | pugs foo.p6 --help
r8726 | audreyt++ | pugs foo.p6 -- --help
r8726 | audreyt++ | (t/pugsrun/12-script-args.t now passes because of this.)
wolverian s,on gnome,on a system with gnome,
audreyt epiphany does multiline tooltips!? 13:12
I thought it's gecko?
audreyt goes installing epiphany 13:13
$ perl -e 'print 1+' -e '2' -l 13:15
3
wolverian audreyt, yes, it's gecko. yes, it does multiline tooltips
audreyt hm, surprising.
wolverian (at least on my system)
audreyt goes emulating that behaviour
13:17 scw_ is now known as scw
masak audreyt: pugs seems to already do that 13:17
pugs -e 'say 1+' -e '2'
3
13:18 luqui joined
luqui audreyt, the vObj paper is pretty much exactly what I had in mind 13:18
heh, "pretty much exactly" 13:19
audreyt wolverian++ # epiphany does work 13:25
masak: yes, I used a bad example
$ perl -e 'print 1+' -l -e '2'
is what I'm doing
already done, about to commit
13:25 kolibrie joined
audreyt luqui: good. 13:26
luqui: because my plan is to use vObj encoding as the base of 6.2818 calculus
luqui really? I'd better look at the calculus more closely then...
how do we handle its undecidability? 13:27
audreyt we don't.
luqui so... how do we handle it?
:-)
audreyt currently I'm investigating more closely on two-level lambda cube (with partial eval) and vObj
luqui ? 13:28
audreyt luqui: if it's not decidable, the user has to supply enough info to tiebreak, otherwise it's compile time error
luqui undecidable doesn't mean uninferrable IIRC
undecidable means uncheckable. no? 13:29
audreyt well, "cannot be checked with confidence"
luqui so what kind of info could the user possibly provide?
audreyt the user would have to either say, "this part can raise dynamic type error" (which would be the default) 13:30
or supply type annotations that does not lead to undecidable types
luqui hm.
wolverian hm, I want an editor that shows "This expression's type is undecidable" 13:31
luqui wolverian, have you ever, er, heard of the halting problem? :-)
audreyt there are heuristics ;)
luqui true, true
audreyt so an editor that shows that for many types is fine
wolverian I was assuming Eclipse would have solved the halting problem by now .. 13:32
audreyt an editor that can show that for all undecidable types is not fine :)
wolverian: well, you mean it always crashes (halts)?
wolverian heh.
audreyt my experience with Eclipse shows it's a bit more reliable than that :)
wolverian (it doesn't, weird enough)
luqui well, audreyt, keep me posted. (might be a bit difficult as I start school today) 13:33
audreyt luqui: sure :)
luqui: but it's all just background thinking
not until we get obj and rules done
and deliver a fine dynamic language first
luqui I'll come up with a perly vObjish encoding.
audreyt _then_ we can go back to visit the staticness :)
luqui: cool 13:34
until 6.2813.0, I expect type errors to be raised at runtime, at a performance penalty
i.e. totally punishing people using types. 13:35
luqui in terms of runspeed
not necessarily punishing "totally"
some people who have recently started to love haskell think that types help developer speed
*cough* 13:36
audreyt without static typechecking... I think it's a bit contentious
but we'll see :)
luqui it's a cognitive thing, too
"how do I use that function again?"
hooglish documentation
audreyt qq.foo bar 1. 13:37
13:37 pmccann joined
audreyt luqui: how does it parse? 13:37
luqui audreyt, what's the problem with it?
audreyt or, rather
qq.foo:1.
which shows the problem a bit more clearly
luqui: "qq.foo" can mean an invocation 13:38
luqui oh.
it definitely parses as a quoter
audreyt ok
scook0 longest-token and all...
luqui not really longest-token. more like keyword.
pretty much the same question as: if(foo) # function call or if statement? 13:39
audreyt adjusts the precedence table
wolverian isn't if a function? :)
13:39 rantanplan_ joined
luqui (barring the fact that they're the same in perl 6) 13:39
13:39 iblechbot joined
luqui wolverian, but they're not entirely the same, so the question is valid 13:39
wolverian true enough
luqui if is not a function; its implementation is a function 13:40
if is a statement:<if>
wolverian hmm, should we have 'statement if { ... }' instead of 'sub statement:<if> { ... }'?
luqui wolverian, probably not
13:41 fxn joined
scook0 statement:<if> is consistent with the rest of the op:<foo> names 13:41
wolverian probably.
scook0 defining your own statement forms is probably "people who know what they're doing" territory
luqui though by that logic:
sub macro:<foo> { }
it *does* affect parsing, after all 13:42
audreyt wait
macro postfix:<!> {...}
how do you do that then
luqui aa soo
looking down the wrong axis
looks like they are orthogonal from that perspective
wolverian yeah. infix statement? :)
audreyt wolverian: "infix" statement sounds like an oxymoron 13:43
luqui though an infix statement is not entirely out...
wolverian it was a joke.
luqui statement infix:<+> {...} (3+4) * 5 # illegal: must be 3+4;
still, that's getting pretty esoteric
wolverian luqui++ # weirdness factor 13:44
luqui can get karma for weirdness?! 13:45
I'm in heaven!
audreyt luqui++ # may I pay you in karma to stop thinking along this line further?
luqui haha
scook0 audreyt: don't; that'll just encourage him to do it again later :) 13:46
luqui he can always steal from me if I try to do it again
s/he/she/ 13:47
sorry. I'm not programmed to switch genders after I know people. Somehow that wasn't evolutionarily necessary until this century :-/ 13:48
gaal oy. we can't rebind subs after the'd been exported, since we export values? 13:49
svnbot6 r8727 | scook0++ | * Beginnings of docs/getting_started; inspired by the lack of any
r8727 | scook0++ | document to point newbies at. It's mostly just a skeleton at the
r8727 | scook0++ | moment, so feel free to help.
gaal huh? wait no, Test::Pil isn't even exporting anything. it's a mixin
audreyt luqui: I think it'd be easier after we meet again in realspace :) 13:50
luqui thinks so too
svnbot6 r8728 | audreyt++ | * qq.method:1. # always parses as quoter, never method 13:55
13:55 integral joined
gaal uh, santiy check: 13:57
svnbot6 r8729 | audreyt++ | * t/pugsrun/01-multiple-e.t now happily passes.
gaal &somesub := {;};
should turn a sub that's already declared to a nop, at runtime
right?
luqui what do you mean by "already declared"?
gaal luqui: I mean there was already a sub somesub {} 13:58
already defined, sorry
audreyt sub foo { ... }; &foo := {...};
luqui gaal, oh, right.
I read "turn" as "return"
audreyt gaal: the answer is yes, surely
gaal yes. except it doesn't look like it works :(
audreyt $ ./pugs -e 'sub x { 3 }; &x := {4}; say x()'
4
pasteling "gaal" at 192.115.25.249 pasted "put this in your Test/lib/Test/Pil.pm - *** No such sub: "&pil_is_eq" at runtime" (55 lines, 1.3K) at sial.org/pbot/15479 13:59
14:00 Southen joined
gaal ""; was me making sure this wasn't being parsed as an anonyhash 14:01
though {;} oughta be enough
svnbot6 r8730 | scook0++ | * Some meat for docs/getting_started 14:03
audreyt gaal: sorry, I'm still in scope.t -- will look in a bit
gaal no worries, are you going up or down the smokes? 14:04
audreyt going up
gaal the oreder of smokes on the smokeserver is confusing 14:05
k, i'll go down
audreyt woot
hm, lexical export really uncovered much assumptions. 14:09
gaal why are some Prims defined as say List::foo instead of foo? this bites when you want them to work on a listref 14:11
what do I stand to break if I change that? 14:12
audreyt hm, mmd should dispatch listrefs to them 14:14
14:15 Limbic_Region joined
audreyt examples? 14:15
gaal ?eval my @x = [ 1 .. 5 ]; @x[0].elems 14:16
where's evalbot :(
audreyt luqui: summon evalbot
luqui he's broken because of lexical export
audreyt gaal: that... shouldn't work
luqui I tried to fix him for about an hour one day and was unsuccessful
audreyt, yes it should 14:17
gaal audreyt: sorry sorry
luqui rephrasing: my @x = ([1..5]); @x[0].elems
gaal @x.push [1..5]
that breaks too
audreyt oh, duh, sorry, I parsed :=
gaal: indeed. lift them off List?
gaal sure
audreyt (and smoke to see what breaks, and we can see why)
gaal OK 14:18
audreyt wonders why := is more natural than = at this point
gaal heh
audreyt to my brain that is
gaal \\n Int pre List::elems safe (Array)\ 14:19
so will it have to be both straight elems and Any?
fwiw, reverse has both List and rw!Any
audreyt elems and List, I think. 14:20
hm, wait
that'd make elems(1,2,3) work
try elems and Array
it should work
gaal where's the mmdispatcher implemented btw? I was looking for it a few days back
luqui findsub 14:21
gaal luqui: thanks
14:21 sahadev joined
luqui has all too much experience with that horridly ugly and complicated function 14:22
audreyt thankfully it's going to die. 14:23
luqui: it was quite simple... the current shape is due to blindly following S02~06 changes without refactoring ;)
gaal woot! just changing the signature of the prim fixed the function :)
*the test 14:24
but this makes me wonder if all the List::* etc. prims oughtn't get the same treatment?
audreyt probably should
go ahead
gaal oh, but arrays/elems.t broke now. looking. 14:25
yeah, now .elems "works" on arbitrary scalars 14:26
(whoever wrote that defensive test)++
looks like a dispatcher issue, not the prim's fault really 14:28
unless the signature should be elems safe (List)\ and not Array?
trying.
no, with List it breaks .elems totally :( 14:30
14:30 fabpot joined
audreyt nod. 14:31
14:31 fabpot left, Debolaz joined
gaal okay, but weighing List::elems against elems, the latter is better because it fixes a crash in legitimate usage, even if it does permit incorrect usage. 14:35
svnbot6 r8731 | audreyt++ | * Pugs.Parser: parse (but no implementation) for scoped packages.
gaal imho.
audreyt sure.
go ahead :)
rafl clkao: ping
audreyt whew, scope.t finally done 14:36
svnbot6 r8732 | audreyt++ | * Prelude: trivial error message fix.
r8733 | audreyt++ | * Fix t/packages/scope.t to work with lexical imports.
14:37 chris2 joined
svnbot6 r8734 | gaal++ | * .elems: work correcly on listrefs, making t/builtins/arrays/push.t pass 14:39
r8734 | gaal++ | (at the cost of breaking two tests in arrays/elems.t)
gaal weren't there fixes to NaN? it still fails two tests 14:44
svnbot6 r8735 | gaal++ | * make splice.t not crash (passes all tests but one)
audreyt gaal: which two?
(brb, shower) 14:45
gaal 0**0 and Inf**0
theorbtwo What, you don't take your laptop into the shower with you anymore?
audreyt both should be 1?
gaal oh, the 0**0 expected is wrong
audreyt theorbtwo: no, I actually have a life now
theorbtwo Wow! 14:46
gaal I don't know what Inf**0 should be, NaN sounds right
as for what they give in fact, both give 1.
audreyt I even went to see two movies, "Memoir of a Geisha" and "The Last Trappper", during this whole relenging week ;)
obra audreyt: how were they?
audreyt obra: the first one is quite nice. the second one pales in comparison with eg. "The Whale Rider" 14:47
but is okay if you are into northern landscape and northern lights, I guess
obra nod
gaal luqui, as the resident math moose. what should Inf**0 evaluate to?
audreyt 0**0, Inf**0, 1**Inf 14:48
are the three indeterminate frms
involving **
(the others were 0/0, 0*Inf, Inf/Inf, Inf-Inf) 14:49
gaal oh, darn
mathworld says that yes
but wikipedia disagrees
audreyt one way is to rule them all as NaNs; one way is relying on the underlying stuff
s/stuff/C library/
one way is to spec them.
gaal wikipedia asserts that 0**0 _as a value_ should be 1.
citing e.g. Knuth 14:50
audreyt 1**Inf is 1, 0**0 is 1, Inf**0 is 1?
theorbtwo I think relying on the libc's interp. is the /worst/ way to go.
gaal no idea about all the others.
theorbtwo: I agree, if the alternatives aren't crazy expensive.
audreyt but we throw exception on 0/0 14:51
instead of returning NaN
theorbtwo I think my preference is to make them all NaN and punt to p6l.
audreyt which is itself inconsistent.
NaN for all seven forms?
theorbtwo Yes.
14:52 crypt_ex joined
gaal :todo<mathupyourmind> 14:52
14:52 crypt_ex left, crypt_ex joined 14:53 nothingmuch joined
theorbtwo Hm, that leaves us with exception on 1/0 and NaN on 0/0, which isn't very consistant either. 14:53
OTOH, NaN on 1/0 would just be plain annoying. 14:54
Limbic_Region the exception makes more sense to me than NaN
across the board
I can then trap it and do something sane
gaal no way we'll get agreement on this, guys. people from different backgrounds will want different things
Limbic_Region gaal - and how does throwing an exception not satisfy everyone? 14:55
theorbtwo But can you? I'd be really nice if an exception handler could decide what the value of the expression that died should be, but we don't have that.
gaal Limbic_Region: see the wikipedia article 14:56
Limbic_Region theorbtwo - huh? The exception handler needs to be user defined not omnicient
gaal - basically what I am saying is that in those cases we do not define the behavior but punt and let the individual coding decide
gaal Limbic_Region: and that is going to annoy math folks that run into 0**0 a lot and want it to just evaluate to 1 like they expect. 14:57
14:58 vel__ joined
theorbtwo Say the user wished that 0**0 was just 1, without having to put trys all over the place. 14:58
gaal a pragma is the best way to expose this in terms of the user, if it can be made inexpensive.
audreyt 0/0 is nan in parrot
theorbtwo How do you get that behavior?
audreyt ponders
gaal t/builtins/my.t is another tough one... 14:59
Limbic_Region ponders as well
gaal - what would such a pragma look like?
use fringe_math '0/0' => 1; 15:00
theorbtwo $*WIERDMATH{'0**0'} = 42; say 0**0
gaal use Math::Indeterminate <NaN 1 fatal>.pick?
audreyt multi *infix:</> (0, 0) { 1 }
there you go
;)
theorbtwo thinks audreyt wins. 15:01
gaal except you need to weave that in and out lexically
audreyt you can do that with an lexical import
theorbtwo OK, so make all the ind. forms die, and anybody who cares can override that as they see fit.
audreyt I was thinking "make all the ind. forms use native implementation for speed" 15:02
and anybody who cares can override
theorbtwo Oh, that works too -- I was thinking it wouldn't be that much of a speed issue.
gaal i would; there's some code involved on every entry to the op 15:03
s/i/it/
theorbtwo Is multi dispatch >= O(N)? 15:04
15:05 putter joined
audreyt theorbtwo: not sure what you mean 15:05
gaal the O isn't what hurts, I think.
people do arithmetic in tight loops.
the fact that you have to do runtime matching against args at all means expense 15:06
putter use Math::IEEE_754_1985; ... use Math::IEEE_754_2007; ... etc (taxonomy of "etc" is non-obvious and interesting;)
gaal yo putter
putter hi gaal
theorbtwo Right, but we already do, so how much does adding more cases hurt?
Or is it a matter of caring about the values whereas before we only cared about the types? 15:07
audreyt yup 15:08
gaal actually, I don't know enough of this that I should keep talking. But it seems to me that my @x of int; my @y of int; @x >>/<< @y should be able to generate fast code.
15:08 eric256 joined
audreyt if at compile time it can't be proven to be 0, then it desugars to a comparison 15:08
which is costly
theorbtwo OK, I grok. 15:10
So default to whatever the machine feels like, allow the user to define a multi. That @x >>/<< @y can be fast, if it can know the types of all elements of @x and @y in advance, then it can check when it begins to execute for the right multi, and pull that out, then do the division in a tight loop... 15:11
...unless there is a choice that it can't resolve with just knowing the types, in which case it has to choose between them on every division.
audreyt yes.
15:11 eric256 left
audreyt though that means having 0/0 to not throw exception. hm. 15:12
15:14 stevan_ is now known as stevan
audreyt decides to punt to p6l. 15:14
stevan thinks luqui should read AMOP and a good book on ML (the module system chapter in particular)
15:15 Eimi joined
audreyt gaal: span.t hangs here 15:15
gaal here too. looking 15:16
no, it's just slow 15:17
passes 2 and crashes.
you mean ext/Span/t/span-code.t, yes?
oh span.t
15:18 iblechbot_ joined
putter if the compiler did partial evaluation, infix:</> multis could be specialized on their internal CALLER::<$indeterminacy_policy>... ? 15:19
gaal span's stringify hangs. skipping all these calls. 15:20
putter re docs/,
15:22 benpol joined
putter as a complement to getting_started, it could be useful to have something at the opposite extreme - comments_for_CS_researchers. In a CS context, I was trying to explain why p6 was *interesting*, but my grasp on its theoretical aspects was too fuzzy. 15:25
gaal ugh, there are plenty of hangs in Span.
stringify, clone, start... I think I'll skip_rest for now :/
audreyt: I wasn't even looking at ext/ yet, under the assumption that t/ takes precedence. 15:26
audreyt k
yup
putter The "p6 closes onces at compile time, and again as necessary at runtime. For comparison, ruby and python only close at runtime, and ... close only at compiletime." is just the kind of thing that is easily understood and repeated once said, but rather harder to derive yourself.
audreyt :) 15:27
svnbot6 r8736 | audreyt++ | * 1**Inf, 0**0 and Inf**0 is regularted to 1 in this release.
r8736 | audreyt++ | Pending p6l.
robkinyon audreyt: Those are good math rules. :-) 15:28
gaal should .perl give newlines on e.g. %h.perl?
robkinyon Do they work for -Inf as well?
audreyt gaal: it's optional
putter The "why is it *interesting*?" came up in a context of "why should I fund it?", and so is not "merely" of curiousity value. ;)
audreyt robkinyon: yes.
robkinyon cool
?eval 0**Inf
audreyt putter: "interesting"?
evalbot is bitrotted by gaal 15:29
robkinyon gah
audreyt fixes welcome
gaal lol
robkinyon audreyt?eval 0**Inf
:-)
gaal audreyt: newlines optional in .perl: what should the tests expect? what pugs gives now? :)
audreyt gaal: yes. 15:30
gaal: or normalize it... I don't quite care :)
gaal k
audreyt mm, SPJ proposed something that can dramatically speed up pugs.
# haskell.galois.com/cgi-bin/haskell-.../ticket/76
putter audreyt: say you sat down with a copy of yourself, similar CS capabilities (perhaps not as yet identical reading lists), but who had never hear of perl or p6. how would you describe p6? what about it is not just "another been there and done that" language? what is its "related work" connection to the rest of the field? 15:31
I'd love to read a transcript of that conversation. 15:32
robkinyon signs up for a copy at the front desk
putter What is interesting about the challenges it faces, or how it is facing them?
:) 15:33
nothingmuch hola robkinyon
robkinyon nothingmuch: :-)
nothingmuch wonders if he should keep working on keeping robkinyon in perl land
it's pretty challenging
i'm thinking of UNIVERSAL::RubyIntrospection
and a Spiffy like filter for Catalyst ;-) 15:34
15:34 hexmode joined
robkinyon Actually, I'm very heavily in Perl-land 15:34
nothingmuch and a filter that does 's/def/sub' ;-)
your feature ideas have helped make some pretty cool catalyst plugins though
audreyt putter: that makes a wonderful journal subject.
robkinyon Not mine. :-)
audreyt putter: I'll think about it.
nothingmuch robkinyon: you are my gateway to the other side =)
gaal the report is so terse! spj's proposal comes with a patch to it that's... tiny 15:35
robkinyon You will come to the Dark Side, Luuuuke!
audreyt gaal: I wish synopsis is like that ;)
nothingmuch robkinyon: when I have time, yes
audreyt though it took them 10+ years... why should p6 be different. 15:36
gaal the synopses are hardly wordy! it's a huge language
15:37 DaGo joined
putter The most common one-liner mental model folks have of Haskell is "interesting difficult functional language I really should look at sometime". For perl\d, it's "scripting-kind-of-language, said to be ugly". The number of people on the planet who hearing Perl6, would think "type theory/system innovation", or even believe such 15:39
audreyt putter: actually... I did think about it when I wrote my cufp paper
but I'd put it a bit differently now
so it might be good to rethink this question
s/cufp/rejected haskell-workshop/
putter a characterization without explanation, is, well, the first is probably order-10-ish people on the planet. at most low-to-mid-order-100. It could be nice to change that, but that requires something actually written. 15:40
audreyt I think p6 is mostly about reconciling irreconcillable gaps. prototype vs class-based; multi dispatch vs constrained types; inheritance vs interface; typesafety vs ducktyping; early vs late binding; etc 15:42
some of them are socially irreconcillable, some of them provably irreconcillable.
but p6 reconciles them anyway.
should probably work out a more canonical list of gaps that p6 is trying to reconcile. 15:44
putter Right. The "related work" section of a CS paper on p6 has a lot of the flavor I'm thinking of. /me aborts sentence, whips out "notebook" to capture previous paragraph...
;)
That's the kind of comment I'm not sure anyone but you can say at the moment. I'd love to have a little collection of them. 15:45
audreyt I'll... try, I think. 15:46
15:46 vel__ left
audreyt but I'd like to get the release done first :) 15:46
putter awesome. yes. :)
audreyt otoh, it's wonderful to have you back here to raise interesting questions :)
putter blushes 15:47
audreyt curtsies :)
clkao robkinyon: ? 15:49
robkinyon clkao: ??
SamB do you guys have a @quote equivalent?
putter I so want to put that "What is p6 about?" quote somewhere... perlmonks? pugs/QUOTES? ...?
audreyt ok, I think I want to nap a bit before continuing :)
putter: er, well, I'll put it in my journal now. 15:50
putter :)
gaal so, where's ~(a hash) defined? because it provides newlines while (that hash).perl doesn't
audreyt watches the release schedule slip again ;)
putter is happy :)
err, not about the slip. ;) 15:51
gaal wait no, neither do; so how come the *test* is expecting newlines?
audreyt gaal: "In order to interpolate an entire hash" S02
gaal audreyt: I don't see how the test knows it's to expect the newlines :) it compares ~s and .perls 15:52
putter but, the release is more of a hackathon. a lot of the "bugs" are new features we are simply using the release motivate the implementation of. no?
gaal putter: there are loads of regressions we could have noticed earlier but didn't 15:53
audreyt gaal: actually, many of them are not regressions either :)
gaal so the release is motivating cleanup of refactoring
clkao robkinyon: sorry, mis-complete
audreyt (regressions typically happen at middle of subtests)
clkao rafl: ppong
robkinyon ahhh. :-)
putter gaal: did you check the type of "this hash" (in your example)? I've the very fuzzy recollection of looking at it and it thinking it was an Array. Array of pairs wouldnt have newlines... 15:55
15:57 kimji joined
kimji hi, is anybody interested in putting a live perl6 repl online for all to try? 15:58
integral we used to have an evalbot here that evaluated arbitrary safe perl6 code
kimji there is a bunch of those things for Lisp and Scheme 15:59
gaal putter: hmm there is a failing test showing expected Hash got Array
kimji and they make things easier for me (selfish quest here)
gaal so that may be a good lead, thanks
putter np 16:00
audreyt kimji: we used to have an evalbot here 16:03
putter kimji: we normally have one here, invoked by ?eval <expression> .
lol ;)
kimji ?eval 1+1;
putter But it's been broken for some days, as some features added have left things unstable.
kimji yeah, I am downloading pugs anyway, thanks :-) 16:04
putter The current release process, expected to last at most another few days, will leave things stable.
So the evalbot will again be back. 16:05
putter isnt sure why we just don't run an old working version of the evalbot, until the "always reflect HEAD version of evalbot" is working again.
audreyt that makes sense. 16:06
putter seen evalbot 16:07
jabbot putter: I havn't seen evalbot, putter
putter hmm
16:09 masak_ joined 16:11 fxn joined 16:13 imperator_ joined
audreyt I think I fixed the bug triggering evalbot misbehaviour. 16:13
confirming 16:14
putter gaal: in case {("a" => 3),} still misparses as a block, I wanted to make sure you saw sial.org/pbot/15478 . I think it's an "almost but not quite" fix. You are more likely to get to it first than I.
16:15 bsb joined
ingy nothingmuch: ping 16:18
svnbot6 r8737 | audreyt++ | * attempt to solve export-scope problem by not reclosing subEnv
r8737 | audreyt++ | when exporting to caller's module. May or may not unbreak evalbot.
r8737 | audreyt++ | Before this change, the case below was broken:
r8737 | audreyt++ | module test;
r8737 | audreyt++ | sub foo is export { bar() }
r8737 | audreyt++ | sub bar { 3 }
r8737 | audreyt++ | $ ./pugs -Mtest -e 'say foo()'
ingy svnbot6: use nopaste! 16:19
integral heh
nothingmuch hugs ingy 16:20
robkinyon ingy: Where do you use the "alias a symbol to avoid strict" trick in your modules?
diotalevi thought you used it when he answered a question of mine 16:21
gaal putter: thanks
i need more coffee
ingy robkinyon: doesn't ring a bell 16:22
I alias symbols, but don't know how that avoids strict 16:23
robkinyon ingy: Ok. Just curious.
ingy can you explain this?
robkinyon well, if you do *{ "${pkg}::self" } = \$Class::self; in an import, you can now use $self within $pkg 16:24
gaal ooh, spj introduces lexically scoped type variables. if only I understood what that meant
nothingmuch kicks ingy
you pang
audreyt gaal: it's very easy. 16:25
gaal: see Pugs.AST.Internals.castFail
the ::b bit 16:26
16:28 cdpruden joined
gaal I'm looking but not seeing 16:28
doesn't error have type a?
well, a -> String
audreyt errType (undefined :: b)
gaal eh
audreyt the "b" is lexically scoped 16:29
gaal about that coffee...
audreyt note that it's exactly what "want" is :)
(type reification of the expected return type)
gaal is that like the safe cast in the generics papers? 16:30
syb
ingy nothingmuch: are you to the age of consent?
audreyt gaal: it's the same mechanism syb uses.
gaal hmm, I just noticed the implementation of cast isn't given in syb 16:32
or else I didn't get to it yet 16:33
audreyt gaal:
*Main> (intOrStr :: Int, intOrStr :: String)
(42,"Hello, world")
16:33 DaGo left
audreyt something I just wrote. cute? :) 16:33
*Main> intOrStr :: Double 16:34
*** Exception: invalid context: Double
gaal whee!
so how does that look?
audreyt perlcabal.org/~autrijus/tmp/want.hs 16:35
rafl clkao: Any idea what's the problem here? Retrieving log information from 1525 to 8712
Oh no, no more exceptions! add_file() failed. at /usr/share/perl5/SVN/Mirror/Ra.pm line 1219.
clkao: I'm trying to mirror the openmpi repository.
gaal can Typeable be implemented in pure Hs?
audreyt gaal: the answer is yes. there's a paper somewhere 16:36
but unsafeCoerce# cannot.
gaal that's a -> b, right?
audreyt yup
turns haskell into a weakly typed language
wonderful stuff
putter lol
gaal "a -> b" is haskell golf for "evil"
Cale even told me how to do it, but I successfully forgot :) 16:37
geoffb audreyt, WRT the Num semantics: Is there a good reason not to do whatever the IEEE floating point standard recommends?
My understanding is that a great deal of thought was put into it ....
audreyt geoffb: indeed, though having 0/0 return an NaN is somewhat controversial 16:38
geoffb: also, not all platform implement the same revision of IEEEfp
geoffb Is that the only controversial one?
Are the revision differences important to this case?
gaal so, audreyt, the stuff spj committed does that typing... related to the calling lexical scope?
geoffb IANAFPE (I am not a floating point expert) :-) 16:39
audreyt geoffb: neither am I
gaal: no, it merely makes "a" visible to where
s/where/"where"/
previously it was not
putter {0,NaN,Inf}**0 may perhaps also see a change in 754:200X.
geoffb I just remember one of my math professors in college was on the IEEE FP committee, and that man is the most edge-case anal guy I've ever met.
audreyt *nod* 16:40
geoffb putter, do you happen to know why?
putter it's currently not so much multiple revisions of the standard, but a dearth of fully conforming implementations ;)
geoffb putter, heh
Is the x86 processor line still in compliance? 16:41
16:43 lisppaste3 joined
putter geoffb: I'm bouncing along/over the edge of my understanding here. My fuzzy recollection is 0**0==1 is strongly desired, and NaN/Inf get pulled along by a "should be true for any x" argument. Maybe. Let me see if I bookmarked it... 16:43
re x86, no idea.
geoffb Said professor claimed to have done about as well correctness-wise as he could with the transistor count available in the original x87 16:44
putter re wizzy math professions, I strongly agree. This is one of those domains where only a few people have a solid understanding of what's really going on, but it seems accessible, so lots of people weigh in with opinions. Quantum physics is also like that. ;) 16:45
geoffb heh
putter (for a somewhat different set of people thinking it accessible) 16:46
geoffb nodnod
My brother-in-law is/was a high-energy physicist, whereas I only did lower-division physics in college. I am *so* not planning to weigh in on QP stuff, despite finding it fascinating. :-) 16:47
putter geoffb: sorry, I didn't tag the paper.
putter wants a browser with a complete history (and search across it of course). 16:48
geoffb putter, np, I'm fine with just knowing that there are certain relevant things still being argued over.
gaal putter: ask the nsa, they log your access anyway no?
putter no, I went to their web page and put myself on their "do not log" list. 16:49
gaal too bad, I say make good use of paranoia.
geoffb Still, I think we could do fairly well with the policy "We will track the current recommendation of the IEEE FP committee", because the only people that will likely care how we handle the edge cases can be expected to at least be providing that input to the committee, if not sitting on it. 16:50
Or I should say,
people likely to care that we change an edge case somewhere down the line, from whatever is the current standard
putter , seeing joke fall flat, adds cultural context. The US is seeing state and federal "do not call lists" for phone numbers, which are supposed to tell (some) telemarketers not to call you.
(or maybe it just want funny;) 16:51
gaal putter: I grak that, I was just in the other window looking at your nopast again :)
geoffb Following current international standard seems to me sufficient justification for breaking edge-case compatibility, as long as we tell people we changed it (and of course, it does't even matter until 2*PI is released) 16:52
OK, enough random wanker input from me, AFK again 16:53
lisppaste3 The extended lisppaste outage was caused by a server move this weekend. paste.lisp.org is now on a significantly faster server, and should be available as soon as your DNS catches up. Thanks for your patience!
putter geoffb: the advantage of having it pragma/use()able, is people who need stable behavior can have it. people who want particular behavior can get it. for example, to match another language's spec when transliterating to p6. and who knows, to go with unicode characters, p6 may become a numericists' platform. subsume the vast and crufty set a domain specific math languages out there.
geoffb I can understand having it pragma'able, I was merely referring to the default base semantics 16:54
And as for becoming a numericists platform, I'd say only if we can make it FAST, which implies people will use num instead of Num anyway. 16:55
svnbot6 r8738 | audreyt++ | * remove the redundant "--" in multiarg options.
geoffb As my math professor said "The Fast drives out The Slow, even if The Fast is wrong."
putter re fast, that's what audreyt's nifty type theory and haskell are for. :) 16:56
And there is always Inline::C to fall back on. ;)
16:56 sub_chick joined
geoffb Numericist fast, and dynamic language fast, are in different orders of magnitude. :-) 16:56
And Fortran is still around because it's hard to make C go that fast.
And, of course, oodles of hand-tuned Fortran libraries 16:57
putter Inline::Fortran?
geoffb OK, really, must AFK
putter bye
Limbic_Region how close to 6.2.11 are we? 16:58
16:58 marmic joined
integral (Numerical Recipes in Fortran 95)++ # very scary code 16:58
putter observes ocaml can produce quite fast code. though doesnt have anywhere near the tuning effort invested as a good F library.
16:59 DaGo joined
audreyt Limbic_Region: this weekend. 16:59
putter (Numerical Recipes in *)-- # often "clearly not written by expert" code (so I have been told) 17:00
integral I think fortran is meant to win on vector processors due to it's do loop which can be optimised easily. (Compared to something like a C for loop where you've got to spot common patterns and hope the programmer uses them)
(Numerical Recipes in *)-- # expensive licencing fees
Limbic_Region oh, I thought it was this past weekend
bsb Hi all, is this Israel hackathon a more the merrier type thing?
Limbic_Region how many $work days you got this week audreyt?
audreyt hm 17:01
should I start evalbot loop on feature
or should I wait for luqui?
(it's now fixed.)
bsb: I think so -- talk to OSDC.il people (eg gaal) :)
gaal hi bsb
bsb hi
gaal yes, but if you want to come please tell us very soon :) 17:02
theorbtwo audreyt: Start it up with a non-default name?
gaal it'll cost about $40/day
audreyt Limbic_Region: it was; I got distracted. 3 as usual. (it's all on my journal. :))
gaal but we need to close on a venue in soon, like this week.
bsb That's fine. I'll start looking at ticket to .il 17:03
gaal whee
17:03 justatheory joined
putter re vector processors, bc.tech.coop/blog/060111.html Concurrent/Parallel Programming - The Next Generation 17:03
gaal bsb: are you also coming to the conf?
audreyt Limbic_Region: it was last weekend. then I got this unfortunate allergic incident with hair colorant -- long story.
bsb Yes, if I'm there. 17:04
Limbic_Region oh right, you glossed over that
tell me you were going red
Limbic_Region has a thing for red heads
audreyt nah, dark purple. I like it
although a bit reddish also. but not bright red.
bsb gaal: I'm still yet to register of course 17:05
Limbic_Region well - I should say more auburn then anything
17:05 evalbot_8738 joined
gaal bsb: okay, please do as soon as you can 17:05
?eval "hello, #perl6!"
evalbot_8738 "hello, #perl6!"
putter luqui: ping?
Limbic_Region ?eval say 'hello, #perl6!' 17:06
evalbot_8738 OUTPUT[hello, #perl6! ] bool::true
putter luqui: never mind. ;)
Limbic_Region what - no translation for the "\n" 17:07
putter ?eval {("a" => 3),}
evalbot_8738 (("a" => 3),)
Limbic_Region ?eval for 1... { last if $_ == 3 }
evalbot_8738 pugs: out of memory (requested 1048576 bytes)
Limbic_Region that's still b0rk huh
putter ?eval {("a" => 3),}.ref 17:08
evalbot_8738 ::Block
audreyt if luqui wants to takeover, just kill the process on feather
I'll test its renick
putter audreyt: sucked away from nap? 17:09
audreyt evalbot is to critical :)
svnbot6 r8739 | audreyt++ | * remove a trailing newline from README. 17:10
17:11 bernhard joined
gaal the 2nd-to-last split test fails: 17:11
?eval "".split(':')
evalbot_8738 ("",)
gaal the test expects ()
but there's a comment that this isn't specced!
17:11 _SamB_ joined
gaal what to do then? 17:11
putter audreyt: :) 17:12
gaal (sorry, I've punted from the parser things, I'm out of the zone today)
17:12 _SamB_ is now known as SamB
nnunley gaal: That's perl's behavior. 17:13
perl5's that is.
gaal nnunley: true. the comment implies it shoudn't be p6's 17:14
so I want to know which needs fixing, the test or pugs :) 17:15
theorbtwo I think the current behavior is correct, but I'm !~ @larry.
Skip the test and post to p6l? 17:16
audreyt ?eval "version up?" 17:17
17:17 evalbot_8738 is now known as evalbot_8739
evalbot_8739 pugs: user error (*** Can't modify constant item: VUndef at <prelude> line 124, column 5-72) 17:17
gaal yeah. we need better TZ-spread of @Larry.
audreyt wow. 17:18
17:20 evalbot_8739 joined
svnbot6 r8740 | audreyt++ | * remove the %*INC<fatal> hack from Prelude.pm because 17:20
r8740 | audreyt++ | 1) it breaks evalbot under precompile_prelude=false
r8740 | audreyt++ | 2) it doesn't work anyway with the new lexical import system.
audreyt ?eval "prelude still borken?"
evalbot_8739 "prelude still borken?"
audreyt better. 17:21
luqui: feel free to takeover and kill feather process #15602 #18431
gaal audreyt: speaking of %INC hacks, precomp Test is currently useless because %INC<Test> isn't defined :/
theorbtwo Why did the stuff from 8740 fix evalbot_8739?
audreyt gaal: yup 17:22
gaal ?eval $?PUGS_VERSION
evalbot_8739 \"Perl6 User\'s Golfing System, version 6.2.10, October 10, 2005 (r8739)"
audreyt theorbtwo: because I fixed it on feather first, runs evalbot, and then committed
theorbtwo OK.
audreyt this is not the time traveling you are looking for :)
gaal :D 17:23
gaal wonders what it is that's making his mind mushy today
audreyt magick mushyrooms?
putter gaal: that's not excuse for such a security slip! 17:24
audreyt now evalbot is fixed, I can happily sleep :)
audreyt waves
putter bye audreyt &
masak_ audreyt: g'nite
gaal putter: let me slip into something more secure?
night audrey 17:25
that's more or less the opposite of the line I prefer,
audreyt ?eval "make sure that versioning up works" 17:26
gaal "let me slip into something more temporary"
17:26 evalbot_8739 is now known as evalbot_8740
evalbot_8740 "make sure that versioning up works" 17:26
putter why p6? number 423: #p6 has worse jokes than #hs ;)
gaal lol
putter s/number/reason number/
audreyt & 17:27
17:54 petdance joined 17:57 petdance left
putter audreyt: re ./pugs foo.p6 --help, my impression is this is gnu standard, but posix terminates arguments on the first non-argument. gnu permits ./pugs *.p6 -o foo.pil for example. and mode-ed command lines ./pugs -O3 f1.p6 f2.p6 -O1 f3.p6. looks like ghc is gnu, non-mode-ed, without order restrictions. like your help example. 17:57
17:58 Qiang joined
putter perl, with -A and -C, is beyond gnu ;), but has order restrictions. non-moded. 17:59
-- in posix merely permits odd filenames. -- in gnu, means end of option processing.
actually, calling p5 non-moded, when you would and can use -e or -M to do modes, doesnt quite fit. and ghc, while not permitting -O3 f1.p6 f2.p6 -O1 f3.p6, does have +RTS ... -RTS. 18:04
there's no reason to back out the change, the more restrictive posix being upwardly compatible. but if we retain the single monolithic powerful ./pugs program, then we'll sooner or later need something more powerful, like ghc's. 18:06
18:07 vel__ joined
putter p5's "beyond gnu" means some options occur even after the "--". and not in a princpled turn-on/off files section way either. eep. 18:08
18:09 nnunley joined
putter ooo, though a different model would be ./pugs has basically a single command line option, -M. Eg, ./pugs -M Parser-Pretty -- --indent 3 foo.p6. Most everything done by some p6 module, eg Pugs/Parser-Pretty.pm. random bizarre thought. 18:16
the p6 code would basically call back to fiddle with the hs ./pugs... ok that's not workable - too much environment would have to be set up. unless p6 had a simple restricted bootstrap dialect to top the file... I'll stop now. 18:19
later & 18:21
18:21 Limbic_Region joined 18:24 feng joined 18:28 putter joined
gaal bsb: ping 18:29
putter oh, one other nice concept - a "command line syntax" version number. eg, ./pugs -v0 ... . when things are in flux, that allows easily and incompatibly changing the default command line arguments without breaking automated use. good when a prototype is in flux, you want the result to be optimized without out concern 18:30
for development history, but you have "users" that you cant afford to keep updating. implementation is easy enough, as long a N doesnt get too silly. and one can do the usual depreciation thing. 18:32
&
bsb gaal: pong 18:35
gaal can I /msg you? (are you registered) 18:36
bsb I think so, else bsb at bereft.net
theorbtwo Whois tells you. 18:37
gaal heh, that was part of what I wanted to ask :)
18:38 hcarty joined 18:54 pdcawley1 joined
robkinyon ?eval 0**Inf 18:55
Did I just crash evalbot?
19:25 benpol left 19:26 hexmode joined 19:34 hcarty left 19:46 fxn joined 19:47 fxn left 20:12 rodi joined 20:14 Lartuv joined
Limbic_Region summon evalbot 20:14
20:20 wilx joined 20:29 iblechbot joined
rodi wow, it's craaaaa-a-a-a-a-a-aaazy in here. 20:29
20:31 dduncan joined
dduncan greetingsw 20:31
I had a power outage last night, else I would have done another commit then 20:32
but one should come in under an hour
20:32 aminorex joined
aminorex the tang haskell tutorial looks good, but it's cryptic without auxilliary text. is this written more fully elsewhere? 20:32
21:03 rlp joined 21:06 Ovid joined
Limbic_Region salutations Ovid 21:08
Ovid Hi there.
21:29 marmic joined 21:39 Ovid joined 21:45 pmccann joined 22:04 kcwu joined 22:09 r0nny joined 22:12 kcwu_ joined 22:22 vel__ left 22:39 rlp left 22:43 christo joined 22:44 sub_chick left 22:49 christo left
svnbot6 r8741 | Darren_Duncan++ | r2052@Darren-Duncans-Computer: darrenduncan | 2006-01-17 14:45:06 -0800 22:55
r8741 | Darren_Duncan++ | /ext/Rosetta[|-Engine-Native] : changed the license of the Rosetta framework, mainly the nature of my GPL linking exception; edited pod in Rosetta.pm, Copying.pod, Native.pm, Native/L/en.pm
22:58 Maddingue joined 23:29 nicbrown joined
tewk dist/build/libHSPugs-6.2.10.a(Syck.o): In function `s6Ei_3_alt':ghc1896.hc:(.text+0x1d36): undefined reference to `DataziYamlziSyck_d5Qn' 23:34
Can I rebuild something to fix that without rebuilding clean 23:35
SamB tewk: thats a linker error.
tewk: you need an additional -package flag
for the package that includes Data.Yaml.Syck, I think...
tewk SamB: well whenever I make clean it goes away until a new svn update breaks it 23:36
SamB tewk: you get the same error a lot?
tewk Not with every update, but yes
SamB with approximately the same symbol, even? 23:37
tewk :ghc1896.hc:(.text+0x1dae): undefined reference to `DataziYamlziSyck_d5Qo':ghc1896.hc:(.text+0x1e26): undefined reference to `DataziYamlziSyck_d5Qp':ghc1896.hc:(.text+0x1e9e): undefined reference to `DataziYamlziSyck_d5Qq'
yeah
/usr/bin/ar: creating dist/build/libHSPugs-6.2.10.a*** Found more than one 'Syck_stub.o' -- using the first one. *** Found more than one 'Perl5_stub.o' -- using the first one. *** Found more than one 'Parrot_stub.o' -- using the first one. 23:38
SamB tewk: okay, maybe you don't need a package...
hmm... Syck.o... 23:39
I'd suggest deleting Syck.o and Syck_stub.o and trying again?
23:41 nicbrown joined
SamB its probably one of those Makefile.PL omissions... 23:42
tewk rm dist/build/src/Data/Yaml/Syck*.o did the trick 23:43
SamB hasn't pulled in a while, mostly answers Haskell questions and talks about nonsense 23:44
23:45 Debolaz joined
SamB doesn't even remember that the command is "svn up" and not "svn pull" 23:45
tewk SamB Sounds like a darcs user, to me. I think you might have answered a questions for me on #haskell once upon a time, or maybe it was here. 23:47
rafl SamB: Use svk and svk pull ;-) 23:50
SamB rafl: doesn't seem to much like dialup 23:51
23:53 mncharity joined, mncharity is now known as putter 23:59 hcarty joined