-Ofun: xrl.us/hxhk | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6
Set by apple-gunkies on 11 November 2005.
leo say 'ok' for fluck(fluck) # does it finish if fluck is lazy ;-) 00:09
PJF wonders what happened to the cheerful banter of svnbot? 00:10
Khisanth it died and stayed dead 00:14
lollan yop 00:25
somebody can tell me why you use askhell to write perl6 , it's not too slow ? 00:26
Alias_ haskell can be faster than C
It's also extraordinarily good at writing parsers
In fact, it's arguably it's primary commercial role at the present time
That and crypto 00:27
SamB didn't know haskell had a commercial role
Alias_ parsers and proof-carrying military crypto
SamB proof-carrying crypto sounds dangerous
Alias_ the opposite
It's crypto that you can proove correctly implements the math behind the crypto 00:28
for all cases
lollan ok
SamB I assume it doesn't actually send the proof with the encrypted data?
Alias_ Haskell is tightly based on math... math can prove things
Thus, with Haskell you can write code that is proveably correct 00:29
lollan so i understood if you program well in askhell, it can be faster than C/C++ ?
Alias_ yes
Because it has some really crazy optimisations available to it that C doesn't
C is very close to the metal, but Haskell has math on it's side 00:30
integral a big thing in a C optimiser can be reconstructing some of the facts about functions (eg sideeffects) that haskell preserves in the first place
lollan ok i begin to learn askhell today ,it's really amazing but i bielive it was slow, because you can do too much things
Alias_ It can be VERY slow to compile :)
SamB note that a lot of the time haskell is slower than C, but most of the time you can't imagine how to do what you are doing in C anyway 00:31
Alias_ Haskell is going to be the next "hot" language I suspect
lollan there is function in askhell to optimize ?
Alias_ Or rather Perl6/Haskell as a pair
SamB Haskell is already HOT
(Higher-Order Typed)
Alias_ SamB: Not like Ruby on Rails :)
integral lollan: it's spelled "haskell" by the way
SamB ugh, don't mention that book, its very title has become repugnant
Alias_ heh
lollan ok sorry
SamB not that I've read it, but it never makes any sense no matter how many times I hear it. 00:32
Alias_ Of course, even though I like the idea of Haskell, I can't think of anything I actually might need it to write :)
lollan <Alias_> Haskell is going to be the next "hot" language I suspect << i don't think soo, functional language are particular i think
SamB Alias_: you must not have played with it enough yet 00:33
luqui Well, Haskell's not going anywhere in the popular world
because it's too hard to understand
SamB if you play with it enough, you'll have no trouble thinking things in it that you can't think in other languages
luqui every "hot" language has to look to some extent like C
Alias_ luqui: For now... marketing is largely based on products
luqui SamB, agreed entirely
SamB yay for being unpopular!
(it keeps the idiots away) 00:34
Alias_ ... and jobs
luqui :-)
:-(
lollan sorry what is HOT ?
SamB higher-order typed
Alias_ "buzz"
lollan -00.41.44- <luqui> because it's too hard to understand << i am agree with you
luqui however, I'd say it's well worth putting in the effort to understand it 00:35
Alias_ Perl 6 may well form a nice bridge
lollan Lisp is a functional language no ?
Alias_ Because it spans both sides to some degree
SamB no.
well, not like Haskell is.
lisp is more of a... well, lisp.
luqui Well, Lisp was supposed to be a functional language
lollan ok lol
luqui but a lot of people program imperatively in it. 00:36
SamB they'll call it functional, but thats because they don't know better.
(or are using a different definition)
Alias_ SamB: One less directly based on the math perhaps 00:38
lollan You can optimize haskell by some particular instruction or by a particular way to compile ?
Alias_ no, by language features
SamB er.
what about -O?
Alias_ "no (yes but that's not the point) 00:39
Given f(a, b) you can get yourself f(b) with a optimised out very easily
lollan thanks Alias_ and other for answers
Alias_ So algorithmic optimisation is almost trivial
Which still blows my mind 00:40
lollan it's a mathematical language
lol
SamB thats what makes it so easy ;-)
and yet so hard :-(
Alias_ or hard :)
On the plus side, because math is the only field of human endeavour that can deal with truth and proof, that gets carried into the code 00:41
SamB but in the end, a pleasure to use :>
Alias_ Which is a huge benefit
SamB: If math fits your brain
SamB Alias_: not if, when
Alias_ heh
lollan you work with larry for new perl version ? 00:42
Alias_ me, no 00:43
But I wrote the only Perl 5 parser that doesn't have side-effects, so I'm helping in a few areas for a few days
lollan ok
Alias_ you must love math, math is good of course not too much
Alias_ I like the _idea_ of math.
Math doesn't fit my brain so well though 00:44
lollan to tell you the true i know perl (and some other language)
Alias_ Automata and algorithms much more so though
lollan but i use perl only for small things too hard to maintain
but i am waiting for this new version :) so thanks guys :) 00:45
and i begin to learn haskell
SamB how are algorithms different from math? 00:47
lollan you don't use other language to make perl6 ?
Alias_ Some of the more advanced bits of Perl 6 will look similar to Haskell
SamB: My mind gets small things interlocked in myriads of ways assembled into ever larger machines 00:48
lollan <SamB> how are algorithms different from math? << algorithm are here to help you to write your program , mathematic create new one
Alias_ It doesn't get large complex expressions, manipulations of said expressions, and things like stats and so on
lollan ok thanks Alias_
SamB stats? 00:49
Alias_ I flunked statistics 1a for Egnineers at uni
SamB you don't need stats...
Alias_ wanna bet 00:50
I need it next week
:(
SamB not for Haskell, I mean...
Alias_ sure
But that's not what he commented on 00:51
stevan_ autrijus: ping 00:55
00:55 stevan_ is now known as stevan
Alias_ she's here, but trying to concentrate on some coding 00:57
stevan ah
Alias_ If it's important I can nudge her
stevan please tell her if she has questions I am available
but if she is on a roll,.. dont bother her :)
Alias_ "yay"
autrijus stevan: I'm finishing up native bits 00:58
5 mins
stevan autrijus: I am available for the next couple hours
so whenever you are ready
autrijus okay. I think I've done the design part 01:01
so I'm finally into coding
stevan cool
autrijus please pull r8139 and look at src/PIL/Native.hs
stevan ok
autrijus and we'll go thru the questions one by one.
mostly they are the diffs between fglock's spec and yours 01:02
stevan ok 01:03
stevan has not updated pugs in a little while,..... still pulling 01:04
autrijus 1. how is Symbol used differently than Str in your Core?
stevan well, symbol has a type annotation attached
and is meant to be code symbols (variables, method names, etc) 01:05
they are largely interchangeable with strings
however, strings can be compared, and concatenated,.. symbols cannot
autrijus so are they meant to carry only native types
or also OO types
stevan but if you need to do that,.,. just coerce
well,.. I call it "type" but to be honest, it can hold anything you need it to 01:06
they only carry native types because they currently only live on that level
but that is not a restriction 01:07
make sense?
autrijus mm
but you have a Type type 01:08
that is distinct from a Sym
stevan yeah that is the base "type", probably not a good idea
autrijus so is Sym essentially (ImmutableString, Type) pair?
stevan s/idea/name/
yes, that is Sym
autrijus okay. in that case I'll just use strings for now, as the type is enforced by the haskell compiler 01:09
stevan sure
autrijus 2. in order to carry larry's "undef but error" idea, I promoted Nil to carry a runtime-specific native exception object and renamed it as "error". is it sane?
this is because you return Nil for a lot of different failures
but on the upper level we can't provide useful msg 01:10
stevan ok
autrijus without the Nil actually saying something
stevan Nil is pretty much the same as Void in p6 land
autrijus but you had @array[9999] return nil for out of bound
so it also doubles as undef
stevan hmm,.. yeah 01:11
bad design I think :)
I didnt give undef much thought
autrijus k, that's fine
3. mutability
your Str is immutable 01:12
i.e. destructive updates are not allowed -- only constructive ones that makes new strs
s/Str/NativeStr/
but for the two other plural type (List and Hash)
they are destructively updatable
i.e. remove 01:13
stevan yes, I borrowed the Str thing from Java ... again,.. nothing critical,.. so you can change it if it makes sense to
autrijus I'm thinking about it
how do you use your Hash?
do you know all its keys beforehand?
stevan nope
autrijus ok. I'm thinking about the idea that makes Hash and List immutable as Str 01:14
stevan ok
I suppose the compiler could know all the keys, etc
autrijus because in the MM once we finished construction of objects, that saves several levels of indirection
which leaves NativeRef as the only destructive type (as it's essentially a pointer) 01:15
stevan I have no objection to that, it sounds very sane
clkao autrijus
autrijus perlcabal.org is getting very slow :/
autrijus tries hops on irc from here
01:16 audrey_ is now known as audreyt, autrijus is now known as _autrijus
audreyt there we go 01:16
stevan is amazed at the gender transformations happening right before his eyes :)
audreyt stevan: so, if NativeRef is the only destructive type, its coercion rules become weird
:D
stevan why do they become weird? 01:17
audreyt stevan: in your ::Core, you have ref stringify to CODE(0xDEADBEEF)
and numify to 0xDEADBEEF
clkao seen putter
audreyt that sounds to be as weird.
I wonder if it makes more sense to just rule them out in the core runtime 01:18
stevan audreyt: I was borrowing from P5 here,.. feel free to adjuct it as you see fit
hmm
audreyt i.e. when in the runtime would we be stringifying refs?
the uppercase Ref can stringify however larry wants
but NativeRef?
I thought they are only used to hold mutable bits in the MM
stevan so rule out NativeRef coercions in the runtime? or NativeRefs themselves 01:19
audreyt so I propose that they Bitify as True, and die for everything else
stevan hmm
I think that would work
audreyt no, we need NativeRef because now that Array/Hash become immutable
it provides the only source of mutability
stevan ok
audreyt if we don't allow userland mucking of metamodel 01:20
then NativeRef doesn't need to be here
stevan but we want userland mucking
audreyt but if we do, then it may make sense to use NativeRef to hold the bits that the userland can muck with
stevan I think you can safely remove the coercion functions from Ref
xah_ good morning _autrijus
stevan I dont see any place I actually use them
audreyt greetings xah. 01:21
xah_ greetings audreyt
audreyt stevan: so the source of mutabilities are: 01:22
class of an object
eg $NULL_OBJECT->[1]
stevan yup 01:23
and IIRC the only reason that is there is for bootstrapping
audreyt wait... you have a refernece at Object_id slot?
stevan possibly that could be removed
do i?
audreyt oh, no
nvm, ->new makes objid implicitly
stevan yes 01:24
audreyt I looked at ->new(reference->new) and thought it's ->[0]
it's actually [1]
stevan yup :)
we could remove that reference actually
by createing Class with a nil there instead
audreyt it looks like there's very limited use of Ref then
yes
stevan then using the change_class to do the self ref
audreyt yes 01:25
which will get rid of the only mutability point
stevan that is how the PIR prototype was doing it
audreyt cool... because if we don't have Ref, the state of the runcore native image at any given point is purely value
so can be safely serialized without pointer chasing 01:26
(problem with Ref is that they can disappear from under you)
stevan oh
then remove remove remove
audreyt cool :) 01:27
stevan although closure::env uses refs
audreyt praises Haskell for making all effects explicit
stevan so they can be update able
but there is probably a way around that
audreyt yes, but again it's like native array
or strings
you can update them without destroying old copies 01:28
or do you actually want that?
stevan no need to destroy I guess
audreyt cool... Ref is gone. a sec 01:29
stevan the only other place is list->each
which just passes a ref to the closure
but again,.. can be repleaced im sure
audreyt why can't it pass the value? 01:30
I thought the idea of undercase native types is they are all value types
that has passbyval semantics
s/under/lower/
stevan well each does implace modification
apply is like map in p5,.. it returns a new list 01:31
it can be safely removed I am sure
audreyt ok
stevan TIMTOWTDI :)
audreyt moving right along...
closures and blocks. 01:32
blocks are nonparametric closures?
stevan yup 01:33
audreyt ok, so block is essentially a speed hack
or does it do something that violates liskov?
stevan typing speed actually :)
I could use closure in all places I used block
but setting up a closure was more code
audreyt yup, which is what I meant by liskov 01:34
stevan :)
audreyt okay, I'll just have one native code type then
stevan yeah that works
audreyt so, what is a NativeCode? 01:35
stevan the primary use of blocks is for the do_while and do_until features :)
audreyt an lexical environment, a signature of parameters, and a body?
stevan yes pretty much
stevan stole this one from LISP
audreyt there is one difference from Lisp though... the body of code is not perl6 code :) 01:36
not even serialized perl6 code
I recall we have discussed the idea of serializing the body 01:37
stevan well yes, for now,.. but if the entire body of the code is msg sends,.. it should possibly be translatable (I think)
audreyt into msg sens
sends
stevan yes :)
native code structures should only be in the native types
audreyt because it won't ever be portable (or serializable) if it's a ref(CODE) :)
(well, there's Storable which uses B::Deparse)
stevan the MM and above should use all msg sends
audreyt but it's icky 01:38
stevan yeah
audreyt anyway, I looked at all block->new instances
stevan ok
audreyt it looks like it's really only just message sends
and nothing perl5 specific
stevan yup 01:39
by the time it gets to Bootstrap.pm it should all be message sends
audreyt ok
stevan I think the only non-msg send in Bootstrap is the opaque::send definition
audreyt so body is really just a list of method calls.
stevan yeah it could be thought of like that 01:40
audreyt ok... so I'll make a tiny tiny language and serialize the method calls as structures
stevan sure
audreyt next question: peripheral types 01:41
closure::signature, closure::params, closure::env
stevan yessss 01:42
audreyt we know that for each native type we have a boxed form
and p6 demands autoboxing
stevan yup
audreyt so those three needs to be exposed as well, because they are used like first class objects in bootstrapping
do they roughly corresponds to SigList, ParamList, Pad? 01:43
stevan yes
audreyt where Pad is something with a hash interface like %MY::
stevan yup
audreyt and how does it differ from a NativeStr->Native hash?
(brb) 01:44
stevan I chose to do closure::env more like a linked list
which itself has a hash
the env has to point to it's parent 01:45
closure::env stores a next pointer to do this
audreyt back 01:47
so my design was NativeCode itself keeps a linked list of pads
each pad being a simple NativeMap
stevan sure
yup
audreyt ok, that rids us of a mismatch
(to userland)
stevan sure
audreyt now, signature. 01:48
or rather, params. 01:49
stevan ok
it is just a list of symbols
audreyt where is closure::params defined?
oh in Closure itsemf 01:50
stevan in closure.pm
yes
audreyt k, so it can be modeled as NativeSeq pointing to NativeStr
stevan sure
audreyt but does it have to be a NativeSeq? can we just use [NativeStr]? 01:51
the question is relevant because the former makes it possible for other data types to serve as params
by introducing message handlers that emulates a native list
stevan would [NativeStr] be less exportable to userland?
audreyt if there's no such possibility, I'll fold it back like "env"
stevan ok 01:52
then it is up to you
audreyt the params and pads are all finite, right? 01:54
stevan yes I think so
well,... define finite
audreyt not self recursive
in some way 01:55
stevan yes
audreyt i.e. if you "print" it it will terminate
stevan they are finite then
audreyt ok. is the "body" structure ever useful without it being wrapped in Code?
i.e. "$x.foo" without a pad or params that can bind $x to 01:56
I'd argue no
stevan no I dont see any real usage for that
audreyt -- NativeCode 01:58
-- body: FiniteArray CodeExpression
-- pads: FiniteArray NativeMap
-- params: FiniteArray NativeStr
so that's all the structure there is, I presume
where CodeExpression is not first-class
i.e. user can't bind it to an object
there's no lambda expressions (anonymous Code) in the body, right? 02:00
it's all just nested message sends
stevan hmm 02:01
yes
it can be all message sends
dispatcher does return a closure,.. but that can be changed too
audreyt and it's fine 02:02
returning a NativeCode is kosher
stevan yup
02:03 revdiabl1 is now known as revdiablo
audreyt ok, I'm formalizing the code expression forms 02:05
wolverian reading that dialogue has been the most exciting thing this week :) 02:08
stevan :)
it has been quiet around here lately
audreyt stevan: so, literals in the native code bootstrap 02:09
(think s-expr)
(= sym LITERAL)
is this the only form where you used LITERAL?
or do you also use literals in message arguments?
stevan the message string is a str 02:11
$label = str->new($label)
unless (blessed($label) && $label->isa('str'));
audreyt (or as message recipient)
stevan but i made that optional
audreyt optional? 02:14
stevan $obj->send("foo") # the literal "foo" gets converted to str->new("foo")
or is that not what you mean
audreyt no, that's exactly what I mean :)
stevan ok
audreyt so the control forms are short-circuiting or/and 02:17
plus "while"
that's all?
stevan checks to see .........
there are a few do_until,.. but those should be easy to convert to do_while 02:18
list::each and list::apply are used too
audreyt but those are messages 02:19
stevan yes
so it do_until and do_while
audreyt yes
stevan those are messages on block
audreyt but it's not and/or
stevan and & or are message on bit
audreyt because you fully evaluate message args
however, and/or is not used like that
they are short circuiting
stevan yeah 02:20
audreyt oh, that's why you pass a block!
stevan yes
audreyt it's used as thunks
stevan yes
audreyt yow :)
stevan stole this from lambda calc :)
audreyt yup :) 02:21
but blocks also capture pads
so you just save the params part 02:22
stevan your blocks do :)
audreyt your blocks don't?
stevan block has an env, but thats only so you have have a lexical env and refer to the OUTER:: lexical env
audreyt oh ok.
stevan I am not sure if this makes sense really,.. I was in new territory for me :) 02:23
audreyt actually it makes a lot of sense :)
stevan :)
audreyt thinks a bit 02:24
stevan flips audreyt's bit 02:25
audreyt stevan: wait... closure > block in two ways
params, explicit pads
but you don't ever make use of explicit pads
the only two closure->new calls have $::ENV passing $::ENV itself 02:26
did I miss something?
stevan well dont forget method isa closure
it just adds $?SELF, $?CLASS and $?PACKAGE to the local env
audreyt yeah but that can be explicit (=) forms
stevan WALKCLASS and WALKMETH are the only two closures I think 02:27
audreyt prepended to the body
stevan ok
so what are you thinking ?
audreyt going to commit in a sec 02:28
stevan is glad audreyt is here now, cause that autrjus guy was starting to slack off ;) 02:29
audreyt smiles
ok. so the expression only has three forms: literals, variable lookups, and message sends 02:30
stevan define expression please 02:31
audreyt whatever the body of a block can contain
s/block/code/
stevan yes
well variable lookups could become message sends to the env,.. but otherwise yes 02:32
audreyt thinks about message sends to the env
stevan it could even be msg sends to the Code 02:33
self . env . lookup (LITERAL)
audreyt sub f ($x) { $x }
oh 02:34
got it.
but your expression only works because closure::env is destructive 02:35
as it ultimately calls ->set
stevan yes
audreyt so it's either a Var form 02:36
or an explicit "self" form that can introspect the current code
and get env from there
stevan or calling do() on the code passes the env and params 02:37
audreyt essentially limiting var lookup to $?SELF
stevan yeah that would work (I think)
actually that should probably be $?SUB 02:38
instead of $?SELF
audreyt k
cool... we just reinvented fixpoint ;) 02:39
stevan :)
reinvention is good... we know we are on the right track, and can also benifit from other peoples mistakes 02:40
audreyt *nod*
k, committing 02:42
tewk_ Wow what a conversation, reminds me of the IO language and EOPL 02:43
audreyt hm
stevan: do you use $?BLOCK for anything but .env ? 02:44
i.e. do you really use recursion?
stevan thinks...
audreyt (assuming the explicit .do_while form is there)
stevan MRO is recursive, but that can be removed if we make a native C3 method like in PIR/Parrot 02:45
all recursion can be worked around,.. not need to support it with $?BLOCK 02:46
audreyt because it's isomorphic
whether we have $?BLOCK as primitive and $?BLOCK.env as the pad
or %::MY as primitive and %::MY<$?BLOCK> as the block
if you don't make use of explicit $?BLOCK.apply(..args...) fixpoint form, then I'll make variable lookup the primitive 02:47
I mean, making retrival of current lexical environment the primitive 02:48
stevan ok
audreyt purely as an optimize-for-common-case
do you explicitly use OUTER:: in bootstrapping? 02:49
i.e. is there any lexical lookup that involves exposing the linked list structure?
I don't see one, but it's safer to check
stevan no, there shouldnt be
audreyt ok... then variable lookup is the primitive. 02:50
yay it compiles. 02:51
stevan ship it!!!
audreyt now the fun part 02:53
writing coercion for code
how does closures cast to other types?
stevan badly 02:54
audreyt I'd imagine
stevan I basically used the same kludge as references
stringify/numify the native code ref
bit was always true IIRC
audreyt mm. 02:55
ok, make it an error seems easiest
stevan yes
this looks like ti might be interesting : lambda-the-ultimate.org/node/view/1166 02:56
hey fglock 02:58
audreyt stevan: verily
audreyt adds it to her to-read list (currently still blocked by code complete 2 by 400 pages) 02:59
stevan at first skim it looks like the sig/structure silliness I was talking a little while back
audreyt stevan: yup, but proving it became SomeOneElse'sProblem :)
fglock hi stevan, audreyt
stevan loves delegating, especially when it is automatic :P 03:00
s/automatic/implicit/
audreyt s/implicit/unsuspected/ 03:01
(as in "unsuspected minions")
stevan: hm. actually, any attempt to use nil as a Int is an error, no? 03:02
(in bootstrapping code)
or did you abuse its coercion deliberately?
stevan I dont recall actually
audreyt mmm.
ok. maybe coercion is fine for nils but sending it messages causes the original error to happen 03:03
I think that's the semantic -- at least under "no fatal" which is default
stevan that makes sense 03:04
audreyt %ENV{no_such_key} + 1; # 1
stevan would that become %ENV{no_such_key}->to_num + 1 03:05
this is maybe where nil and undef are different
audreyt honestly I don't know :)
stevan undef should coerce,.. nil shouldnt
audreyt larry may say ->to_complex 03:06
but is too_complex
stevan :)
audreyt p09 mandates native unboxed support for complex numbers though
I mean s09
stevan never understood complex numbers ....
fglock audreyt: I think it means the same as in compact arrays (pdl) 03:07
complex numbers are just an array of 2 elements
audreyt fglock: yup, but then that means num is not the highest in unboxed numeric tower
fglock you don't need to support this in the MM, because it is unboxed 03:08
audreyt but "complex" is also unboxed
otherwise it would be "Complex"
or am I missing something
fglock think compact array - it looks like Array, but it is stored as unboxed 03:09
audreyt you mean "complex" is just bounded array of two
fglock yes
audreyt I think I can ask this question operationally.
pugs -e 'say sqrt(-1)'
is this an error or not :)
fridim hi all 03:10
audreyt if it is not, is it a NaN, i, or undef?
if it's i, then the runtime needs to recognize complex as native type
fridim: greetings
fridim I would like to see an example (else than cpan's one) of using of perl6::classes
fglock how about: sqrt( complex( -1 ) ), where complex() is a type 03:11
audreyt fridim: I think that module is unmaintained
fridim oh
Are you using perl6 ? and if yes, how could i run it ? with parrot ? 03:12
audreyt fridim: you can download it from pugscode.org/
stevan fridim: no with Pugs
audreyt but it's an early alpha, we are still working on it.
fglock I mean sqrt( complex( -1, 0 ) ) 03:13
fridim ok I look
Haskell ?
fglock but sqrt(-1) would be an error, I think
audreyt fridim: which platform (operating system) are you on?
fridim linux (debian sid) 03:14
audreyt fridim: "apt-get install pugs"
fridim aptitude install pugs in my case ;-)
audreyt sorry for not running debian :)
fglock audreyt: I made some tests with PIL2 and Classes 03:15
audreyt fglock: ok, I think Complex can go from native runtime then
(it's not like parrot has a C register type either)
we'd need to use two N registers to emulate a complex when it comes to that
fridim I'am interested in perl6, because of curiosity (?), but when can i expect to see perl6 out ? 03:16
audreyt fridim: you should be able to use perl6 productively sometime next year. but we don't yet know when it will be marked as final release. 03:17
to satisfy your curiosity though, pugs is here and would work well for that purpose :)
fridim thanks :-) 03:18
audreyt stevan: explain this "nil shouldn't coerce" idea
@foo[999] + 1;
vs
@foo[999] = undef; @foo[999] + 1;
you're saying there should be a difference?
(assuming @foo is empty)
fglock: cool, I'll check the tests out. 03:19
fglock audreyt: 'Complex' can be 2 N registers, but 'complex' would be native array of int|num with shape 0..1
audreyt fglock: also I removed Complex from native types for now... they are too complex
stevan well, I gues the idea is that things which shouldnt coerce would be nil
and things that should coerce are undef
audreyt fglock: gotcha
stevan just drawing a line thats all
audreyt stevan: I wonder what are the things that should not coerce... 03:20
stevan wonders too :)
fglock audreyt: may I post some results if you don't mind?
I compiled this: 'Class c; method m( Int @a) {1+1}' 03:21
result: &main::m ($?SELF! is rw : Int @a!, Hash *%_!) { (&infix:<+>(1, 1)); } (&Class((&c()))); 03:22
there are some problems - $?SELF! should have a type; the class name should be a constant, I think 03:23
audreyt the trailing ! is "is required"? 03:24
fglock yes
audreyt fglock: yes. I'm moving away from hooks into serialized opaques. just give me another day or two :)
fglock ok!
audreyt stevan: still around?
stevan yes
audreyt stevan: ok. three other types 03:27
Opaque, Attribute, Method
stevan: let's start with the easy one (Method) 03:28
stevan just wraps the Code type
it enforces a $self parameter is passed
and maps $?SELF, $?CLASS and $?PACKAGE
it should also deal with $?ROLE as well
audreyt yup. but if we do that at method insertion time and prepends the neccessary stuff to the generated Code, it can go, right? 03:29
stevan sure
audreyt and same for Attr vs String 03:30
because it's doing the lexer's job in the runtime
so that leaves Opaque 03:31
stevan its just a compound type
its built from the other types
audreyt but it's also mutable 03:32
except for Id, the two other fields can get reassigned
stevan well
the class can be
audreyt (note that NativeMap here is immutable)
stevan but the map of attributes need not be reassigned
you just add to the map 03:33
audreyt yeah, but map here is immutable, so you can't add anything to it :)
stevan oh wait
we need to be able to add to it
audreyt yup
stevan when you dynamically add attrs
audreyt that's what I meant but mutable
yes
stevan ok
so you would create a new immutable map with the new attr? 03:34
audreyt ok. coertion to and from opaque.
stevan: lazily updating it. it's haskell, all memory are shared
stevan :)
audreyt no memcpy() involved
how does opaque coerce with by-value types?
does unboxed "int" magically becomes an opaque object with Int class?
stevan they always coerce to true 03:35
audreyt that's how I would imagine it
stevan yes, int -> Int
audreyt okay. how about opaque->int
do we send as_int message to it?
stevan I would imagine it would be like in p5
it would return the obj id
stevan is not sure about that 03:36
audreyt in pugs's current runtime it's an error
also if we don't define as_int or something like that
you can't ever write a MyInt to masquerate as Int
because there's no control for native coercion 03:37
so I think we go the normal (i.e. python, ruby) way instead of the insane (i.e. perl5) way
fglock audreyt: opaque->Int->int ?
audreyt fglock: depends...
method as_int { 1 }; 03:38
does not need to go thru ->Int part
fglock audreyt: re complex - it can hold more than 2 elements (a "tensor" in s09) 03:42
audreyt fglock: gotcha -- we need someone more PDL minded to write the runtime casting and methods for complex 03:44
for now I'm leaving them out
stevan audreyt: how are we doing? 03:46
audreyt stevan: I've finished the layout of all value types
stevan ok
excellent
audreyt sanity check them?
(r8145)
stevan audreyt++ #
audreyt will now move to container types
stevan same place src/PIL/Native?
audreyt yeah
actually we probably wouldn't need container types for any of bootstrapping
stevan nope 03:47
audreyt excellent. I'll now port your bootstrap code.
(brb)
stevan any area past MM bootstrap is still fuzzy for me
audreyt nodnod
feel free to sprinkle Native.hs with comments
if there's any line you can't grok, please add 03:48
-- XXX
and I'll try to explain them.
(in the code, not on irc)
you may notice that my identifier names are much longer this time around :)
stevan audreyt: I think I grok it all 03:52
my Haskell-fu has always been fairly weak 03:53
but it seems to make sense
fglock audreyt: Array/List are going to be real 'Object'->'Container' things now?
stevan fglock: yes
fglock :) 03:54
stevan the design we were just discussing is loosely based on this diagram
svn.openfoundry.org/pugs/perl5/Perl..._Space.jpg
Scalar, Array and Hash will all be MM classes 03:55
fglock no 'array' in the core runtime? 03:56
stevan fglock: there will be some sequencable type,.. call it list, array, floober... whatever you like :) 03:57
audreyt fglock: Seq and Map are immutable one-dimentional stuff 04:01
fglock: in your laziness.txt they are "array" and "hash"
I deliberately used different names to avoid confusion 04:02
(the names are incidentally from the YAML spec)
fglock are closures clonable? - such that (1..1000).clone gives 2 independent generators - that would fix a problem I've had with map() on lazy lists
audreyt fglock: sure, I don't see why not. and it's a range not a closure anyway
fglock audreyt: ok
audreyt oh, a language idea
alias and I were discussing the idea of getting rid of global variables 04:03
namely, $*IN and %*ENV becomes $+IN and %+ENV
the idea is the object space runner binds those stuff lexically as the outermost caller frame
stevan audreyt: I have to run, are we good for now?
audreyt as "env" vars
stevan: yes. I'll let you know when I finished bootstrapping 04:04
stevan yes, no globals, your program is wrapped inside one big closure :)
audreyt yup
fglock audreyt: that was a bad example - I meant closures - because when you map() a range you end up with a closure on the range, and you need to have a way to clone this thing
stevan audreyt: cool, I will check in later and see :)
audreyt and the symbol * is heavily overloaded anyway
and global variables are oh-so-hard to optimize.
and "our" variables are still there anyway. 04:05
I still can't find a good example of useful cross-class truly global lookup-defeating variables.
fglock: yes. closures will definitely be clonable. 04:07
although that only applies to upper-case Code and Block, not lowercase ones
but that's okay, because unboxed "block" is not exposed to language level, hurray.
audreyt goes to lunch (and reputedly a 2-hr walk to a nearby rain forest) 04:09
but may become 3
so... bbl :-) *wave*
fglock bye!
Alias_ ARRRRR! 05:27
gaal audreyt: ping and how was the walk? :_ 06:59
)
audreyt gaal: pong, give me 5 mins, let me finish the parser for the bootstrapping language 07:01
the walk was nonexistent... we never found the rain forest. it's too elusive
gaal ah, the Elusive Rainforest! 07:02
Alias_ There's not much left... 07:04
At least we probably missed it to the north and not the south... otherwise we would have ended up in the swamp
gaal the South Swamp! This sounds like some fairy tale to me :) 07:05
Alias_ It kind of is :)
It used to be the home of the "Big Fig"
A tree so large it towered above the rest of the canopy 07:06
In fact, so large it was spotted from the ocean by Captain Cook and noted in his logs when he first found autralia
gaal !!
what happened to it?
Alias_ It fell down in an enormous wind storm about 50 years ago 07:07
gaal ouch :(
Alias_ I remember seeing the trunk when I was a kid, say 20 years ago
gaal d'you remember what tree it was? (species that is)
Alias_ Probably a strangler fig 07:08
It took 45-50 years for the bugs and fungus to eat the trunk away
5-10 metres across
enormous buttresses
gaal oh, nature. oh, wikipedia: en.wikipedia.org/wiki/Strangler_fig 07:09
"
Strangler figs begin their lives as parasites as their seed lodge in the cracks and crevices of the bark of a host..."
Alias_ I took RENEEB out there a few months ago 07:10
There's a shot of him around (probably on his memory card) with a 5 metres tree there
www.screenworks.com.au/locations/in...&i=230 07:11
Something like that
aha! 07:12
www.lismore.nsw.gov.au/tourism/001/...amp;cat=21
Ah, fell in 1987
Except it lost some ... erm... big pieces over the century before that :) 07:13
gaal wow
Alias_ ok, and moreton bay fig, not strangler
but yeah, fracking huge 07:14
gaal recently learned about the biggest tree
it's a whole grove of one aspen really
weighs about 6500 tons(!) 07:15
all interconnected with aerial roots
Alias_ yeah... although it's hard to see how that counts as "a tree" 07:16
You kind of need to create a new category
"Composite vegetable life"
Like that enormous box hedge thing
gaal there are a few reasons 07:17
Alias_ ooo, "collective vegetation"
Borgish
gaal it's one DNA
Alias_ right
I get the reason why
gaal and if one part is hungry, the others feed it
and there is in fact physical continuity.
Alias_ I just find it a little iffy in regards to comparing it to something with a single superstructure
gaal there's a creepier (and iffier) example:
in oregon there's a honey mushroom spread across almost 9 acres 07:18
(!!!!!!)
but nobody knows if it's physically connected.
Alias_ Nothing can be creepier than the things TorgoX saw spawning in his harbour
gaal do I want to hear? :)
Alias_ Some sort of weird green worm thing with thousands of little flippers 07:19
gaal the the water? a worm? how large?
Alias_ It's head detaches from it's body, turns into a sexual organ, and floats to the surface where it emits green goo
The whole family of animals is really screwy
You'd have to ask him about what it actually was, I forget the details 07:20
gaal I think we are genetically programmed to emit an "ewww!" sound whenever we think of green goo.
Alias_ Coming from a country primarily designed for chemical warfare, I'd say it's because we are wired to fight on another level 07:21
brains beat chemistry, so in most places there aren't many chemistry-oriented things left
audreyt gaal: are you going to be around for at least another 30 min or so? 07:22
(I'd like to finish the parser)
Alias_ (sorry, I'm distracting)
Alias_ goes back to work
gaal audreyt: sure
Alias_: NAK on the "country primarily designed" bit... 07:23
Alias_ NAK? 07:26
gaal "I didn't get it"
Alias_ If you look around Australia (where I'm from) it seems to be "designed" for another time.
When most of the interspecies warfare was done at a chemistry level, rather than claws/teeth/brains 07:27
But it also applies to the plants too
Eucolyptus trees leech alkalines into the soil to kill other trees, etc
gaal so, venom and phermones?
Alias_ all sorts of stuff, yeah
gaal they do? we have plenty of them here, imported from australia some I don't know, 70 years ago 07:28
that must expain why we have ONLY them now. j/k :-)
Alias_ They are considered a pest in large parts of africa
A eucolypt forest is quite sparse with no undergrowth 07:29
or at least, little undergrowth
where is "here"
gaal .il
Alias_ eep 07:30
You guys have enough issues with toxic humans
gaal hey, maybe the trees leak toxicity in general and it was all the aussies' fault? 07:31
Alias_ The day we feel like we "control" the country is the day it becomes a worse place
gaal in fact, given the local constellation, it's enough if they leak toxicity *to generals*.
Alias_ You still kind of just try to gently influence nature here 07:32
gaal big land, complex ecosystem. 07:33
Alias_ emphasis on the big 07:34
gaal here it's small land, complex ecosystem.
Alias_ and humans gradually bulldozing everything to build stuff
gaal well, yes, but there are a few relatively big areas left open that will stay open for a while. 07:36
gaal makes tea 07:52
audreyt all done :) 08:11
gaal: still there?
gaal yes, hello again :) 08:14
so I think we need to start by refactoring Exp to get an Annotation node, right? You of course saw this months ago. 08:15
Ann can encapsulate Cxt, Pos and [Prag] 08:16
data Ann Cxt !Cxt | Pos !Pos | Prag ![Prag] ? 08:17
audreyt that sounds sane, yes
and a form of Exp that reads 08:18
Ann !Ann !Exp
I think that's all there it is
basically put every unwrappable stuff into it
gaal now, what's not clear to me is where annotations need to be added - is there anything common between cxt and pos and prag in that respect? 08:19
eg pragma lists are supposed to come per "statement"
this structure can express annotations over any Exp, but is that too loose? 08:20
audreyt so, we have discusses adding it to the Stmts form instead 08:23
but I think it makes sense to just leave it as child to Exp
because: 1. we are not pretty printing Exp back to perl6, so roundtrip safety is no concern
2. they really do share unwrap logic 08:24
3. it's easier to implement
svnbot6 r8149 | autrijus++ | * Native runcore minilanguage parser is ready -- this is the
r8149 | autrijus++ | minilanguage we are going to write the bootstrapping code in.
r8149 | autrijus++ | It's isomorphic to Stevan's s-expression model but with a
r8149 | autrijus++ | much better syntax. Details later.
r8149 | autrijus++ | * "make pil" now builds a parser shell to this minilang.
audreyt 4. Exp is the parse tree, not the semantic tree, so it's okay to have bogus stuff
gaal in the case of pragmas, it would have made sense -- but not fot the others your points are valid :)
(missing ";" after "others" in that sentence)
audreyt :)
so, I think go for it
gaal ok, let me see where this leads me. 08:25
btw, when you are in refactoring mode, do you keep a ghci and do :r, or do you :make from vim? 08:27
(i love vim's quickfix, but in the case of pugs make is slow)
errrrr, eep? make ghci doesn't work now? 08:28
audreyt eep?
gaal it loads some Main but it does it too fast
audreyt it worksforme
oh. right. it's using the .a file
gaal oh, right 08:29
audreyt and to answer your question, I use "make pili"
it may make sense to revert ghci to use src/* instead
instead of the .a file
but that's icky... because we are now keeping .hi and .o in dist/
pugs make is okay if you put -O0 to config.yml 08:30
gaal weird, "make pili" gives me an error about FastPackedString.hs
audreyt fixing
gaal :make via vim does the whole directory walk, which is usually unecessary in a dev cycle 08:31
audreyt fixed
(r8150) 08:32
svnbot6 r8150 | autrijus++ | * "make pili" should build "make pil" first. reported by gaal++ 08:33
gaal hmm. what's the latest word on precompiling prelude in unoptimized builds? it'll probably take forever, no? 08:35
we wanted to put back prelude source inlining, did anyone get to do it?
eh. ran "make" on a broken pugs (just at the start of a refactoring), it stopped; then i ran "make pili" and it looks like it worked. but Pugs.AST.Internals can't be available... 08:36
audreyt gaal: source inlining -- I implemented it.
gaal oh, great. 08:37
audreyt++
audreyt gaal: the pili/pil tree does not interfere with the main ghci/pugs tree
the latest word is that the Exp->Haskell form needs to be replaced with the "bytecode"
gaal :-) 08:38
audreyt which is the NativeLang thing I'm doing here
gaal drifted pil?
audreyt pil is even higher level... this is decomposed everything to lexical lookup, literals and method calls
hence "native"
as in runtime independent; virtually no codegen needed
(assuming the target can do lexical lookup, literals and method calls natively) 08:39
which is like, all of them
not sure if this idea is going to work; but it's needed for the metamodel boostrap, so at least for the new runcore internalls
so even if we don't codegen from here to (say) Perl5 because it's going to be grossly inefficient 08:40
it can still be the PreludePC data structure
because it's pure value (i.e. not some monadic code), compilation time and heap use will be much reduced.
give me another week or so :)
gaal :)
extract is confusing me :) 08:51
audreyt how so? 08:52
gaal its purpose is to turn ??? an expression and a list of unconsumed strings to a better-constructed expression that consumed part of the strings? 08:53
audreyt please give it a better name 08:54
it's doing only one thing
which is extracting the implicit parameter list
from a syntax tree
like $^a $^b
taking the previously accumulated set of syms as argument 08:55
and return the rewritten Exp (with all ^ from implicits removed)
and the accumulated set of syms
it's implemented as a List but actually a set because of nub
gaal why are Cxt &co. even mentioned there then? 08:56
audreyt they are passthru'ed.
because you need to preserve Ann 08:57
but extract downward
so just take the Pos case and change Pos to Ann
gaal so, we're deducing placeholders vars yes?
audreyt that'd be a correct implementation
yes, at the parser level
so maybe call that function extractPlaceholderVariables 08:58
gaal what's that given/when case there? deducing $_?
audreyt yes, because $_ is also implicit
gaal @hoogle nub
er, not here.
audreyt 19:58 < lambdabot> forall a. (Eq a) => [a] -> [a] 08:59
remove duplicates
gaal like unix uniq?
or for real?
audreyt for real
unlike uniq
gaal but slower
OK
audreyt should probably use a real Set there
but whatever :)
gaal yeah
audreyt no need to microoptimize (yet)
gaal ack.
audreyt ...unless you really feel like to 09:00
gaal one thing at a time :)
can pattern matching go deep? eg Pugs.AST:131 09:02
now can't stay x@(Pos pos (Syn syn _))
oh wait
the answer is staring at my face
x@((Ann (Pos pos) (Syn syn _))) modulo syntax 09:03
audreyt :)
and yes, it goes deeparbitrarily
gaal haskell++ # if someone would have told me of this feature, I'd give them a weird look, but now, I'm impressed yet again 09:04
pandora++ 09:16
soooo much fun
argh, I still need some syntax calibration :/ 09:26
Instead of Pos being a form of Exp, now it is a form of Ann which is a form of Exp 09:27
I should be able to figure this out! But it hasn't happened yet and I want to get on :( 09:28
audreyt calibrates gaal
yay, pretty printing works for the minilang.
now an evaluator. 09:29
gaal wheee!
so give me a hint please
re: that "modulo syntax line 09:30
audreyt er...you do it by 09:31
s/Pos/Ann/
s/pos/ann/
svnbot6 r8151 | autrijus++ | * pretty printing works for the native minilang.
r8151 | autrijus++ | * parens are now optional in minilang surface syntax if the
r8151 | autrijus++ | method call takes no arguments.
audreyt done
that was the whole point :)
gaal word. 09:33
yeah, abstraction 09:34
which is something that makes things easier for brains that have been made sufficiently fluid. 09:35
r0nny yo 09:41
audreyt goes adding "Instance" to the runtime
r0nny: yo
(brb) 09:42
r0nny well - im updating pugs - hope the problems with data-less clases are fixed 09:43
gaal src/Pugs/Bind.hs:107:28: Couldn't match `Exp' against `Ann' 09:50
but surely, Ann *is* an Exp? 09:51
luqui do you mean Ann the data constructor or Ann the type? 09:54
luqui is just guessing, he doesn't have time to look at anything
gaal yes, you're right: in Exp, there's Ann !Ann !Exp
and a Cxt is not a form of Exp any longer 09:55
so I need to construct an Ann (Exp form) from my ann (thing of a type)
errr, I have an Exp to much thn. 09:56
data Ann = Cxt !Cxt !Exp | etc., or shouldn't it be just 09:57
data Ann = Cxt !Cxt | Pos !Pos | ...
?
the !Exp chaining comes only in one place
OK, I think I got it. 10:06
Alias_ kidnaps audreyt for dinner with his family 10:12
Back in hourish
gaal bon mousse!
audreyt gaal: the later 10:22
dinner, bbiab & 10:23
gaal audreyt: yes, got it and making progress. 10:26
svnbot6 r8152 | bsb++ | r26@rex: bsb | 2005-12-10 11:35:46 +0100 10:43
r8152 | bsb++ | Update INSTALL's parrot 0.3.0 embedding caveat
gaal looks like it works; rebuilding an optimized version for smokes. 10:46
r0nny anyone there 10:54
when will the serious bugs be fixed (like defined vars are seen as undefined in some cases, and in others not) 10:55
gaal r0nny: are there tests for that? 10:58
r0nny gaal: i have no idea 11:11
and i have no idea what chaused this behave (some revision earlyer it worked fine)
gaal r0nny: could you add a test to t/pugsbugs then please? 11:15
r0nny but what to test ? i have no idea how this bahave works 11:17
gaal I didn't hear of this problem before, do you remember when it was discussed at least? 11:18
r0nny no
but i asked a few times, and was ignored 11:19
gaal sec, this is a problem you encountered yourself, or did you see people talk about it? 11:20
r0nny im not sure - there where some days where i wasnt here 11:21
but the problem exists since last week
gaal you aren't helping me understand what the problem is :) 11:22
r0nny i have a class, wich has a attribute - this atribute gets a instance of another class in the build method - canning ref on the attribute tells me the class name of it, calling defined tells me _FALSE_ 11:23
s/canning/calling/
gaal looks in pugsbugs
r0nny: I don't see anything like it in t/pugsbugs. Could you submit a test case please? 11:26
r0nny gona try to write one
gaal thanks! 11:27
hmmm, I'm getting linker errors, has anyone been seeing things like this? 11:29
r0nny wich version ? 11:30
i made Version: 6.2.10 (r8151)
gaal sial.org/pbot/14871
'52. 11:31
8152 that is.
r0nny hmm 11:32
make clean or make realclean ?
gaal this probably has to do with parrot.
r0nny gona try if it compiles for me
gaal bdb, ping
bsb even
bsb yup 11:33
r0nny if it fails, im gona install recent svn parrot
i wrote ebuilds for parrot and pugs can install the recent svn version
gaal just did.
r0nny hmm 11:34
btw - pugs needs to inherit from ghc-package or something
else one of the compiling backends wont work
bsb gaal: pong 11:39
gaal hey. actually I'm no longer sure this is has to do with parrot. 11:40
r0nny gaal: the test i wrote ends up in a endless loop
gaal but, bsb, did you manage to build the latest r?
r0nny gaal: and it does inexppected stuff
gaal r0nny: is there a way to make it display your bug without doing that? 11:41
r0nny gona try 11:42
bsb Do you mean with parrot embedded? no 11:45
I just remove the reference to 0.3.0 being the latest (if this what you're talking about?) 11:47
gaal OK. Since you sent in a patch, I presumed you made a build lately. never mind :)
bsb I did build just now 11:49
Want me to try something?
gaal bsb, was it parrot-enabled?
weird.
these may be unrelated problems I'm seeing... will wait for this nonembed build to complete. 11:50
r0nny ARGH
its in a endless loop in a build submethod
and i dont know how this could happen
bsb it wasn't, I have parrot externally (I think)
11:55 _autrijus is now known as audreyt
audreyt rehi 11:58
gaal hi again.
r0nny new nick ?
audreyt yup 11:59
r0nny there are several problems in pugs now
gaal audreyt: I think I have the refactoring done, but am getting weird linkage errors. I just started a clean build w/o parrot.
(in make unoptimized it all worked) 12:00
r0nny i never tought i so simple BUILD submethod would end up in a endless loops
audreyt r0nny: give me an example?
gaal: nuking dist/build/ usually worksforme to clear up linker errors
r0nny audreyt: rafb.net/paste/results/HM8QrB43.html 12:01
gaal oh, thanks for the tip!
audreyt r0nny: fixing
r0nny and it got problems with ref and defined 12:02
audreyt you spelled "ref" as "rev"
r0nny hmm
well - the problem is what defined return 12:03
i got a class, where a atribute has a class (got it with ref), but is not defined
audreyt nod, that is known, I'm midway fixing it. 12:04
r0nny hmm
audreyt as re the infinite lop, it's a genuine bug. currently you can workaround by saying ::foo.new
but I'm fixing it for good. a sec
r0nny plz highlight me when done
audreyt highlight, as in, mentioning your name?
r0nny jepp
audreyt k
gaal TDD++; # find t -name \*context\* |grep -v svn | xargs prove => All tests successful. 12:23
svnbot6 r8153 | gaal++ | * Refactor Cxt, Pos, and Prag nodes in Exp to a unified Ann 12:24
r8153 | gaal++ | (for Annotation) type. This should ease work on lexical pragmas.
gaal audreyt: could you please take a look at this patch for sanity? 12:25
audreyt a sec, I've fixed r0nny's reported bug
about to commit 12:26
gaal yay
audreyt mm, needs to merge with yours anyway 12:28
audreyt goes revewing
gaal: preludePC broke for some reason 12:35
gaal: Pugs.Compile.Pugs instances are broken 12:37
gaal frowns 12:38
good thing we have different build settings 12:39
audreyt somehow freenode borked my password
audreyt tries renicking to get around it
svnbot6 r8154 | autrijus++ | * r0nny reported that "foo.bar" was parsed as "&bar(&foo())" for
r8154 | autrijus++ | no particularly good reason. it now parses as "::foo.bar"
r8154 | autrijus++ | when ::foo is in scope, and "&foo(.bar)" otherwise. Not entirely
r8154 | autrijus++ | sure the latte is the sanest way -- suggestions?
12:39 audreyt is now known as audrey
audrey already registered by someone else. bah :/ 12:40
audrey gives up on this nick registration thing for now
gaal audrey: /msg lilo to reset the password? 12:41
audrey ok
gaal I always have the urge to reboot when I see his nick though.
audrey ditto :) 12:43
gaal I just realized what I was eating for lunch. audrey, when you're here, we must let you taste this.
"pumpkin ravioli"
audrey sounds very tasty indeed
Juerd_ gaal: It's the one and only positive thing about the guy: he reminds me implicitly that I should upgrade my kernel every now and then 12:44
:P
gaal audrey: by Pugs.Compile.Pugs instances you meant compileShow2 etc.? 12:46
svnbot6 r8155 | autrijus++ | * Pugs.Compile.Pugs: Accomodate for gaal++'s otherwise 12:47
r8155 | autrijus++ | excellent and sane Ann changes, so PreludePC.hs can still
r8155 | autrijus++ | function as usual.
audrey gaal: I mean r8155. yes
just lift it to Ann is all
gaal heh. fastest gun in the west.
for some value of gun, and west.
audrey and fast. 12:48
gaal lol
audrey and "in". fortunately "the" is constant enough.
gaal oh, duh, of course re Ann lifting 12:49
thanks :)
ok, now how to carry Prag Anns from one statement to the next. 12:50
audrey carefully 12:52
gaal :)
audrey line 278 Eval
| Noop <- unwrap this = reduce rest
you need a case before that 12:53
gaal in Eval? The parser oughta know this already, no?
audrey oh, sure
so you are going to replicate it in each Stmt structure 12:54
that's certainly a valid way of doing it
gaal cheap too, in principle. 12:55
audrey you can do it in mergeStmts
if you find it too icky (one function doing many things)
then add another propagatePragmaInStmts function 12:56
that goes in Parser.hs each time you are dong creating a Stmts structure
it will inspect the cons calls like thus
propagate (Ann (Prag prag) exp) (Stmts x y) = 12:58
exp1 ^W^W^Whm
propagate prag (Stmts x@(Ann (Prag prag') _) y = Stmts x (propagate (prag `mergePrag` prag') y) 13:00
svnbot6 r8156 | fglock++ | * misc/Parser-Mini/pil2_json_emit_forth.p6 - an emitter for
r8156 | fglock++ | Forth (or something like that)
r8156 | fglock++ | 1 1 &infix:<+> &say
r8156 | fglock++ | * pil2_json_emit_p6.p6 - refactored the language-independent
r8156 | fglock++ | parts in a module
audrey something like that.
gaal ACK, I think. 13:01
audrey cool 13:02
gaal now re: blocks: ruleStandaloneBlock needs to know the Prag context it was started in 13:04
so it can instill it on the body, but also so it can reset it after the lexical scope finishes. 13:05
(actually I'm not sure if that's ruleStandaloneBlock or one of the other rules that should be responsible for this) 13:06
audrey yay, I got my password reset
lilo++
13:06 audrey is now known as audreyt
gaal in the last attempt I stashed the pragma list in a hacky place in Env - but that's weird and feels wrong. 13:07
audreyt if it's me implementing this
I'll do it in Eval
because Exp is really just a document parser
and the yielded Exp may be bogus in many ways already 13:08
azuroth evening
audreyt it's okay to rely on the consumer of Exp, be it evalExp or cmopileToPIL, to make sure the pragmas happen
clkao /win27
audreyt currently it feels a lot like the perl5 parser/runtime mixed environment already 13:09
and each recursive queries like propagatePragma makes it a bit worse
gaal The whole reason why this isn't an easy port is that it *isn't* like the perl5 parser/runtime :)
audreyt nod... but why not just keep the Ann?
and leave it to Eval.hs reduceStmts to resolve it
gaal I think I totally don't understand that, but I'm hoping I'm wrong. :) 13:10
audreyt ok.
you are talking about envInitDat, right? 13:11
gaal yes
that's probably bogus though. 13:12
audreyt in my mind, pragmas should work just like lexical exports 13:13
but currently our exports are package scoped 13:14
gaal they should work a lot like lexical exports 13:15
audreyt so maybe solving lexical export is the correct way to go
gaal but you can do { use X; x-is-on; no X; x-is-off }
audreyt right, so unlike lexical exports, annotations doesn't have the hoisting property that it's unique in a scope 13:17
r0nny re
gaal yes; every change to the value is prepended to a list. 13:18
is there some code for lexical exports already?
ingy hi audreyt 13:19
audreyt no. I very much regret the fact that "export is lexical" missed my first reading of p6 spec 13:21
gaal: what would make most sense is for X.pm to directly manipulate the MY:: package. 13:22
for the importer
i.e. @?PRAGMA there would hold the pragmas
so "no X" will modify it as usual 13:23
and each statement will carry the @?PRAGMA with it
which is destroyed when the MY:: went out of scope of course
as part of the pad
am I making some sense?
ingy: hi!
r0nny audreyt: yes, u do 13:25
gaal I think that would work. Can it be fast?
and not memory hungry?
making @?PRAGMA a real var that is. 13:27
audreyt gaal: it's all compile time 13:28
parse time in fact
gaal that is hidden in each new scope
audreyt I don't think we need to care that much in this stage
gaal oughta be, yes
OK
r0nny btw - howz the fix witrh the ref<=>defined problem
Alias_ ok, all possible 4-char programs work 13:29
audreyt Alias++ # yay finally. release!
Alias_ releasing
gaal in what language, Alias_?
r0nny 4 char progs ?
audreyt goes release Module::Install as well
r0nny: working on it. give me another week
r0nny ok
Alias_ gaal: Perl 5
gaal what does "work" mean in this context? 13:30
audreyt "work" as in "PPI tokenizer won't break up and can actually produce something that can be transformed to PIL"
r0nny how many 4-char progs are possible with perl5 ?
Alias_ And 4-char meaning exhaustively testing every possible case
r0nny: About 50^4
audreyt ?eval 50 ** 4
13:30 evalbot_8131 is now known as evalbot_8156
evalbot_8156 6250000/1 13:30
r0nny sounds like fun
btw - why must ** return a rational ? 13:31
Alias_ Handing more cases than the perl interpreter? yeah...
gaal
.oO(how do you say "dump" in PIL?)
r0nny eval 30 ** 30000 13:32
Alias_ PPI 1.106 uploaded
audreyt r0nny: mostly because haskell only has builtin (^^) :: VRat -> VInt -> VRat
and no VInt->VInt->VInt form
and I was too lazy to define one. 13:33
gaal audreyt: where is export specced? i can't find it in S10 13:34
audreyt S11 "lexical scope" 13:35
gaal cool, that.
what I don't see is where module configuration options went 13:39
use Test::More 'no_plan' 13:40
and export tags, not that I liked those anyway 13:41
audreyt sorry, was away 13:52
gaal: I think the module has to override IMPORT 13:54
gaal: it's 1pm here, and I think we need to leave the office soonish :) 13:56
I'll be back ~10hr from now
stay for 2~3hr and then fly to Sydney, then back here for another two hacking days 13:57
then there's some more talks to give. :)
be back tomorrow... & 14:06
meppl guten morgen 14:16
azuroth good morning 14:32
14:50 Maddingue_ is now known as Maddingue
gaal audreyt: was away, myself. enjoy the rest of your time over there... 15:03
overriding IMPORT wasn't the answer I was hoping for :) because it means "it can be done, but there's no conventional means we recommend" 15:05
c 15:06
cognominal audreyt like Audrey Tautou? 15:41
17:16 integral is now known as bs338 17:27 bs338 is now known as integral
fridim hi 18:59
can i use strict with pugs ? 19:13
gaal currently you can't not use strict with pugs :) 19:14
fridim I've seen that we can use some cpan modules with pugs (in examples section in pugscode.org). But is there something to configure ? 19:16
gaal when building pugs, make sure you enable perl5 embedding. 19:20
fridim oh. 19:21
i've just apt-get it
gaal the debian packages include p5 embedding.
so you can do, right away:
fridim Can't locate WWW/Mechanize.pm
gaal pugs -e 'my $val = eval "42", :lang<perl5>; say $val' 19:22
OK, print your p5 @INC:
pugs -e 'my @p5inc = eval q{@INC}, :lang<perl5>; @p5inc.perl.say' 19:23
fridim @*INC (@*INC contains: /usr/lib/perl6/5.8 /usr/share/perl6/5.8 /usr/local/lib/perl6 /usr/local/share/perl6 /usr/share/perl6/5.8/auto/pugs/perl6/lib /usr/local/share/perl6/auto/pugs/perl6/lib .).
gaal no, your p5 inc
your p6 inc shouldn't include p5 libs, after all
use that one-liner 19:24
fridim it seems quite different from perl using... i should read some doc about pugs. 19:25
[{obj-perl5}]
gaal hmmm
yeah, sec
fridim (i've www::mechanize installed, and works with p5)
gaal hmmm, apparently returning an array is a little problematic. try this: 19:30
pugs -e 'my $p5inc = eval q{\@INC}, :lang<perl5>; say $p5inc[$_] for 0 .. 10'
fridim /etc/perl
/usr/local/lib/perl/5.8.7
/usr/local/share/perl/5.8.7
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl 19:31
/usr/local/lib/perl/5.8.4
/usr/local/share/perl/5.8.4
.
gaal you have mech installed in one of those?
fridim probably not, how could i know ?
gaal perldoc -l WWW::Mechanize
fridim /usr/local/share/perl/5.8.7/WWW/Mechanize.pm 19:32
haha
gaal so it should work. the use should look like this:
use perl5:WWW::Mechanize
fridim !
gaal notice only one : after "perl5"
fridim I didn't put the perl5 19:33
gaal ah. module loading isn't transparent
which when you think of it is a good thing
fridim gaal: it works well, thank you
gaal in principle one day you could do use ruby:Rails
or python:twisted 19:34
etc.
sure :)
fridim i've "read" some article like "why perl6 won't work" 19:35
to my mind, it will work
Just the new classes design could make perl6 work :) 19:36
Juerd_ Well, some of the OO bloat could/should be removed imo 19:37
To avoid a catastrophy
lollan there is always people to say it never work without trying anything 19:38
fridim imo ? 19:39
Juerd_ In My Opinion
r0nny i would be fine, if at least the undefined instances was out of the world 20:01
+problem with
rindolf Hi all! 20:08
In Spork, why doesn't [a 1990 groups.google.com/group/comp.lang.p...9c0b?hl=en message] renders as a link with the text?
I ran into a bug on my first slide... 20:10
svnbot6 r8157 | pjf++ | Butchered numerous tests that were causing infinite loops, replacing them with flunk()s. 20:34
r8158 | pjf++ | Removal of tests that cause infinite loops and replaced with flunk. 20:52
Khisanth fridim: I think that article was written by rindolf :) 21:03
stevan audreyt: ping 21:21
svnbot6 r8159 | pjf++ | Improved pugs_revision detection on hybrid Cygwin/Win32GHC systems. 21:40
PJF wonders if there's an easy switch to make run-smoke.pl display verbose output of all tests to the console as they run. 21:49
fridim Khisanth: i don't know rindolf 22:08
gaal PJF: there is not. you want to hack util/yaml_harness.pl around line 203 more 22:11
or less.
probably it's a good idea to make this configuration visible from config.yml 22:13
fridim Khisanth: ok, i've seen his apparition
PJF Thanks Gaal! 22:14
Gaal: Am I correct that Audrey has a separate repository for Module::Install, and just syncs it back into pugs from time to time?
The most recent update to Module::Install breaks 'make test' in pugs. I've written a patch, but I'm wondering if I should be pushing it out to a separate M::I repository as well. 22:15
obra PJF: can you nopaste the patch? 22:16
obra is a maintainer for M::I
gaal isn't here
PJF obra: Just submitted as 8160 in pugs. The only code change is: 22:17
svnbot6 r8160 | pjf++ | Only query '$self->tests' if we haven't been given an explicit list
r8160 | pjf++ | from makemaker_args.
r8160 | pjf++ | This should be reviewed/submitted/corrected for main M::I inclusion.
PJF $args->{test} ||= {TESTS => $self->tests};
Gah, that's not very useful, is it?
obra where does that live?
PJF Index: Makefile.pm 22:18
===================================================================
--- Makefile.pm (revision 8159)
+++ Makefile.pm (working copy)
@@ -61,8 +61,12 @@
$args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
$args->{VERSION} = $self->version || $self->determine_VERSION($args);
$args->{NAME} =~ s/-/::/g;
- $args->{test} = {TESTS => $self->tests};
+ # Only call $self->tests if we haven't been given explicit
+ # tests from makemaker_args.
+
+ $args->{test} ||= {TESTS => $self->tests};
+
if ($] >= 5.005) {
$args->{ABSTRACT} = $self->abstract;
$args->{AUTHOR} = $self->author;
PJF apologies for the spam. He really should have a coffee before pasting things into irc.
obra PJF: you've seen paste.husk.org? 22:19
(And the other nopasters?
PJF That's in M/I/Makefile.pm. We're only calling $self->tests if we haven't been given an explicit argument from makemaker_args.
integral there's two with bots here in the topic.
PJF I've seen paste.husk.org now. ;)
obra :)
PJF apologies again for the spam, having misparsed the 'no' in 'nopaste'. 22:21
obra no worries
PJF: how do you like to be credited?) 22:22
PJF obra: It's a two character change. I'm not sure if that's worthy of crediting.
obra: But if you have to credit, then just "Paul Fenwick" is fine. 22:23
obra committed 22:25
credit is at least as much about blame as praise ;)
svnbot6 r8161 | gaal++ | * quell haddock 23:02
Alias_ on returner 23:19
audreyt PJF: I've made you committer to svn.openfoundry.org/modinstall/trunk as well. 23:22
PJF: please commit the same patch there :)
PJF Good morning Audrey, Alias.
audreyt (and I'll roll it out in 0.41)
PJF++ 23:23
obra audreyt: you must have missed my push
PJF I think that obra has already beaten me to it. But I'll double-check.
obra Should be commit #45
audreyt oh wait, obra pushed it
yup, my svk pull -a hadn't yet run that far
looks clean. pjf++ obra++ 23:24
svnbot6 r8162 | autrijus++ | * Pugs.Shell: turn CmdRun into a record type for better clarity 23:36
r8162 | autrijus++ | as the new PIL runtime is using it.
r8163 | autrijus++ | * "make ghci" now actually do something useful, as was the 23:51
r8163 | autrijus++ | case before cabalization; ":r" in the ghci prompt will now
r8163 | autrijus++ | reload changed .hs files as expected. gaal++ for mentioning it.
PJF cheers as his first pugs 'make test' completes under cygwin. 23:55
Audrey: I've noticed that on Win32 (and Cygwin under Win32) that ghc doesn't add itself to $PATH. In the interests of making pugs easier to install on those systems, are you happy for me to add some autodetection code to Makefile.PL such that $PATH or $GHC doesn't need to be explicitly set on those systems? 23:59