Pugs 6.2.6 uploaded by cpan-upload.p6! | pugscode.org/ <Overview Journal Logs> | pugs.kwiki.org | paste at sial.org/pbot/perl6
Set by integral on 2 June 2005.
putter nothingmuch: not quickly, but I note svn.openfoundry.org still doesnt ping. www.openfoundry.org is up, but I dont immediately see status info. 00:06
It also wasnt pinging 8+ hours ago. 00:07
Darren_Duncan to whom it concerns, openfoundry.org seems to be down right now 00:30
putter Darren_Duncan, yes, thanks. Its been down for many hours. 00:55
:(
autrijus yeah. 00:56
it being the weekend, I think there's still exactly 24 hours to go before it will be back up. 00:57
autrijus sighs and waves and falls back to sleep again, having jumped out the window of the closet^Wroom and almost had to jump back in... & 00:58
Khisanth wonders why autrijus is jumping out of windows 01:53
kelan the door to his room only has a knob on the outside
QtPlatypus Sounds like my office. 01:54
_meppl_ gute nacht 02:24
Aankhen`` Server's down? 03:59
gaal was, last night at least... 04:00
QtPlatypus Yes
Aankhen`` ?eval class Foo { };
evalbot6 undef
Aankhen`` Ah.
That bites.
?eval class Foo { }; module Foo { };
evalbot6 undef
Aankhen`` ?eval class Foo { method bar (Class $self: ) { "I'm a class, you " ~ ::?CLASS } }; module Foo { sub bar () is export { "I'm a module, you $?PACKAGE!" } }; use Foo; bar(); 04:02
evalbot6 pugs: *** No compatible subroutine found: "&use" at -e line 4, column 5-253
QtPlatypus Safe mode?
gaal nah, you can't do that. it's 1. safe mode, no "use" and 2. use wouldlook for a file.
Aankhen`` Yeh, I see. 04:03
Darren_Duncan it may be useful to give different error messages if something isn't working because it is explicitly disabled by safe mode, rather than never supported 04:12
Aankhen`` goeth out. 04:33
Later.
Alias_ This channel is logged? 06:02
Khisanth It was not sure it if it still is
revdiablo colabti.de/irclogger/irclogger_logs/perl6 06:03
Alias_ is not entirely happy to find out that everything he has ever said in here is public, online and searchable
Pete_I one of the several bots probly keeps logs.
haha
Alias_ I don't mind people logging and doing it for themselves 06:04
Pete_I well, this is a public channel.
Alias_ CRAP, and in real time
Darren_Duncan I think the public logging is a great idea
Pete_I (there's a bot in here that's updating it)
Darren_Duncan lots of important things are discussed here, and its good to have a backup copy to refer to later 06:05
revdiablo Pete_I: are you sure? I thought someone was busily copying and pasting.
Pete_I haha
yeah....
Darren_Duncan the irclogger is akin to what nntp.perl.org does for the mailing lists
Alias_ Darren_Duncan, as I said I'm totally ok with private logging and searching
revdiablo now I have a strange desire to search the logs for everything Alias_ has said in here
Alias_ But irc is not generally a considered a "will hang around to haunt you for the rest of your life" medium
nothingmuch wonders how he'll get to work this morning
Alias_ unlike mailing lists 06:06
Pete_I revdiablo, i think i'll use google to do it :) 06:07
Alias_ I wonder if google does index it... 06:08
ali.as/ # onling logging google link spam!
online
Speaking of public logs... 06:26
nothingmuch autrijus: ping
Alias_ Darren_Duncan: Re: your interest in PPI... 06:27
The one larry is doing is a totally different approach
Larry is doing a code porter
Darren_Duncan I'm here
Alias_ Imagine a B::Deparse that spat out Perl 6
instead of Perl 5
So it only works if you can get the module compiling and loaded
Darren_Duncan Alias_, what do you mean "my interest in PPI"? 06:28
I've never used PPI
Alias_ maybe it was gaals
colabti.de/irclogger/irclogger_log/...5,Tue#l391
Darren_Duncan true, I am doing a project to parse and rebuild SQL
there is some conceptual overlap, but SQL is a lot simpler 06:29
... than Perl
checking log ...
anyway, I'm aware that Larry is hacking Perl 5 itself to remember all the whitespace etc so it spits out identical perl 5 first, and then equivalent perl 6 next, rather than using PPI 06:30
nothingmuch Alias_: your ppi demo says: Can't locate object method "_commit" via package "PPI::Token::Word" ... at /usr/local/share/perl/5.6.1/PPI/Token/Whitespace.pm line 75
Alias_ erk.. it's probably not ported up to the current version. There's been some API changes 06:31
The demo is very ad-hoc...
I keep meaning to do an Ajax one
Type into some field, parsed version appears in other panel
nothingmuch spunky
oh my, harrorth is 12,000 words 06:32
Darren_Duncan Alias_ - yes, I mentioned PPI on March 15th because I heard about it being used to help with porting, and read an item on Perl Foundation towards funding that, but I had no further involvement besides the cursory knowledge
Alias_ yeah, never mind
:)
Darren_Duncan anyway, I'm doing a large re-implement of Rosetta, fixing some design flaws in my previous version, so it should actually be useable to do reall work in a week or so 06:33
this all in Perl 5 right now
Alias_ really?
wow
QtPlatypus What is Rosetta?
Alias_ A sort of SQL generation/abstraction thingy
Darren_Duncan Rosetta is a framework to let applications run seamlessly on multiple database products
Alias_ A little wordy at times, but very "correct"
I've been_too_scared_because_of_the_giant_method_names :) 06:34
Darren_Duncan bringing to databases what Java etc does with apps, "write once, run anywhere"
DBI doesn't do this by itself
it goes part way
Alias_ DBI is a connector...
Darren_Duncan yes
Alias_ Has the XML beurocracy invented XSQL yet? 06:35
Darren_Duncan DBI makes the pipes to the databases look the same ... Rosetta makes the databases themselves look the same
Alias_ How does it handle sequences?
(meaning to ask for a while now)
Darren_Duncan I've heard of XSQL but think it never went anywhere
jql XQuery
also, WebDAV has a SQL syntax in XML as well
Alias_ My abstraction layer currently does emulated sequences for MySQL
But for other database, it gets painful
Darren_Duncan Rosetta will use the database's built-in sequences if they have them, and in some cases emulate them when not 06:36
Rosetta generally uses a database's built-in features where all possible, and emulates only when they lack native support 06:37
unlike many other wrappers that just emulate for all dbs, treating all like least common denominator
Alias_ I agree
I do the same, it's definitely better
Darren_Duncan sometimes I even get the db itself to emulate a missing feature
Alias_ I'd love to write a Rosetta backend some time 06:38
Darren_Duncan eg, a database without native UNION support can still do all the work with a specially crafted JOIN using a temporary table
Alias_ Just to see how comparably fast/bloaty it would be
Darren_Duncan you should get your chance by the end of June
Alias_ And I'll find the time by the end of the year... maybe
:)
Darren_Duncan Rosetta will generate actual UNION sql for a conceptual union when supported, and generate JOIN sql in other cases 06:39
Alias_ What databases ATM?
Darren_Duncan define 'ATM'
Alias_ only needs Postgres/MySQL/ORacle
At the moment
Darren_Duncan MySQL 4.0+ has unions, 3.x doesn't, but support joins
Alias_ What databases does Rosetta support
Darren_Duncan all of them 06:40
Alias_ what do you mean, "all"
Darren_Duncan more specifically, Rosetta is extensible ala DBI
you can add support for more with plugins
Alias_ For example, does it support SQLite, and emulate sequences properly
Darren_Duncan SQLite is the very first db it will support, MySQL second
Alias_ Because as far as I was aware, that can't be done
Darren_Duncan SQLite has built-in sequences of a sort 06:41
Alias_ no it does
doesn't
It has post-insert ids
Which are the ugliest hack MySQL ever did
Darren_Duncan if you define an integer primary key and don't give it an explicit value, it will be set from a sequence automatically 06:42
in SQLite
Alias_ No it doesn't
It uses default max(id) + 1
A sequence is something you can pull a number from, so that you can set the id BEFORE you INSERT
Darren_Duncan I'll have to look that up ... 06:43
Alias_ auto_increment is merely one use for sequences
For example...
Darren_Duncan I think the behaviour changed between 2.x and 3.x
Alias_ Say I have three records that point to each other in a circular relation
a -> b, b -> c, c -> d
er...
c -> a
With sequences, you can pull three ids, set the values appropriate, disable constraints, insert the three, then enable constratints again 06:44
assuming "not null" and "references"
Darren_Duncan does a standard relational database model let you have circular references?
Alias_ of course it does
update table set value = id; 06:45
self-referential, the lot
Darren_Duncan in any event, I'm focusing early on in using features a database supports natively, and being light on the emulation ... I can do heavier emulation work later
Alias_ DBIx::MySQLSequence
Darren_Duncan corresponding to this, early on I recommend using the newest versions of various products 06:46
Alias_ So Rosetta doesn't support "select sequence.nextval"
Darren_Duncan the main goal of Rosetta is that everything looks the same to the user regardless of how it's implemented
Alias_ ?
right
And are you saying that Rosetta doesn't support sequences 06:47
Darren_Duncan Alias_ ; Rosetta does support what you mention
Alias_ how does it work in SQLite?
Darren_Duncan to clarify, I mainly focus on being able to define what I want, and worry on implementation as a separate problem
Rosetta lets you define the sequence.nextval right now 06:48
Alias_ But you have a SQLite backend working right now?
Darren_Duncan note that the syntax you give is Oracle specific ...
Alias_ Darren_Duncan, sure it's oracle specific... if you have an equivalent I mean that too :)
Darren_Duncan no back ends are wroking now, I'm still building the thing
Alias_ oh ok
Sorry if I sound narcy. It's just that sequences are both one of my pet peeves, and extroidinarily valuable and important to me database implementation 06:49
Darren_Duncan the ANSI standard says "select next value from mysequence" or something like that
Alias_ s/me/my/
Darren_Duncan looking ...
Alias_ As long as Rosetta can support "can retrieve a value from a sequence without it being a part of some other insert statement"
In my terms, it's AppSpace::DB::Sequence->new('sequence_name')->next_val 06:50
Darren_Duncan fyi, look at search.cpan.org/src/DUNCAND/SQL-Rou...Builder.pm ...
under the function build_expr_seq_next()
that function generates both ANSI syntax and Oracle syntax 06:51
ANSI is 'NEXT VALUE FOR my_sequence' 06:52
see also build_schema_sequence_create() that generates a CREATE SEQUENCE statement with all/most the options in the SQL:2003 spec 06:53
Rosetta lets you read from a sequence nearly anywhere; eg, in a SELECT, I/U/D, and in a CREATE TABLE ... DEFAULT NEXT VALUE FOR my_sequence 06:55
Alias_ right. That's fine 06:56
It's just that there are two underlying methods of generating row ids
One is a sequence for which you can fetch the id early if you need to, before the insert
Darren_Duncan now, the SQL generator only helps here when the database natively supports sequences
Alias_ The other is to blind-insert the rows, and ask the server what id it used after the event
Darren_Duncan when it doesn't, that'll be trickier 06:57
Alias_ And the latter is very very nasty, because there's a number of situation in which it screws up things.
And there's a number of algorithms you simply can't do at all without the ability to get the ids first
Darren_Duncan don't transactions and locking help with that?
Alias_ That previous case of the circular relationship is an example 06:58
a trivial one
if you have ids before the insert, you just pull a bunch and insert as normal
Darren_Duncan I'd probably do it that way
Alias_ Without them, you have to actually know the structure of the data and insert everything in a very specific order
So that you don't break anything 06:59
Now imagine an "arbitrarily complex schema"
Where you don't know the schema structure in advance
For example.
Darren_Duncan can one not just scan the database?
Alias_ Can you imagine how complex the algorithm for doing the link traversal and ordering would be 07:00
Darren_Duncan doing it within a transaction should keep it reliable
Alias_ It's both NP-complete, and nasty
And you have to violate not-null constraints
I have an algorithm that lets you take the contents of one database, and dump it into another database with the same schema
Darren_Duncan yes
Alias_ And the ids of the data will NEVER clash 07:01
No matter how complex the data is
Darren_Duncan why should they if they didn't clash in the original db?
Alias_ Because the existing data in the other database is using the same ids
Darren_Duncan ah, so the target db wasn't empty first
Alias_ right
Darren_Duncan that's not a pure copy then 07:02
Alias_ sure it is
Darren_Duncan because you potentially changed the data
Alias_ no I didn't
Darren_Duncan an id is part of the data, isn't it?
Alias_ nope
It's metadata
Darren_Duncan fine
I was speaking broadly
Alias_ unless you use it outside of the system
in the general sense yes
But this you can also do things like cloning data
this means 07:03
Darren_Duncan but I do agree that primary keys should never be descriptive or meaningful, simply distinct
Alias_ Take a "user" in a database, with all it's setting and preferences and data, and make another one the same
No matter how complex the schema
In a post-insert id scenario, the code to do this is case-specific 07:04
schema-specific rather
Darren_Duncan how expensive is it to always read the ids pre-insert?
Alias_ Well, under Oracle it caches
The client actually fetches 20 at a time
which is one statement on the server 07:05
Darren_Duncan then your app can keep a map of old-to-new and just translate as it copies data over with a plain lookup
Alias_ update sequences set currval = currval + 20;
right
You build the id mapping in advance, and then just do a plain copy in any order you like
Darren_Duncan sure
Alias_ You turn off reference constraints in the transaction
But you can't do that if you only get the ids AFTER you insert :) 07:06
Darren_Duncan probably better actually, when dealing with circular data
QtPlatypus BTW is there any diffrence between the enviroment that :e runs in and the pugs command line?
Alias_ And _that_ is the big problem with MySQL
MySQL has no way to get ids before you insert
Darren_Duncan FYI, Rosetta is actually geared towards use with more powerful databases ...
Alias_ I noticed :)
And I'm glad
Darren_Duncan its main help is when each db does things in different ways 07:07
Alias_ SQLite is a bitch though
which is a pitty
Darren_Duncan since many powerful features start off as proprietary extensions
Alias_ The big problem with sequences for SQLite, is that sequence operations MUST happen outside of transactions
Darren_Duncan I really like SQLite
Alias_ They are ALWAYS global
and immediate
With SQLite, transactions are simple file locks 07:08
Darren_Duncan that said, in my own apps I never really use sequences anywhere except to generate primary keys
so it doesn't bother me
Alias_ So if you tried to pull a sequence (even emulated) from inside a transaction, you get a dependency lock
Darren_Duncan how do you get a dependency lock?
Alias_ You can't update the sequence number because you are in a transaction, and you need to update the sequence number to get data for inside the transaction 07:09
Darren_Duncan FYI, I'm on the sqlite ml and have been looking at it closely
Alias_ Because (I _think_) SQLite does transaction locks based on locking the file?
Darren_Duncan I don't know why doing anything with sequences would require it to be done outside a transaction
Alias_ Imagine you have two transactions 07:10
Darren_Duncan a sequence is conceptually like a one-row, one-col table
Alias_ And they both want a sequence number
Darren_Duncan and you keep updating its value
Alias_ The sequence must ALWAYS hand out a number that is unique
Darren_Duncan yes
Alias_ Let me put it this way 07:11
Darren_Duncan so, at worst one transaction would block until the other completes ... thats not a deadlock
Alias_ Having issued number 123, it should never ever rollback
What if I need that id in the transaction
the one we have to wait to complete until the sequence alteration can proceed 07:12
transaction waits to get a sequence number, sequence waits for the transaction
deadlock
wilx Huh?
Darren_Duncan FYI, assuming I can get to OSCON this year, one of my tutorials is the inner workings of SQLite by its creator
Alias_ really?
Anyways 07:13
Darren_Duncan since a sequence read would alter the sequence, I would expect it to block there before returning a sequence value
Alias_ right
wilx Hmm, imho nobody says that you have to be able to rollback the sequence with the transaction that you use...
Alias_ and the thing you are blocking to wait for is what needs the sequence
hmm? 07:14
sequences don't rollback
crysflame Alias: does threatnet run under pugs?
Alias_ it's their fundamental properly
In fact, strictly speaking sequences don't have to issue ids in order either
wilx Yup, so why should the sequence get wait for anything?
Alias_ They simply MUST be globally unique
Darren_Duncan as I recall, sequences simply have to dish out unique values
Alias_, part of a sequence definition will say whether being in order is mandatory or not 07:15
Alias_ wilx: Because under SQLite, a transactions are done using file locking
It's a SQLite-specific issue
wilx Oh.
I see.
Alias_ DBIx::MySQLSequence works really really well
Darren_Duncan or actually, I think the 'ORDER' / 'NO ORDER' attribute isn't in SQL:2003, but Oracle
Alias_ It's only under SQLite that it becomes a problem
crysflame: I have no idea :)
Does POE work under pugs? 07:16
Darren_Duncan anyway, love to chat but I have to get to bed now
crysflame does the actual value of the id matter outside of a specific time window?
if not, then you can guarantee that the id won't conflict for the duration
Alias_ crysflame: Because I might be using that id somewhere else for a while, and then want to insert it later
crysflame and then change it when done if it's a duplicate
Darren_Duncan lets talk more later when I have something implemented and we want to get it working for whatever your needs are
crysflame so promise to remember the search for the record instead
Alias_ the what?
what record
crysflame hmmm 07:17
you're linking to a specific row number by the autonumber row
Darren_Duncan remind me though, because I may not remember it was you specifically that was interested in sequences
Alias_ crysflame: What row... 07:18
it might not exist yet
Darren_Duncan good night
Alias_ the database gave my an id to use at any time in the future I wish
me
crysflame are you storing it outside of perl?
Alias_ quite possibly
I might give it to some other process/company to remember me by later
crysflame so i think that when you write to the database if the id you got is already taken and you're saying 'new record' then it should say "ok but here's the id i used instead, update your side and we're good" 07:19
Alias_ update my side?
I had that id sent to a printer to permanently log something
crysflame when you're creating the object, you can adjust it before you return the new object.
Alias_ and it was sent by email to my grandmother so she could type in a URL to get my e-card
crysflame you should have adjusted it based on the autonumber returned from mysql 07:20
by that point
Alias_ I should alter the paper printout and the email that was sent to my grandma
I haven't inserted the record yet
I don't know it's not usable yet. The sequence told me it was 07:21
crysflame oh. you're depending on ids to be unique without cross-referencing against a central source
Alias_ the sequence is the central source
That's what sequences do. That's all they do
They issue unique numbers
QtPlatypus perlbot: nopost 08:09
?perlbot nopost 08:10
gaal perlbot nopaste 08:13
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
QtPlatypus Thanks Gaal
nothingmuch it's also in the chat topic, btew 08:16
pasteling "qtplatypus" at 202.7.69.25 pasted "Possable :e bug" (7 lines, 228B) at sial.org/pbot/10968 08:24
QtPlatypus Could someone look at that and check that I'm not doing something obvicely wrong? 08:25
autrijus QtPlatypus: nope, genuine bug 08:26
gaal morning autrijus :)
autrijus heya. 08:27
ooh server's back
gaal i've gotten all confused again with local, after i thought i'd tamed it :(
QtPlatypus nods ":e doesn't play well with postfix functions?"
Also I've noticed that Use module; Only works for the line that its on. 08:28
gaal i want to simply build a finite callchain list, [ (Env, VCode) ]
but this expression gives a type error:
val <- local (const caller) (readVar "&?SUB")
it "expects [] 08:29
for some reason.
i got this to work at some point but i lost it:( 08:30
spelling that .... (return $ readVar "&?SUB") doesn't work either. 08:31
autrijus yo 08:38
[] is a monad
if you used one <- too many then it's possible it will put [] around the expected type
gaal so.... val = local ... ? 08:39
no that's a parse error. :( 08:40
autrijus er.
what do you expect val to be?
val <- readVar "&?SUB" 08:41
gaal the vcode sub.
autrijus does it work?
local() doesn't modify the type
gaal well, i want it from the caller context.
autrijus right, but still, first test the typechecker 08:42
gaal !? it gives the same error! 08:43
autrijus so there you go
first fix that :)
pasteling "gaal" at 192.115.25.249 pasted "callChain attempt" (9 lines, 405B) at sial.org/pbot/10969
gaal :))
wilx Huh. 08:45
Missing let?
gaal but! the code that already is in svn does do val <- ...
wilx, nope, it's supposed to be <-
my paste error
and the code that's in svn works :)
nothingmuch autrijus: nopasting 50% of chapter 8 08:47
+ new AST + new Eval (untested)
Parsec will go 08:48
List.words will stay
(what a swell name, eh?)
pasteling "nothingmuch" at 212.143.91.217 pasted "chapter 8" (67 lines, 2.5K) at sial.org/pbot/10970
"nothingmuch" at 212.143.91.217 pasted "new eval" (104 lines, 2.7K) at sial.org/pbot/10971 08:49
nothingmuch I'm really proud of the new evaluator code
gaal (var :: Val) <- readVar "&?SUB" doesn't work either. this makes no sense 08:50
<- readVar is used all over the place 08:51
autrijus oh wow! 09:01
callChain :: Env -> [(Env, VCode)]
you're in the wrong monad, sir
callChain :: Env -> Eval [(Env, VCode)]
is the way to go
Env -> [a]
is in the list monad
that yields a
Env -> Eval [a]
is in the Eval monad 09:02
that yields [a]
very different
gaal aha!
okay: but then, how to i use the result of this computation like a pipe with filters?
is Eval [a] also a list? 09:03
so can i.... filter f callChain
or maybe i need something like
liftM filter f callChain
?
autrijus filterM.
filterM :: Monad m => (a -> m Bool) -> [a] -> m [a] 09:04
gaal murk murk murks
autrijus so something like
filteredFoo <- filterM condM =<< callChain
condM being something that is
(Env, VCode) -> Eval Bool
if you don't need Eval in the cond
then 09:05
filteredFoo <- fmap (filter cond) callChain
will do.
chip autrijus! are you locked in again? 09:09
gaal taking a break... 09:17
nothingmuch seen ingy 09:20
jabbot nothingmuch: ingy was seen 3 days 1 hours 42 minutes 35 seconds ago
nothingmuch damn 09:21
anybody know how to convert kwid to x without resorting to spork?
autrijus nothingmuch: wonderful work
nothingmuch: why not just make doExp of Prim "id" ? 09:22
nothingmuch any suggestions for the evaluator code?
autrijus why duplicate two interpret?
nothingmuch Prim "id"?
autrijus doExp (Prim prim) = prim
nothingmuch oh 09:23
puuurdy 09:24
because I did interpret on Prims before i remembered . and .s were Eval monadic
so they were initially pure
and it looked like this:
interpret ((Prim f):exps) = funInterpret f exps
which I thought was really cool
hola lightstep 09:26
backlog to nopaste, i think you might like it
autrijus nothingmuch: so. 09:28
nothingmuch: I'll work on AST for PIR
today
and then use harrorth to do the metacomputational monad thing 09:29
targetting PAST
or rather PugsAST
which is a way to say we compile forth to perl6
then compile perl6 to pir
integral this "metacomputational monad" is for generating bytecode, or is it for generating bits of bytecode for an embedded interpreter? 09:30
autrijus that's my plan at least
nothingmuch not yet!
i think i'm not up to it
autrijus integral: it's about separating compile time computation
integral: with runtime computation
integral hmm
autrijus integral: by having the Compiler monad yield something else that can be run in the Runtime monad
lightstep nitpick: you have bad syntax on the `data Exp' declaration (it should be Prim Prim instead of Prim)
autrijus integral: the yielding itself is polymorphic over the underlying Runtime 09:31
nothingmuch lightstep: right
integral autrijus: hmm, so Compiler is a monad transformer applied to Runtime?
autrijus compile :: ParseTree -> Compile (Runtime Val)
interpret :: Runtime Val -> Eval Val
integral hmm, but Runtime is a monad? 09:32
autrijus yes.
lightstep this type means that `compile' compiles to a runnable thing
autrijus yes.
lightstep (a -> Compile b) means "compiles a to b" 09:33
autrijus yes.
that's the basic idea.
lightstep that's why arrows are better
integral hmm, but being a monad you have these bits of haskell code inbetween each bit of bytecode?
integral can see how you can do bytecode with arrows, but not monads
autrijus integral: !. how do I do it with arrows?
integral: btw, "Metacomputation-based Compiler Architecture". 09:34
www.cse.ogi.edu/PacSoft/publicatio...cfinal.pdf
integral is that a paper?
autrijus aye
integral goes to read
Nattfodd hi 09:35
autrijus hi nothingmuch
er.
Nattfodd autrijus: I was in fpw and there was a question we forgot to ask you
autrijus hi Nattfodd
lightstep nothingmuch, i really really do think that using Reader complicates your code
nothingmuch hi autrijus ;-)
lightstep but that's just me, it might be wrong 09:36
nothingmuch lightstep: i'll deal with it soon
Nattfodd autrijus: you said that you had a working interpreter in 6 days
did you rest on the seventh ?
nothingmuch i like it's elegance now, and the fact i'm grokking it
lightstep since being a Reader adds capabilities, but i don't see why they're needed. and you seem to treat it like State anyway
autrijus Nattfodd: " As a mere mortal, on Day 7 I did not rest. Instead I worked out the Scalar/List context propagation rule" 09:37
nothingmuch what I'm afraid of is that I will get lost in the details of state vs. reader, etc etc etc
i would rather work on getting actual forth working
autrijus # use.perl.org/~autrijus/journal/23074
nothingmuch and then go back and refactor
autrijus lightstep: I thought Reader is a restricted State!
nothingmuch instead of the opposite order
Nattfodd hum 09:38
lightstep autrijus, it is. that's why the guarentees are stronger
autrijus lightstep: anyway, I found Reader much less error prone
lightstep aka more capabilities (like not allowing side effects allows you to invent STM(
autrijus for my own code (which is why I suggested it to nothingmuch) 09:39
since you had to use IORef for mutable storage
instead of being deluded into thinking that the State is somehow IORef
but maybe it's just me :)
(I agree that State is far easier to understand and use.) 09:40
lightstep when using `local' only on the last action in a monadic block, and using it on all the last actions in monadic blocks, you're emulating state
autrijus lightstep: right, but I did not know that forth has no lexicalness 09:41
(and I'm still not sure it does not)
lightstep reader is for dynamic scope
lumi I think it does 09:42
autrijus lightstep: oh?
lightstep: local (\e -> { envLexical = newLex }) ...
nothingmuch type Prim = \x -> x does not parse
autrijus is how pugs does lexical scope
nothingmuch what did I mean?
lightstep which is incidentally the way you pass an environment reference in a lexically scoped language
autrijus nothingmuch: type Prim = (a -> a)
type Prim = (a -> Eval a)
lightstep nothingmuch, throw the \
autrijus one of the two
nothingmuch oh
right
Aankhen`` Argh.
autrijus lightstep: ah. right. understood.
Aankhen`` Remind me to use `svn commit -N`. 09:43
autrijus Aankhen``: use `svn commit -N`!
Aankhen`` Oh right! That's what I needed to do!
Thanks. :-D
nothingmuch bah 09:44
lightstep nothingmuch, i also suspect a primitive isn't a general polymorphic transformation, but an interpreter action
for example, prim "." = <some monadic block> 09:45
nothingmuch you are correct
right
Aankhen`` Strange... 09:48
Makefile.PL appears to be capable of removing src\gen_prelude.exe, but it doesn't.
ingy hola 09:51
Aankhen`` It's even in the generated Makefile... 09:52
integral hmm, the paper seems to talk about "Code is generate via type-directed partial evaluation" 09:53
I think that's the thing that's worrying me about the Dynam monad 09:54
Aankhen`` Hi iblech.
iblech Hi
nothingmuch can functions be in class Show? 09:55
integral there's a bit of code that looks like this: (inAddr 0 C[[e]]) >>= \phi_c -> return (phi_c >>= \i -> updateSto([Acc => i])) 09:56
svnbot6 r4544, iblech++ | Macros. 09:57
r4544, iblech++ | * t/macros/ -- unSKIP and more tests
r4544, iblech++ | * Pugs.Eval.Var -- New module containing findVar & co.
r4544, iblech++ | * Pugs.Prim.Param -- New module containing foldParam
r4544, iblech++ | * Pugs.Prim, Pugs.AST.Internals, Pugs.Eval, Pugs.Prim.List --
r4544, iblech++ | Moved several functions to new Pugs.Eval.Var, Pugs.Prim.Param, and
r4544, iblech++ | Pugs.Prim.List.
r4544, iblech++ | * Pugs.Parser -- Various calls to new fun possiblyApplyMacro.
r4544, iblech++ | * Pugs.Parser.Unsafe -- New fun possiblyApplyMacro.
r4545, Aankhen++ | * added pugs.exe to svn:ignore for /.
r4546, iblech++ | t/ -- open "foo", :w -> open("foo", :w) to work around "&:w not found" errors.
r4546, iblech++ | t/builtins/io/evalfile.t -- Fix test.
Aankhen`` :-o
xerox O_O
Aankhen`` Bleh. 09:58
Right when I'm at the end of my `nmake test`.
iblech :D 09:59
Aankhen`` Ah well, I'll just recompile and not run the tests.
integral inAddr 0 C[[e]] >>= \phi_c -> return (phi_c >>> updateSto Acc) -- removes that pesky i 10:01
(that's the same when that arrow is the Kleisli arrow of Dynam, but it doesn't have to be a Kleisli arrow, it can be something you can introspect (which you can't do with (->) in haskell)) 10:02
svnbot6 r4547, iblech++ | svnbot.p6 -- Hack to keep svnbot from passing a negative number to svn log,
r4547, iblech++ | resulting in svn log not giving us the new log messages (this happened last
r4547, iblech++ | night).
integral (that's not convincing) 10:04
svnbot6 r4548, iblech++ | * t/examples/examples.t -- Fix paths to examples.p6 after my move some days ago.
r4548, iblech++ | * examples/output/ -- Move expected outputs, too.
Aankhen`` Whoa. 10:07
Quad-core processors from AMD in 2007... 10:08
autrijus nothingmuch: yes
nothingmuch: instance Show (a -> b) where show _ = "(->)" 10:09
nothingmuch: or easier just import Text.Show.Function or something
nothingmuch my god
there's a library for everything
chip mumbles (* -> *) -> * 10:15
autrijus chip: er. that's still a->b. 10:16
b itself is a function
but that's fine
everything is unary.
(except for things that are nullary)
chip isn't (*->*)->* the kind(right word?) of that Show? 10:17
er, that show
autrijus no
chip darn
OK
autrijus instance Show (a -> (b -> c)) where ...
is more like it
the * -> * is used only for kinds
not for types 10:18
kinds are types of types.
chip the only way out of Haskell is through it.
integral is now convinced that monads are ok for Compile/Dynam 10:19
svnbot6 r4549, iblech++ | * t/builtins/undef.t -- undef() -> undef (there's no undef() function any more).
r4549, iblech++ | * t/ -- open(">...") -> open("...", :w)
autrijus integral: good :)
paper++ # saves me much much typing
integral I'm just not convinced that that paper is brilliant :-) (Because it uses partial evaluation)
autrijus right. but the idea itself is sound
i.e. composable (meta)reduction rules as monad transformer blocks 10:20
integral yep. You just need to have things of type Dynam Reg rather than Dynam Int like the paper suggests I think
autrijus yup.
exactly.
integral was thrown by thinking w/ arrows you could get away with Int, but you still have that pesky arr function 10:21
lightstep it can be hidden with ^>> and >>^
integral >>^? 10:22
lightstep a >>^ b = a >>> arr b
autrijus ew.
autrijus is strongly reminded of nethack
integral lightstep: but that's still got the problem arr has: 10:23
xerox lightstep, is arr really needed?
integral if you have a b Int, and that Int is produced by the dynamic code, you're still embedding a haskell function in the bytecode
integral thinks yes: (x &&& y) >>> arr (\(a,b) -> (b,a)) 10:24
lightstep you're interpreting. one way to do it is to replace bytecode by haskell code and run 10:25
xerox, it is
xerox, arrows are like dataflow. there is a thread of data that passes every time you use (>>>). (***) and (+++) split it and remerge. all the other manipulation is doen with arr 10:26
integral (/me needs to make himself remember that arrows are for capturing data flow, not hiding the values flowing through them) 10:27
svnbot6 r4550, iblech++ | strings/ord.t -- Refactored all the is(...) calls into a @maps array and added 10:36
r4550, iblech++ | some more tests.
r4551, iblech++ | coro.t -- Fix test, 100% ok now.
r4552, autrijus++ | * add UnicodeC.h in Pugs.Eval.Var to avoid warnings. 10:51
nothingmuch wow! my eval code actually works 10:52
QtPlatypus nothingmuch: Congrats. 10:53
nothingmuch it's very brain zonking 10:54
autrijus: help - i have type Reduction = Eval (Interp -> Interp) 11:04
and Prim Reduction is the type of a Prim
except I want it to be polymorphic
Eval (a -> a) 11:05
jrieks nothingmuch: autrijus is gone to take some more sleep 11:10
svnbot6 r4553, iblech++ | io_redirect_to_scalar.t -- skip_all -> skip_rest
nothingmuch jrieks: thanks 11:11
gaal there's a bug (i think) in autogenerated accessors via "has"
it's a little involved though, i'll nopaste.
pasteling "gaal" at 192.115.25.249 pasted ""has" / intermediate obj problem" (23 lines, 291B) at sial.org/pbot/10972 11:13
gaal also: when you don't use a factory, this doesn' 11:14
t happen.
spinclad autrijus: hw2005, s.7.1: "conditionals and other a statement constructs that does not act":
autrijus: s/ a / /, s/does/do/
gaal also also, putting an intermediate var inside the factory doesn't help either. is this a context problem? 11:15
nothingmuch spinclad: you can edit the file 11:16
spinclad (nits from latest sections)
nothingmuch, thanks, I'll try that 11:17
gaal how do i find the label of a block? (i'm not in the parser) 11:23
chip autrijus just yesterday told me that the full name of multi sub add(Foo a, Foo b) is &add<Foo,Foo>, but in the p6l summary I see it's &add:(Foo,Foo) 11:30
welcome to Perl 6, I guess
gaal beh, the 'has' thing looks like a real bug 11:45
and is blocking caller. 11:46
lightstep nothingmuch, a reduction is a computation that returns a meta-function? and a primitive is an infinite descent of types? 11:51
nothingmuch a primitive is an expression that is just a lambda whose type is Reduction 11:52
but i can't think about that anymore
i need a bit of a break
svnbot6 r4554, gaal++ | spelling fixes 12:03
pasteling "iblech" at 80.81.23.181 pasted "gaal: Patch for gen().x" (24 lines, 835B) at sial.org/pbot/10973 12:17
gaal thanks :) i was just working around the problem in my test code 12:18
Arbeitskopie sounds like an unpleasant surgical procedure. (i know what it really means) 12:20
gaal whews. 12:56
svnbot6 r4555, gaal++ | bring caller up to spec; tests. still missing: "label", misc details 13:05
gaal juerd about? 13:35
QtPlatypus How much work would it be to implement strictness and warnings? 13:50
gaal strictness is on by default 13:52
don't know about warnings.
in fact, there's no way to turn off strictures atm :) 13:53
integral perl6 *is* strict, something which perl5 IMHO should be
chip integral: you miss the psychological lift we get from typing C<use strict> 13:55
QtPlatypus nods "I'll try and replicate some of the situations where I think should have warned or died of strictness."
gaal why, one liners of course. 13:56
QtPlatypus The type system seems to be mostly a place holder. 13:57
gaal is sure to keep a copy of perl5 around for one-liners if p6 doesn't have a convenient 'use loose'.
QtPlatypus Excluding MMD.
integral the type system is *weird* imho :-) Particulary the type variables
nothingmuch wow, what an amazing creature: en.wikipedia.org/wiki/Antarctic_krill
gaal hah! i read that article a few weeks ago too
got to it by random wikilinkage. how'd you get there? 13:58
it's a very nice article, too. :)
QtPlatypus integral: How do you find the type system weird
nothingmuch uh, let me think one second
ah,
i looked up WRT to make sure I knew what it meant 13:59
so i got to the acronyms starting with W page
there I found out that wtf is a... one sec
en.wikipedia.org/wiki/Euphemism
discussion on euphemisms regarding death ensued, at which point I wound up on the Dead Parrot Sketch entry 14:00
integral QtPlatypus: well I can understand specifying the IType of things, and specifying primitive types, and specifying that values in a variable must do certain roles
gaal i think i followed the wikisource logo, which is an iceberg image, and from there to floe, etc.
integral But then I don't really get how types are used for coercion and matching in signatures
nothingmuch now, how did I get from there.... one sec
oh!, i clicked on the Cockatoo link on the bottomm 14:01
from there to the parrot list -> blue & yellow mackaw -> pets -> glofish -> glow genes
eventually en.wikipedia.org/wiki/Bioluminescence 14:02
where the krill is depicted
only 15 more browser tabs to read through
gaal you know, nothinmuch, i'm glad i implemented caller. :-p
QtPlatypus integral: I get the way the signature matching works. Though I'm not sure how it works with co-ersion. I ran into an error from that today.
nothingmuch =D
the problem is that browsing in general is like one big tail call optimization 14:03
and tabbed browsing is like continuations
i would like a browsing metaphor with call stacks and autothreading
integral that's a very good description nothingmuch :-)
QtPlatypus laughs.
gaal all firefox users: be sure to install the Session Saver extension. (as i periodically urge) 14:04
wilx Hmm. 14:05
gaal wilx, integral, other haskellheads - i'd appreciate it if you reviewed my caller patch, which i'm not sure is the prettiest of haskell code (r4555) 14:06
wilx Hehe, you think to high of me :) 14:07
I am nowhere near the level of people like autrijus or other Pugs developers. I just hang around here :)
gaal well, if you do have some input, i'd appreciate it even if yo do just hand around here ;-) 14:08
integral the same of me :)
nothingmuch gaal: i'll take a look soon, if i my head clears up
integral only plays a haskellhead on irc :-P 14:09
gaal i am currently basking in unhaskelled clearheadedness. so take your time. :-)
integral well you appear to have deleted lots of Haskell, that's a good sign :-) 14:10
gaal Carter's Compass, isn 14:13
't that?
chip that's the one that always points at Plains, GA 14:15
q[pdcawley] chip: I just replied to your message about the register allocator and continuations.
I think you're confusing continuations with gotos. 14:16
chip q[pdcawley]: I agree with you, except I'm not confused.
q[pdcawley] Okay. So the problem becomes how to make continuations do the right thing? 14:17
Or am I confused?
chip If you can keep your head when all those about you are losing theirs, you obviously do not understand the situation.
q[pdcawley] Heh. 14:18
svnbot6 r4556, iblech++ | strings/ord.t -- Test chr() too (we shouldn't duplicate @maps to two tests). 14:36
r4557, iblech++ | Remove chr.t and rename ord.t to ord_and_chr.t.
QtPlatypus Is the object returned by caller documented somewhere? 14:47
svnbot6 r4558, iblech++ | Fixed t/subroutines/sub_named_params.t.
gaal QTPlatypus, see src/perl6/Prelude.pm 14:48
for now
it's not finalized, unfortunately.
QtPlatypus nods
q[pdcawley] chip: while I don't wish this descend into 'no, YOU are confused' madness, I'm I afraid I must take this moment to say "No, YOU are confused". 15:00
chip q[pdcawley]: Look. If you have to take this on faith, so be it. But the basic issue is quite simple: Register allocation depends on understanding when you leave an area and will Never Go Back. Continuations mean that every function call is a point to which you can potentially Go Back. This b0rks register allocation. And caller-saves has NOTHING to do with it. Just imagine you're analyzing a machine where NO REGISTERS ARE CALLER-SAVES and the problem is sti 15:02
QtPlatypus You get cut off at "thr problem is sti..." 15:04
chip Just imagine you're analyzing a machine where NO REGISTERS ARE CALLER-SAVES and the problem is still there.
integral The thing I don't get about parrot is how lexicals map to registers
chip *sigh*
q[pdcawley] integral. As you want them to.
integral It seems in your example that you're mapping lexicals to registers without a pad?
chip THE MAIL MESSAGE. READ THE MAIL MESSAGE. 15:05
q[pdcawley] You can write a lexical from/to any register. The $whatever things in the message ARE NOT LEXICALS>
chip The message clearly says that I'm calling them $a and $b for pedagogical purposes, and that those variable names are NOT LEXICALS.
integral right, I get that they're not lexicals
chip Well, then, WTF?
integral err, why is chip shouting at me?
q[pdcawley] chip: So, you're arguing that register allocation should be at a more global level than per function?
chip "<integral> It seems in your example that you're mapping lexicals to registers without a pad?" 15:06
q[pdcawley] If so then, dammit, you're trying to do too much.
chip throws up his hands
integral chip: right, and this is something I've seen quite often in parrot code
q[pdcawley] If register allocation is restricted to being per function with caller saves then I really fail to see where there's a problem.
integral What are the conditions where a HLL compiler can not have a entry in the lexical pad for a lexical and only use a register for it?
chip integral: Please ask about this another time. q[pdcawley] will think my answers apply to his question and nobody will be happy. 15:07
q[pdcawley] And if you're trying to make it more global than that then something will *always* fuck it up.
chip q[pdcawley]: "Bob" dammit, at which point did you think I was doing register allocation outside a single function?
q[pdcawley]: Parrot is not. It won't. It literally can't.
q[pdcawley] Because I'm buggered if I can see how continuations would break it in any other case.
chip q[pdcawley]: Well, then, I suggest you invest in KY jelly, because I can't seem to rescue you. 15:08
q[pdcawley] a continuation returns from a function. The fact that can return from function a to function b doesn't make a damned bit of difference from the point of view of the calling function.
chip the return from the call to &foo does not restore the entire machine state. continuations do not capture the entire register set. perhaps you would like it if they did, and that's an interesting idea, but they don't. 15:10
q[pdcawley] Yes, they restore the registers you care about.
chip Actually, they don't. 15:11
This is the key misunderstanding, apparently.
q[pdcawley] They bloody well should do. Because they're just a return from a function. Which restores the registers you care about.
Not the continuation, the code that runs *after* you take it. Because it's the same as the cleanup from the function return.
chip Well, the register set being as large as it is, that could very well make continuations unacceptably expensive.
q[pdcawley] Which is why you don't save the entire fucking register set in the first place. You only save the ones you care about. 15:12
chip Remember, to understand the situation, you have to remember that we're talking about a hypothetical machine where there are no caller-saves registers. It's P16 we're talking about, not P10.
integral notes that saving a register in the cont. and saving it in the pad have different semantics with multiple invocations
q[pdcawley] You don't save the register, you save its value.
And forget about the bloody pad. 15:13
chip didn't bring it up
q[pdcawley] Sorry, aimed at integral.
integral Why?
Isn't the pad important because all the HLLs use it?
q[pdcawley] Because it's got sod all to do with register allocation in this context. 15:14
chip integral: please stay off my side
q[pdcawley] Chip: I understand that you're arguing for this hypothetical thing, but continuations don't work without caller saves. 15:15
Or they become monstrously more painful.
chip I see. 15:16
q[pdcawley] Sorry, monologuing.
chip q[pdcawley]: Let me be clear on the terminology.
q[pdcawley]: Parrot 0.2 has volatile and non-volatile registers, with regard to function calls. 15:17
q[pdcawley] Even at the pasm level?
chip q[pdcawley]: this is the architecture. in my message, $a and $b are simply symbolic names for non-volatile registers. Taking a continuation does not save them.
q[pdcawley]: especially at the pasm level. P0-15 are volatile - subroutine can trash them. P16-31 are non-volatile - subroutine cannot trash them. 15:18
q[pdcawley] Because if that's the architecture now, it's abig change from the design.
WTF?
chip I'm describing the ACTUAL arch, not a change.
q[pdcawley] When did that change
chip This is the way things already are.
q[pdcawley] Because as designed, everythings volatile but 16-31 are safe by convention.
At the PS 15:19
At the pasm level, to make a function call you should save everything you care about in P16-31, make the call, and restore everything after the return. 15:20
If Parrot is doing that for you at the PASM level, then it's not working as Dan specced it, and no wonder there's a bloody problem.
They should not be privileged at the machine level. 15:21
chip I am experiencing a phenomenon in which I say I like sandwiches and I'm told that it's a bad idea to eat rocks.
chip wonders if he is silently being filtered through a double babelfish
q[pdcawley] chip: Which is all very well to say, but doesn't exactly clarify anything. 15:23
chip On the other hand, I appreciate that you've caused me to reevaluate the design decision on how continuations work. It's possible that saving the non-volatile registers in the continuation data structure (P16-P31), and restoring them when the continuation is taken, will solve the problem.
svnbot6 r4559, iblech++ | while.t -- Add tests for "while ... -> $x {...}".
chip The only question is whether this is the Right thing, or only Apparently Right But Actually Evil.
q[pdcawley] chip: Talk to Dan. But from conversations I've had with him, I think that's how he intended things to work. 15:24
My understanding is that continuations have never actually been implemented completely correctly in Parrot.
If you have continuations, you have no stack. Anything you need to get back after you return from a function should be accessible from the continuations. 15:25
15:27 wolv is now known as wolverian 15:34 chip____ is now known as chip
chip q[pdcawley]: I've pondered it, and there seems to be an unsolvable problem with the plan to save and restore registers: It is impossible to save and restore S and P registers. 15:35
Leaving S aside, because the S problem is tractable if it were all we had to worry about, P is deadly. 15:36
q[pdcawley] You save a pointer to the PMC, and then when you restore, you reset the register to point back to the same PMC. How is this impossible?
chip Restoring a P register per se is just setting a pointer. If the thing you're pointing at has changed state, you have failed to go back in time.
The PMC has state and the state has changed. You're not back to status quo ante.
q[pdcawley] But you don't want to go back in time. If you can't cahnge the state of the PMCs then you end up in loops.
That's the entire bloody point. 15:37
Sorry.
chip No problem.
q[pdcawley] Of course PMCs have state and that state changes. But that's fine. So long as you get the same PMC back, the fact that its state has changed is actually a good thing. 15:38
15:38 gaal_ is now known as gaal
q[pdcawley] Smae goes for the pad. You get back the same pad frame, but the things it points to may have changed, and again, that's fine. 15:38
I'm not sure wehre it is in the parrot tree, but have you had a look at the implementation of 'choose' I posted a year or so back? 15:39
chip Are you sure you're not going to overload me? I'm stretching a bit now.
q[pdcawley] Sorry. Continuations really mess with your head. Then you'll 'get' them and I'll be making sense. 15:40
integral q[pdcawley]: can I ask a question?
q[pdcawley] If you've got the time, the chapter on the explicit control machine in SICP, for all it barely mentions continuations, is excellent. 15:41
integral: Sorry, didn't mean to monopolise, go ahead.
integral In some highlevel code I've got { my int $a; }, so I've got a lexical $a, and for speed it can be manipulated in a I register, is that right so far? 15:42
15:42 clkao_ is now known as clkao
q[pdcawley] Yes. 15:42
integral now over a function call, if I leave it in the I var in such a way it gets saved and restored, it will always get the same value back when the continuation is invoked
q[pdcawley] Yes. But how do you know the called function won't monkey with CALLER::MY? 15:43
integral That's what I was going to ask :-)
chip q[pdcawley]: playing with %MY:: voids your warranty.
q[pdcawley] For safety you're going to have to write it back into the lexical before the function call.
integral The different semantics between I-var saving over a cont, and lexical saving, means I always need to put values from variables back into the pad
ok, so if I always need to put things back in the pad, when is saving the registers useful? 15:44
q[pdcawley] When the things in the register aren't HLL things.
chip expand "HLL things"?
integral hmm, I can't think of when that is?
q[pdcawley] Or when they're pointer things.
Well, if you've taken something out of a pad, created a new PMC that *isn't* in the pad, you need to save and restore it over the function call. 15:45
integral hmm, but a pad entry for a PMC thingie could change which PMC is used, couldn't it?
chip S and P registers are all pointer things.
so I'm even more confused now.
svnbot6 r4560, sri++ | Fixed File::Find debug output
integral oh, like intermediate values in $a = foo($b) + bar($c) + baz($d) ?
q[pdcawley] Yeah.
integral ok, that makes sense now :-) 15:46
q[pdcawley] Also, there may not be a strong mapping between HLL functions and PASM functions.,
You only need to worry about stashing lexicals when your PASM function is equivalent to an HLL function. I think.
integral err, pasm doesn't have "functions" since it's all CPS...
autrijus hm, like one HLL function may actually be 1,024 PASM functions?
chip q[pdcawley]: What you're describing is a situation where no P register is usable across any HLL function call boundary. 15:47
q[pdcawley] integral: Yeah, but we tend to think of them as functions.
integral personally goes "ewww" at that ;-)
q[pdcawley] chip: Nope, only the value registers (I)
I think. 15:48
Caller::MY is really scary.
chip q[pdcawley]: Like I said, voids the warranty. Don't worry about it, ever.
integral why is it scary?
q[pdcawley] Then I don't think you need to worry about rewriting to the Pad before and after function calls.
integral It can only be used in situations where everything's been written back to the pad from tempories surely?
q[pdcawley] integral: Because you need to keep the state of the pad up to date at all times. 15:49
integral: With pointer types, you tend not to have to worry.
chip q[pdcawley]: you seem to be assuming that the only thing worth restoring in the P registers is shadowed copies of what's in %MY:: and other user-visible storage, or else you wouldn't be fixating on %MY:: so much. 15:50
q[pdcawley]: it could be something as user-invisible as the result of a hoisted common subexpressin.
q[pdcawley] chip: No. I'm assuming that if the P register shadows what's in %MY you might be find that the thing got *replaced* during a function call, so you can't assume that what you *thought* was a shadowed copy of %MY is still one after any function return. 15:51
chip: The user invisible stuff still needs to get saved on the continuation.
So if you have some register P1 that was initialised with the contents of a variable from the pad, then you probably need to write it back to and from the pad around any function call. 15:52
Ignore that. Typing without enough thinking.
Dunno the answer.
integral so $a = foo($b) + bar($c) should translate to something like: P1 = lex_get("b"); P2 = make_cont(L1); call P2, foo(P1); L1: P1 = arg(0); P2 = lex_get("c"); P3 = make_cont(L2, saving => P1); call P3 bar(P2); L2: P2 = arg(0); P3 = add P1, P2; lex_save "a", P3 ? 15:54
q[pdcawley] integral: I don't know. Need to think.
Or chip does :) 15:55
autrijus is with leo and chip in the same room now 16:00
clkao happy?
autrijus sort of
finally slept enough
clkao blue-sugar-ed ?
nothingmuch huraah
autrijus to recover the clock speed
so my agenda for tonight
:
fix chained comparison 16:01
fix other showstoppers to Pugs release
enter preflight
may or may not have time to finish release tonight
but that's okay
so feel free to let me know which tests are important to you and must not be :todo<bug>'ed
clkao autrijus: there's something very weird when using GD--Perl5
i wrote something to combine map images 16:02
16:02 AtnNn_ is now known as AtnNn
autrijus ok? 16:03
clkao somehow i have to do my $final = eval_perl5("GD::Image->new({ $want.w }/10, { $want.h }/10, 1)"); 16:04
nothingmuch seen gaal 16:08
jabbot nothingmuch: gaal was seen 1 hours 19 minutes 57 seconds ago
svnbot6 r4561, iblech++ | * Pugs.Prim -- Made lvalue substr work.
r4561, iblech++ | * substr.t -- unTODOed and unEVALed some tests and added new ones.
gaal autrijus, there's the 'has'-accessor bug which would be nice if it were fixed, as without it caller is clunky to use. 16:13
QtPlatypus How does the bug present itself (I'm trying to fiddel around with caller and I'm wondering if I'm getting effected by it) 16:15
gaal Qt: you have to assign caller's return value to a temp var before using it.
ie caller.subname -> gives error 16:16
my $c = caller; $c.subname -> ok
QtPlatypus nods "Thats exactly the problem I'm having"
gaal hmm, sorry i didn't spell it out earlier :-(
QtPlatypus No problem gaal++ for explaining it to me. 16:17
gaal btw, caller in list context should eventually work rather similarly to p5's caller -- but it's not there yet. 16:18
look at t/builtins/caller.t for things that do work
i hope the Sub / Method chain isn't too confusing - took me a while to figure out what Larry meant 16:19
q[pdcawley] seen Juerd
jabbot q[pdcawley]: Juerd was seen 2 days 19 hours 18 minutes 33 seconds ago
QtPlatypus BTW what does "is safe" and "is primitive" do? 16:20
gaal Qt: 'is safe' means you can call it in safe mode (see: lib/pugs/run.pod)
QtPlatypus nods. 16:21
gaal 'is primitive' means (a) it runs from the perspective of the caller; (b) you can't use "return" in it and (c) some parrot magic which i don't know :)
both are not for general use.
QtPlatypus nods.
Aankhen`` ?eval class Foo { sub bar () { } } 16:30
evalbot6 undef
Aankhen`` ?eval class Foo { sub bar () { 1 } }
evalbot6 undef
Aankhen`` ?eval class Foo { sub bar () { 1 } }; Foo::bar(); 16:31
evalbot6 1
Aankhen`` ?eval class Foo { sub bar () { 42 } }; Foo::bar();
evalbot6 42
Aankhen`` ?eval class Foo { sub bar () is export { 42 } }; Foo::bar();
evalbot6 42
Aankhen`` ?eval class Foo { sub bar () is export { 42 } }; use Foo; bar();
evalbot6 pugs: *** No compatible subroutine found: "&use" at -e line 4, column 5-101
Aankhen`` $#@!
gaal eval class Foo { sub bar () is export { 42 } }; bar() 16:32
?eval class Foo { sub bar () is export { 42 } }; bar()
evalbot6 42
gaal A: you don't need to use. 16:33
Aankhen`` I see that now, heh.
?eval module Foo { sub foo () is export { 42 } }; foo();
evalbot6 42
Aankhen`` ?eval class Foo { method bar () is export { 42 } }; bar();
evalbot6 Error: No compatible subroutine found: "&bar"
Aankhen`` ?eval class Foo { method bar () is export { 42 } }; bar(Foo); 16:34
evalbot6 Error: Wrong number of invocant parameters: 0 actual, 1 expected
Aankhen`` ?eval class Foo { method bar () is export { 42 } }; bar(Foo: );
evalbot6 Error: unexpected ":" or "b" expecting ";", statements or end of input Only one invocant allowed
Aankhen`` ?eval class Foo { method bar () is export { 42 } }; Foo.bar();
evalbot6 42
Aankhen`` Aaand I'm back to square one.
Ah well.
It happens.
pugs: *** Can't locate Foo.pm in @INC (@INC contains: 16:35
Shouldn't that be @*INC now?
gaal i agree that this looks like a bug, but do you *need* exported methods?
Aankhen`` gaal >> I was just messing around and wondering about how class methods interact with C<is export>. :-) 16:36
gaal yes, it should. though @INC oughta work as well unless someone was being cute.
well, in p5 that's one way you can do mixins
iblech Aankhen``: Right, it was just the error message which was wrong (fixed)
gaal it's not useless, just... weird
Aankhen`` iblech >> Regarding methods with C<is export>? 16:37
iblech Aankhen``: Regarding @*INC
Aankhen`` iblech >> Ah, okay.
gaal iblech++; # speed demon
Aankhen`` iblech++
gaal >> I figure exported methods might come in handy if they can act as either static or virtual methods -- you could offer both a functional and an object-oriented style of programming. 16:38
iblech 7away
svnbot6 r4562, iblech++ | Pugs.Prim.Eval -- @INC -> @*INC, thanks to Aankhen``++ for noticing.
nothingmuch Error: Error occured during annotate: error
iblech Err
Aankhen`` Programming? What am I saying?
nothingmuch very informative
Aankhen`` s/programming/using the module/
ROTFLMAO nothingmuch.
nothingmuch do the bots sum karma? i wonder what the collective karma of #perl6 is
Aankhen`` Although I think maybe you could achieve the same thing as I said above using C<.assuming>. 16:39
gaal problem is you get very dirty namespaces if everybody exports.
Aankhen`` How so?
gaal use A; use B; use C; use D;
they all defined methods 16:40
now you have lots of methods in your namespace.
Aankhen`` Yeah, but it's the same with regular modules in Pugs, atleast until C<is export> is fully implemented. :-)
gaal ?
Aankhen`` If you have modules A, B, C and D with lots of exported subs, and use them all together, you can expect a cluttered namespace... 16:41
gaal er, yes, that's why you don't usually export/import stuff with OOP
Aankhen`` Yes, but you could have something like CGI's C<use CGI qw/:standard/>, and thereby provide the optional functional interface. 16:42
gaal ahh, so you're asking for a generic way to give a procedural facade to an OOP module's set of static methods? 16:43
Aankhen`` Not quite asking for, just bouncing the idea around. :-) 16:44
gaal for @export -> $meth { %{caller.package ~ "::$meth"} := $meth.assuming($self => $SINGLETON_INSTANCE) } or so 16:46
modulo typos and bugs and unimplemented features 16:47
Aankhen`` Is @export a special variable? Or are you simply referring to a list of the exported methods?
gaal and lazy construction of the singleton instance which you only want to activate with the functional facade 16:48
no, i'm picturing an init fucntion that can do this, nothing standard.
Aankhen`` OK.
gaal though, heh, it can be made a standard role
Aankhen`` I had an epiphany regarding classes vs. roles yesterday. :- 16:49
D
gaal class CGI does FunctionalFacade { }
though functional means something else to many pugs hackers :) 16:50
Aankhen`` Heh, indeed.
gaal and "procedural" reminds me of that wacky Spore game
Aankhen`` ?eval my $foo = "bar"; my $bar = "baz"; $::($foo)
evalbot6 \'baz'
gaal woot! when was that made to work? 16:51
Aankhen`` shrugs.
gaal $::($somebody)++
Aankhen`` Heh. 16:52
iblech That was me, some weeks ago :)
gaal :)
Aankhen`` iblech++
perlbot karma $somebody
perlbot $somebody doesn't have any karma
Aankhen`` perlbot karma $::($somebody)
perlbot Karma for $::($somebody): 1
gaal $somebody = "iblech"; redo
Aankhen`` gaal++ # things like that :-) 16:53
gaal iblech: did you make it work with hierarchical namespaces? last i checked the spec wasn't clear on whether they were in or not 16:54
iblech You mean sth. like $::(...)::Foo::Bar::(...)::Baz? Works
gaal no, i mean it searches in This::Current::Package, then in This::Current, then in This 16:55
funky, huh?
"Note that unlike in Perl 5, initial "::" doesnōæ½x92t imply global. Package names are searched for from inner lexical scopes to outer, then from inner packages to outer. 16:56
The global namespace is the last place it looks.
must use the "*" package to force the search to start in the global namespace."
-- s02
iblech Ah, dunno. The $::(...) notation simply reduces to the result of the expressions (i.e. $::("foo") -> $foo), and then gives the result to the standard variable finder
chip back 16:59
knewt hi chip 17:00
chip hey, I've gone back to #parrot for the continuation issue 17:03
er, the continuation of the issue. whatever
Aankhen`` How do I pass modifiers to a Perl 5 regex? 17:09
gaal rx:P5:i/moose/
Aankhen`` What about if I need /x?
:x?
gaal dunno :) 17:10
chip :x is the default
Aankhen`` chip >> For P5 regexes too?
chip beats me
Aankhen`` I doubt it...
gaal ?eval "mooseelffish" ~~ rx:P5/moose elk fish/ 17:11
evalbot6 MkMatch {matchOk = False, matchFrom = 0, matchTo = 0, matchStr = "", matchSubPos = [], matchSubNamed = {}}
Aankhen`` O_O
Pattern matching worked?
gaal ?eval "mooseelffish" ~~ rx:P5:x/moose elk fish/
evalbot6 MkMatch {matchOk = False, matchFrom = 0, matchTo = 0, matchStr = "", matchSubPos = [], matchSubNamed = {}}
gaal it didn't in either case.
iblech Aankhen``: :P5 apparently doesn't allocate 30MiB or so of RAM, so it works
Aankhen`` ?eval my $foo = "true"; bool::($foo)
evalbot6 Error: unexpected "b" expecting ";", statements or end of input
Aankhen`` iblech >> OK.
sproingie especially since elf doesn't match elk
Aankhen`` ?eval "mooseelffish" ~~ rx:P5:x/moose elf fish/ 17:12
evalbot6 MkMatch {matchOk = False, matchFrom = 0, matchTo = 0, matchStr = "", matchSubPos = [], matchSubNamed = {}}
Aankhen`` ?eval "mooseelffish" ~~ rx:P5/moose elf fish/
evalbot6 MkMatch {matchOk = False, matchFrom = 0, matchTo = 0, matchStr = "", matchSubPos = [], matchSubNamed = {}}
gaal sproingie, you're right! elves don't have antlers.
sproingie how about that, it's still not matching 17:13
?eval "foo" ~~ rx:P5:/foo/
evalbot6 Error: No compatible subroutine found: "&rx"
gaal no way to say /x? sounds like a bug to me!
sproingie what'd I do wrong?
gaal ?eval "foo" ~~ rx/P5/foo/
evalbot6 Error: unexpected "f" expecting term postfix, operator, ">>=:=<<", ">>!=<<", ">>==<<", ">><=<<", ">>>=<<", ">>~~<<", ">>!~<<", ">>eq<<", ">>ne<<", ">>lt<<", ">>le<<", ">>gt<<", ">>ge<<", ">><<<", ">>><<", "\187=:=\171", "\187!=\171", "\187==\171", "\187<=\171", "\187>=\171", "\187~~\171", "\187!~\171", "\187eq\171", "\187ne\171", "\187lt\171", "\187le\171", "\187gt\171", "\187ge\171", "\187<\171", "\187>\171", "=:=", "!=", "==", "<=", ">=", "~~", "!~",
gaal ahem
sprongie: extra : 17:14
sproingie ?eval "foo" ~~ rx:P5'/foo/
evalbot6 Error: unexpected "'" expecting word character, "(", "[", "<<", "<", "\171", term postfix, operator, ",", ":", ">>=:=<<", ">>!=<<", ">>==<<", ">><=<<", ">>>=<<", ">>~~<<", ">>!~<<", ">>eq<<", ">>ne<<", ">>lt<<", ">>le<<", ">>gt<<", ">>ge<<", ">><<<", ">>><<", "\187=:=\171", "\187!=\171", "\187==\171", "\187<=\171", "\187>=\171", "\187~~\171", "\187!~\171", "\187eq\171", "\187ne\171", "\187lt\171", "\187le\171", "\187gt\171", "\187ge\171", "\187<\171", "
sproingie argh
?eval "foo" ~~ rx:P5/foo/
evalbot6 MkMatch {matchOk = True, matchFrom = 0, matchTo = 3, matchStr = "foo", matchSubPos = [], matchSubNamed = {}}
gaal ah
sproingie ?eval "foobar" ~~ rx:P5/foo bar/
evalbot6 MkMatch {matchOk = False, matchFrom = 0, matchTo = 0, matchStr = "", matchSubPos = [], matchSubNamed = {}}
gaal at last someone who can type!
sproingie ?eval "foobar" ~~ rx:P5:x/foo bar/
evalbot6 MkMatch {matchOk = False, matchFrom = 0, matchTo = 0, matchStr = "", matchSubPos = [], matchSubNamed = {}}
sproingie hmm 17:15
?eval "foobar" ~~ rx:P5/foo bar/x
evalbot6 Error: unexpected end of input expecting end of input or term
Aankhen`` BBIAB.
gaal weird, Pugs.Eval does mention x as a p5flag. 17:20
sproingie ?eval "FooBar" ~~ rx:P5:i/foobar/ 17:22
evalbot6 MkMatch {matchOk = True, matchFrom = 0, matchTo = 6, matchStr = "FooBar", matchSubPos = [], matchSubNamed = {}}
sproingie does parse flags. doesn't seem to grok x
or it does, and ignores it
?eval "FooBar" ~~ rx:P5:y/foobar/
evalbot6 MkMatch {matchOk = False, matchFrom = 0, matchTo = 0, matchStr = "", matchSubPos = [], matchSubNamed = {}}
sproingie seems to ignore all flags it doesnt understand
gaal hmmm, it doesn't handle :s either: 17:23
?eval "foo\nbar" ~~ rx:P5:s/foo.bar/
evalbot6 MkMatch {matchOk = False, matchFrom = 0, matchTo = 0, matchStr = "", matchSubPos = [], matchSubNamed = {}}
gaal Pugs.Eval line 622, if anyone's feeling fixy 17:25
gaal has depleted his daily haskell-fu
autrijus er. 17:26
it's
rx:P5<x>
rx:P5<xism>
gaal oh!
Aankhen`` ?eval "mooseelffish" ~~ rx:P5<x>/moose elf fish/
evalbot6 MkMatch {matchOk = True, matchFrom = 0, matchTo = 12, matchStr = "mooseelffish", matchSubPos = [], matchSubNamed = {}}
Aankhen`` autrijus++
clkao ?eval 5 < 10 < 8
evalbot6 bool::true
gaal woot!
clkao autrijus: slacker!
autrijus clkao: yeah. I just woke up
clkao no, you woke up a few hours ago :p 17:27
autrijus clkao: stop calling me that... I barely get any quality sleep in the past week
clkao: I went back ;)
gaal unwoots after noticing that 10 !<< 8
Aankhen`` ?eval -> $foo { $foo ~ ' was called $foo in this pointy block' }.("bar") 17:28
evalbot6 'bar was called $foo in this pointy block'
gaal maybe it's time for me to sleep :)
Aankhen`` ?eval -> $foo { $foo ~ ' was called $foo in this pointy block' }.()
evalbot6 ' was called $foo in this pointy block'
Aankhen`` Parameters aren't required by default for pointy blocks?
?eval -> $foo = "default" { $foo ~ ' was called $foo in this pointy block' }.()
evalbot6 Error: unexpected "=" expecting trait, ",", ":" or block
Aankhen`` ?eval -> Str $foo { $foo ~ ' was called $foo in this pointy block' }.("bar") 17:29
evalbot6 'bar was called $foo in this pointy block'
Aankhen`` ?eval class Foo { method foo () { "foo was called" }; our &bar ::= &foo; } Foo.bar(); 17:31
evalbot6 pugs: *** Undeclared variable: "&foo" at <eval> line 1, column 62-66
Aankhen`` ?eval class Foo { method foo () { "foo was called" }; our &bar := &foo; } Foo.bar(); 17:32
evalbot6 Error: Undeclared variable: "&foo"
Aankhen`` ?eval class Foo { method foo () { "foo was called" }; our &bar := \&foo; } Foo.bar();
evalbot6 Error: Undeclared variable: "&foo"
Aankhen`` Wha?
iblech You can't take methods references, last time I checked 17:33
Aankhen`` In Perl 6, or in Pugs?
iblech ?eval class Foo { method foo () { 42 } }; my &bar = &Foo::foo; bar() 17:34
evalbot6 Error: No compatible subroutine found: "&bar"
iblech Aankhen``: In Pugs
?eval class Foo { method foo () { 42 } }; my &bar = &Foo::foo; &bar()
Aankhen`` Ah.
evalbot6 Error: No compatible subroutine found: "&bar"
Aankhen`` OK.
iblech ?eval class Foo { method foo () { 42 } }; my $bar = &Foo::foo; &bar()
evalbot6 Error: No compatible subroutine found: "&bar"
iblech ?eval class Foo { method foo () { 42 } }; my $bar = &Foo::foo; $bar()
evalbot6 Error: Wrong number of invocant parameters: 0 actual, 1 expected
iblech ?eval class Foo { method foo () { 42 } }; my $bar = &Foo::foo; $bar(Foo.new)
evalbot6 Error: Wrong number of invocant parameters: 0 actual, 1 expected
iblech ?eval class Foo { method foo () { 42 } }; my $bar = &Foo::foo; $bar(Foo.new:) # last try
evalbot6 42
iblech :)
Aankhen`` ?eval class Foo { method foo () { "foo was called" }; } my &bar = &Foo::foo; bar(Foo.new()); 17:35
evalbot6 Error: Wrong number of invocant parameters: 0 actual, 1 expected
Aankhen`` ?eval class Foo { method foo () { "foo was called" }; } my &bar = &Foo::foo; bar(Foo.new);
evalbot6 Error: Wrong number of invocant parameters: 0 actual, 1 expected
Aankhen`` ?eval class Foo { method foo () { "foo was called" }; } my &bar = &Foo::foo; bar(Foo.new:);
evalbot6 'foo was called'
Aankhen`` ?eval sub foo (Str $bar, Bool ?$lc) { ($lc) ?? $bar.lc :: $bar.uc }; foo("bar"); 17:36
evalbot6 'BAR'
putter Is there an "official" p6 rules grammar{} for regexps? 17:37
Aankhen`` ?eval sub foo (Str $bar, Bool ?$lc) { ($lc) ?? $bar.lc :: $bar.uc }; my &bar := &foo.assuming(lc => 1); bar("BAR");
evalbot6 'bar'
Aankhen`` ?eval class Foo { method foo () { "foo was called" }; } my &bar = &Foo::foo.assuming(self => Foo.new); bar();
evalbot6 Error: No compatible subroutine found: "&bar"
Aankhen`` ?eval class Foo { method foo () { "foo was called" }; } my &bar = &Foo::foo.assuming(self => Foo.new()); bar(); 17:38
evalbot6 Error: No compatible subroutine found: "&bar"
iblech ?eval class Foo { method foo () { "foo was called" }; } my $bar = Foo.new.can("foo"); $bar() 17:39
evalbot6 Error: No compatible subroutine found: "&can"
iblech ?eval class Foo { method foo () { "foo was called" }; } my $z = Foo.new; my $bar = $z.can("foo"); $bar()
evalbot6 Error: No compatible subroutine found: "&can"
Aankhen`` ?eval Str.can("lc");
evalbot6 Error: No compatible subroutine found: "&can"
Aankhen`` ?eval "lc".can("lc") 17:40
evalbot6 Error: No compatible subroutine found: "&can"
putter autrijus, chip: has anyone started work on a grammar{} for p6 regexp? Ie, the "regexp" rule of grammar Perl {}? 17:42
iblech putter: See the end of svn.perl.org/perl6/grammar/trunk/Grammar.perl6 17:45
gaal ?eval Carp::longmess 17:48
evalbot6 Error: No compatible subroutine found: "&Carp::longmess"
gaal iblech, doe evalbot bypass prelude? 17:49
iblech Yep, look at Pugs.Run:152
unless safeMode $ do ... initPrelude ...
If the "is safe"/"is unsafe" traits work, we could unconditionally load the Prelude 17:50
gaal ah - so we can omit the 'is safe' / 'is unsafe' directives
heh heh heh
putter iblech: thanks...
iblech food & 17:52
putter yipes... I was expecting... more. 17:53
gaal iblech: they do not, now at least. 17:54
putter I wonder if anyone would object to doing grammar development in the pugs tree... 17:55
Aankhen`` How come C<< multi sub *coerce:<as> >> does
How come C<< multi sub *coerce:<as> >> doesn't parse?
svnbot6 r4563, iblech++ | Pugs.Parser -- Make "is unsafe" work. 18:03
r4564, iblech++ | Pugs.Run -- Load the Prelude unconditionally, now that "is unsafe" works. 18:08
nothingmuch *cough* 18:12
oh....
oh my... gumby.misplacedmac.com/Images/billgates01.jpg
that's horrible
autrijus Aankhen``: because pugs doesn't yet understand the "coerce" categ 18:15
Aankhen``: it's in Parser.hs line 3621
er
line 361
feel free to fix!
gaal ?eval Carp.longmess 18:18
evalbot6 Error: No compatible subroutine found: "&Carp" 18:19
gaal ?eval Carp::longmess
iblech ?eval $?PUGS_VERSION
evalbot6 Error: cannot access CALLER:: in top level: "$?CALLER::POSITION"
\'Perl6 User\'s Golfing System, version 6.2.6, June 2, 2005 (r4564)'
svnbot6 r4565, iblech++ | * t/pugsrun/11-safemode.t -- More tests. 19:04
r4565, iblech++ | * Prelude.pm -- Put a reminder to update 11-safemode.t if there's a name change
r4565, iblech++ | of certain functions.
Aankhen`` autrijus >> I did it! :-D 19:14
Should I also add the categories from A12?
autrijus Aankhen``: sure!
Aankhen`` Okey dokey! 19:15
svnbot6 r4566, Aankhen++ | * C<coerce:> is now parsed in sub names.
autrijus Aankhen++
Aankhen`` Wow, I actually changed something in the parser. :-o 19:17
(even if it was a small thing :-)
svnbot6 r4567, Aankhen++ | * added remaining categories from A12 to list of valid sub name prefixes. 19:34
Aankhen`` 17 minutes? O_O 19:35
stevan hey autrijus :) hows Vienna? 19:46
autrijus stevan: very nice 19:51
svnbot6 r4568, putter++ | Cleaned up two disabled grammar test files - now runnable and :todo.
r4569, putter++ | Undisabled two rules/from_perl6_rules grammar test files.
r4570, putter++ | Undisabled two rules/from_perl6_rules grammar test files. (part 2 - svn ci scoping oops)
stevan autrijus: any releases planned?
autrijus: I have been reading a lot about the CLOS MetaObject system 19:56
it seems like a combination of CLOS and Smalltalk will make for a nice system
nothingmuch www.pbs.org/wnet/savageplanet/01vol...exmid.html 20:05
stevan: see also forth
my def for forth is meta imperative 20:06
stevan nothingmuch: meta-forth?
nothingmuch no, forth is meta without needing a meta prefix ;-)
stevan yes
all "meta" really means is reflective 20:07
(yes that is over simplifying things)
nothingmuch meta is data about data
that is, an object interface about the objects
stevan yes
nothingmuch e.g. an object for a class
forth takes this to a lower level 20:08
stevan and an object for that class's class
nothingmuch it constructs itself during runtime that is compile time that is runtime 20:09
very very simple
read chapter 7 of harrorth =)
stevan meta-times :P
autrijus "I never meta language I don't like"
stevan :) 20:10
autrijus: are you familiar with CLOS at all? 20:11
Aankhen`` ?eval $?PUGS_VERSION 20:12
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.6, June 2, 2005 (r4570)'
autrijus stevan: not at all
stevan autrijus: neither was I :) 20:13
but I have been reading about it's meta-object stuff
very cool
generic-functions++
svnbot6 r4571, putter++ | Parse non-capturing subrules <?foo>, and subrule names with ":" and ".". Updated tests. 20:51
nothingmuch www.pbs.org/wnet/savageplanet/01vol...exmid.html 20:54
Aankhen`` G'night.
mugwump morning all! 20:58
hey david 20:59
putter autrijus: ping? 21:12
svnbot6 r4572, putter++ | capture.t: Un-todos, un-evals, un-comment tests, one new (good) todo.
autrijus putter: pong 21:17
putter autrijus: Could you give me the big picture on rules development? How do you see things going forward? 21:25
(should I be writing in pir, p6, p6, or hs... ;) 21:26
21:32 stef is now known as cognominal
nothingmuch members.safe-t.net/jwalker/programm...rview.html 21:33
autrijus putter: yo 21:48
svnbot6 r4573, autrijus++ | * chained comparisons now work again (was broken in 6.2.6).
r4573, autrijus++ | clkao++ for noticing it.
autrijus clkao: thx. it turns out to be a typo. 21:49
putter hi
autrijus clkao: fortunately it's only been broken for one version
putter: the big picture is that 21:51
1. PGE will go forward with default builtins and other semantics etc all written in PIR.
2. at some point, it may make sense to port PGE's parser part into Rules itself. 21:52
3. it may also make sense to compile rules into Parsec primitives.
I'm pretty sure both 1. and 2. will happen eventually
3. I'm less sure, that depends on whether we see it important to keep pugs independent from parrot. 21:53
if the PGE-PIR based implementation takes off and does not share the same AST as pugs
svnbot6 r4574, putter++ | Parse array and hash captures in regexp. Just because they are not implemented doesnt mean we have to parsefail. Untodoed tests.
autrijus then I can see Pugs evolving another Rules system.
so that we can run the PGE-PIR grammar independent of parrot. 21:54
on the other hand, if Pugs became embedding parrot by default
then it makes little sense to keep two rules implementations.
that's the big picture. I think.
putter ok... , 21:55
cognominal autrijus: that was great to get your talk from Vienna live in Marseille... 21:56
too bad I could not get you and Pierre Weis to talk together 21:57
putter the pieces I've banged on are: a regexp grammar{} (or rather a bunch of them;); p6 rx in p6 on pcre; p6 rx in p5 on p5 qr; and assorted tree and bootstrap cruft. 21:58
hmm. there was a transition there I blurred. pause. Thank you for that big picture overview! :) I will now commence to think out loud. ;) 22:00
autrijus Pierre? 22:01
putter: grammar{} is just classes for methods that are aliases to rules. 22:02
putter: It may or may not be feasible to compiler p6rules to p5rx.
Damian demonstrated that it would be hard to get right. 22:03
putter It isnt actually very hard to bootstrap a regexp parser. You just use a match tree (:parsetree or normal) as the parse tree, write the tree to whatever emitter, fake up an initial match tree, and your done.
cognominal autrijus: pauillac.inria.fr/~weis/index-eng.html 22:04
the designer of ocaml...
autrijus putter: aye. but then p6rules isn't really a regexp.
putter: it's got closures in it and it's got hypotheticals. 22:05
cognominal he was attending our french Perl workshop
autrijus oh, the Caml guy
putter Re p6rules to p5rx - the underlying engine limits the space of usable rules. left-recursion is a nogo. pcre has difficulties with some right-recursive rules,
autrijus he did ask about laziness
cognominal yes
autrijus and I gave a verbose answer of why I think default lazy list context is not a great thing
and how pugs is forced to label all IOs are strict.
hopefully he finds the answer sane.
cognominal but I acted as go-between so a lot of information was lost
autrijus putter: right. so that's kind of hard. 22:06
putter: also p5rx is nonreentrant
cognominal anyway, I think it is a good thing to get caml people to get interested in perl in general and perl6 in particular
autrijus which kills much things
because you can't define helper functions that performs some more matching for you anymore 22:07
cognominal: I agree
putter a pcre or p5 based backend will never do full p6 rules. period, full stop. there are two targets of interest, 22:08
one, not tremendously relevent to pugs, is that a p5 emulator, despite its limitations, might be appreciated by folks using p5. 22:09
two, a p6/pcre, or p5/qr, or p5/Parse::Regex, or PGE bootstrap, are posible ways to get to a boostrapped regexp grammar{} and parser. 22:12
It sounds like parrot independence is not a near term objective, which reduces the attractiveness of p6/pcre and p5/qr based emulators. 22:13
autrijus a sec 22:14
there's p6/parsec. 22:15
or hs/parsec.
putter Which leaves me tempted to simply roll a regexp grammar{}, using the limited vocabulary PGE currently understands, fake up a match tree, and do a p6-based tree-to-pir emitter. Then the existing pir parser can be tossed. 22:16
autrijus which is attractive and what I'm saying about 3.
putter I didn't quite follow the last few comments... 22:17
autrijus oh ok. 22:18
pugs currently parses perl 6 source code
using Parsec.
putter y
autrijus feature-wise parsec is equivalent, or more powerful, than rules 22:19
putter indeed
autrijus so it is possible that we can parse rules syntax
and compile it to parsec functions
while preserving the entire rules semantics
essentially reinventing PGE inside the Pugs interpreter space. 22:20
I'm not working on that until we get OO done
which is why 6.283 is after 6.28
but I think it will be fruitful
OTOH, because PGE is here
there's no particular rush to do that.
putter I guess the core question might be this: PGE/pugs currently implements only a small subset of p6 rules. Better rules support might be nice (hmm, why exactly?). So there seem three options: 22:23
autrijus 1. improve PGE XD 22:24
putter allocate effort to PGE; allocate effort to parsec; punt until after objects.
XD? 22:26
autrijus XD is this smiley thing
putter ah
autrijus that is ignorable :)
putter :)
autrijus so I'm punting 22:27
but I will gladly help people who want to work on either PGE or Parsec.
putter Oh yes. Your task is clearly objects. I'm just wondering what to do next. 22:29
autrijus *nod* 22:30
SamB thought 6.283 was after 6.28 because of the definition of decimal notation
autrijus SamB: ;)
putter: it would be instructive to do what nothing much did for Forth and try a basic parser for rules in Parsec, I think. 22:31
putter Hmm... a haskell learning exercise... tempting.
SamB Parsec is fun. 22:32
putter As for the assorted things I have "almost done" at this point, I'm tempted to simply punt until post-object.
But for reference purposes, it really does turn out to be quite easy to bootstrap a regexp parser. The match-tree-as-parser-ast is quite nice. And regeps arent really that complex, from a parser point of view. 22:34
s/purposes,/purposes, I note that/
ok, my thanks for your help autrijus. 22:35
crysflame (?<=a.*)b seems to be hard in regex as it stands 22:37
autrijus putter: np :)
anyway. I plan to up the req to parrot 0.2.1 22:38
for this release
just so we have character classes
(among other things.)
putter k. I note the parrot HEAD (no J.Buffet pun intended) PGE/P6Rule.pir is unchanged, so it doesnt need merging. 22:42
mugwump is talking tonight at wellington.pm.org/ about Perl 6 22:44
22:46 Odin_ is now known as Odin-LAP
putter Ok, you know IRC is warping your mind when your reaction to the talk announcement is "Sam Vilain? Who is this Sam Vilain? mugwump is giving the talk?!? <puzzled frown>". 22:47
autrijus putter: have you updated your change to parrot PGE?
the <?foo> one 22:48
putter "updated my change"? err,
autrijus "reflected"
seems not.
putter I did a second independent patch to parse array and hash... oh, that. 22:49
autrijus right. because I think keeping a separate PGE tree inside pugs is troublesome
I was thinking about just commit to parrot tree instead
now parrot is doing monthly releases
shouldn't take too long to pick things up
putter It was snv'ed in as r4571 and r4572. 22:50
autrijus I mean in the parrot tree.
parrot/compilers/pge/
I think if you're hacking PGE, it may make sense to apply for committership in parrot and commit to parrot instead 22:51
just so we don't keep two PGE trees
or, at least, post them as patches to p6i for patrick to re-merge
into parrot
putter Ah. Good point. Makes sense. No, I haven't. No bits, but I can send off a patch.
seen pdcrawley 22:52
jabbot putter: I havn't seen pdcrawley , putter
autrijus ok. please send patch and ask for a bit.
happily, I'm with leo and chip
so handing you a committer bit should not take long.
(but please send the patch for pmichaud's review first)
putter seen pdcawley 22:53
jabbot putter: pdcawley was seen 3 days 2 hours 31 minutes 3 seconds ago
putter seen q[pdcawley]
jabbot putter: q[pdcawley] was seen 6 hours 33 minutes 47 seconds ago
putter Oh, wrong p.* name. sigh. 22:54
seen pmichaud
jabbot putter: pmichaud was seen 30 days 5 hours 39 minutes 50 seconds ago
putter autrijus: will do.
q[pdcawley] putter? 22:58
quick one.
geoffb Can someone point me to any .t files that are data-driven, rather than just a long list of ok() statements (mixed with little bits of test setup) 23:04
autrijus ?eval 6>5>4
evalbot6 bool::true
autrijus :)
geoffb is feeling lazy about doing `find . -name '*.t' |xargs less` 23:05
autrijus geoffb: golf.t or something
oh no
t/examples
examples.t
hangs off examples/output
geoffb OK, so examples/output/ has to get generated at some point I guess . . . 23:09
But actually, that wasn't what I was referring to: I meant, takes a set of constructs, and some set of operations on them, and then runs tests for all combinations. 23:12
If such does not exist, I will want to create it
geoffb looks at output from `svk pull` -- ah, and there is examples/output/
sonofagun
putter q[pdcawley]: hi, sorry, I'm apparently indexing people on the first letter and visual profile of their nicks. Went to remember pmichaud and got pdcawley. Sigh.;)
23:13 Limbic_Region_ is now known as Limbic_Region
autrijus geoffb: we don't have spec-based testing 23:13
yet
welcome to add it
geoffb Fair enough.
geoffb has inspired Laziness. Read "RSI"
Limbic_Region autrijus - how goes the hackathon?
geoffb Seemingly one of the favorite questions around here . . . . 23:14
autrijus Limbic_Region: very well
geoffb guesses that autrijus willl say "very well"
And there you go
autrijus Limbic_Region: parrot is now much more p6 friendly :)
Limbic_Region so Parrot is going to end up with STM and new calling conventions
geoffb Go Parrot
autrijus yes, and inexpensive continuations 23:15
revdiablo STM? wow! I didn't hear about that
autrijus that can be saved
Limbic_Region fwiw - changing calling conventions was 1 of many sore spots between Dan and Leo
revdiablo that is hot
autrijus and variable sized register frames
Limbic_Region revdiablo - read chip's journal
autrijus Limbic_Region: right. and since the "Dan" side has disappeared...
Limbic_Region use.perl.org/~chip/journal/25158
geoffb Limbic_Region, where is chip's journal?
autrijus ...we end up figuring out how to piece together "Leo" sides.
geoffb man, asked to fast
autrijus and so far I like what I see :)
oh and a generational GC to boot.
Limbic_Region autrijus - I wasn't sure how much you followed Parrot previously 23:16
I am not advocating one side or the other
autrijus Limbic_Region: previously I read the summaries that's all
Limbic_Region just trying to explain some of why a lot of changes 5 years into the project are happening relatively quickly
revdiablo oh, I haven't been following chip's journal at all lately
Limbic_Region from an outsiders perspective anyway
revdiablo I think I need to catch up
Limbic_Region the generational gc has been going in slowly for some time now 23:17
I wonder if matt is still working with Parrot 23:18
I should mention that the benchmark graphs should likely have a new scaling
www.sidhe.org/~timeparrot/graphs/
there's about a year's worth of graphs there showing the benchmark times of Parrot in case you are interested autrijus 23:19
so there are a lot of obvious changes/impacts to parrot - what's on the pipeline for Pugs? 23:21
autrijus Limbic_Region: I fixed the chained comparison just so clkao won't call me slacker again
:)
in other news I sent off an updated version of hw2005
it's now "complete" and will be judged tomorrow by the reviewers 23:22
that is the conference committee
Limbic_Region which means what?
autrijus which means I get to code from tomorrow on :)
instead of just reading and writing papers.
Limbic_Region err - not what I meant
what are the possible outcomes of the "judging"
autrijus oh. 23:24
I suspect they'll tell me to improve some sections
etc
if I'm lucky and accepted to present in the conference
if not then I suspect I'll be told 2 weeks later that they're not interested in Pugs
:)
Limbic_Region right - and monkey's will fly out of my butt 23:25
s/'//
autrijus yeah, I admit I think it's rather unlikely.
but hey, I'm just guessing :)
in yet other news, I worked out the AST for PIR
Limbic_Region ok - so are you guys taking turns sleeping or are you trying to keep them on your internal clock?
and it is going to stay relatively stable right? 23:26
autrijus and continued to design the intermediate level PugsAST to compile from Exp to PIR
right.
the idea is that it's good for very long.
and PASM level will change drastically.
so no PBC compat for forseeable future
between even point releases.
Limbic_Region well - OO assembly is sick and twisted (to be read really cool)
but I agree - it isn't for humans to be writing anyway
autrijus yup 23:27
we can abuse silicon life forms
until they gain sentience
Limbic_Region so in the past there were very few branches in Parrot (actually I can only ever think of 1 maybe 2)
does this mean there should be a fair amount
?
oh - and perhaps you can fix the whole unicode problem too - that would be really nice 23:28
clkao ?eval 6 < 10 < 8
evalbot6 bool::false
clkao autrijus++
Limbic_Region ?eval 10 > 6 < 8
evalbot6 bool::true
Limbic_Region yep
autrijus Limbic_Region: I already fixed the latin1 bias a while ago 23:30
clkao autrijus: youre still up! 23:31
how far have you got for parrot backend
autrijus clkao: pretty far along in design
clkao: coding starts tomorrow
clkao: I'll start with svnbot.p6 23:32
putter good night folks
clkao coolio 23:33
Limbic_Region autrijus - I was referring to Parrot's dependency on ICU cause no one has been brave enough to hack up an alternative
clkao in other news, i've got plan for the git import/export for svn::mirror
autrijus Limbic_Region: there's no ICU dep anymore 23:34
clkao and then we'll see if it's feasible to make backend with it
autrijus cool
seems git is hot :)
Limbic_Region: not mandatory anyway
geoffb Is there already a file or files that provide a human-friendly map to the pugs tree? 23:36
clkao it's actually quite rough *shrug*
Limbic_Region autrijus - that should have been written "dependency on ICU for unicode"
geoffb 's @pugs_todo is getting rather long
autrijus geoffb: no. lib/pugs/hack.pod
Limbic_Region the design was supposed to be a well published API so that any unicode library would work 23:37
2. Parrot would ship with capability of unicode period - user could choose to not use it
3. ICU would be default library until something better came along
it sounds like 1 and 2 are finished
geoffb assumes that autrijus's last comment should be decompressed to "No it doesn't exist; but it should go in lib/pugs/hack.pod" 23:38
autrijus yes.
geoffb thought so.
autrijus Limbic_Region: I think it's okay to have a minimal builtin impl for unicode charclesses and case conversions 23:39
but other than that I further think ICU is decent.
Limbic_Region ICU is a boheamoth that breaks in lots of ways on lots of platforms
geoffb I swear I will be able to start popping soon. (Of course, I'm swearing that with one side of my brain so that the other side doesn't go "Right. Time to go jump out a window and stop recursing.")
Limbic_Region it ups the dependencies for Parrot too (requiring c++)
Limbic_Region shuts up now 23:40
autrijus geoffb: I did the window jumping thing this morning. lots of fun
Limbic_Region this is #perl6 and not #parrot
geoffb heh
autrijus ok. I need to sleep now :) 23:44
g'nite folks, see you tomorrow!
Limbic_Region TTFN autrijus
sleep well
geoffb cya, sleep well! 23:45
Odin-LAP revdiablo: Sorry. 23:59