Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-04-10

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 jdrago left perl6
00:06 JohnDrago joined perl6
00:56 nirgle joined perl6
00:57 svnbot6 r9873 | fglock++ | PC-Tokenizer - more tests; failing match stringification
00:57 nirgle left perl6
01:08 ayrnieu joined perl6
01:08 Quell joined perl6
01:12 meppl gute nacht
01:30 hexmode joined perl6
01:45 audreyt 'morning
01:48 Steve_p Good evening :)
01:48 xern joined perl6
01:49 xern joined perl6
01:50 frederico joined perl6
01:51 dduncan good 6:51pm
01:54 audreyt :)
01:56 audreyt emeijer++ # very nice memoir to which I agree 150%
01:56 audreyt # http://research.microsoft.com/~emeijer/Papers/ICFP06.pdf
01:58 dduncan what in the who now?
01:58 audreyt what?
01:59 dduncan I'm just starting to look at that link ...
02:00 stclare joined perl6
02:00 dduncan but speaking for relational databases, there is no such thing as a impedence mismatch between them and ordinary programming languages or objects if the system is built properly
02:00 dduncan on that note, I'm borrowing many pages from functional programming in my design of Rosetta
02:01 audreyt right. same can be said of O/X
02:01 audreyt it's just "properly" designed systems are rare to comeby
02:01 dduncan and in Rosetta, I'm trying to build a proper system
02:01 audreyt *nod*
02:01 dduncan that *is* relational, but can represent anything natively
02:02 dduncan existing (SQL) systems are half-baked
02:02 dduncan and hence we have all these impedence mismatches
02:03 audreyt *nod*
02:03 dduncan now, as I'm trying to borrow from Haskell et al, but don't know Haskell much, I have a few questions for you
02:03 audreyt sure
02:04 dduncan first of all, the meaning of a 'pure' function ...
02:04 dduncan in Haskell, is there such a thing as 'global' variables, besides monads?
02:04 audreyt a pure function is one that always returns the same thing given the same arguments.
02:04 audreyt there is no global variable in Haskell
02:04 audreyt but there are global variables in GHC.
02:04 dduncan okay, no globals
02:05 dduncan can a function read said variables in GHC?
02:05 audreyt (which we use in pugs to perform end-of-program finalization etc)
02:05 ayrnieu use Memoize; memoize('pure_function');
02:05 dduncan a Haskell function
02:05 audreyt a function cannot read said variables without being in the IO monad.
02:05 dduncan okay
02:05 wolverian I don't like this "object initializer" stuff in c#. isn't it just a special syntax rule for named parameters? heh
02:05 dduncan now, ...
02:06 dduncan as a main part of making Rosetta, which is now its own relational DBMS (with swappable back-ends) ...
02:06 dduncan I am designing a new language, for now called "Rosetta D"
02:06 dduncan my current thought is to make that language as pure as possible
02:06 ayrnieu why do you want that?
02:07 dduncan easier to implement, and optimize
02:07 dduncan and validate
02:07 dduncan I'm putting a strong emphasis on correctness and reliability
02:08 dduncan so my current thought of the language is that it is mainly pure, but that in appearance it is mainly imperative ... or so much so that Perl is
02:09 dduncan now, with traditional databases ...
02:09 dduncan the actual persistent data appears like a set of global data
02:10 dduncan if I were providing operators that were pure in the Haskell sense, invokers of those would have to pass a reference or copy of that same data as an argument rather than the operator just referring to it directly
02:10 dduncan as a side note, audreyt, ...
02:11 dduncan can a pure function take references as arguments, or do all inputs have to be pass-by-value?
02:11 dduncan eg, how would the assignment operator be defined in Haskell, if there is one?
02:11 ayrnieu Haskell does not have an assignment operator.
02:12 audreyt mutable imperative "references" in haskell are IORefs.
02:12 audreyt the assignment in haskell is spelled
02:12 dduncan okey ... pure functional
02:12 audreyt writeIORef :: IORef a -> a -> IO ()
02:12 audreyt and if you cannot change something a reference refers to
02:12 audreyt then it's indistinguishable with the thing it refers to anyway.
02:12 dduncan yes
02:13 dduncan to put in a bit of context ...
02:13 dduncan Rosetta is now officially implementing http://thethirdmanifesto.com/
02:13 audreyt oooooh
02:13 dduncan according to its definition ...
02:13 audreyt wish you said that sooner!
02:14 dduncan operators fall into read-only and update operators
02:14 dduncan the first sounds like Haskell's pure functions
02:14 audreyt (it's like when I introduced various javascript-2 features and raved about them in japan
02:14 audreyt to dankogai, he listened passively for a while
02:14 audreyt until I said "javascript2 is self-hosting"
02:14 audreyt and then he went "ooooh, wish you said that sooner")
02:15 dduncan the latter is how an assignment operator is defined; it is not a 'function' and doesn't return a value; it takes at least one argument by reference and updates it
02:15 q[uri]_ joined perl6
02:16 dduncan audreyt, admittedly I haven't hung around #perl6 much in the last month, as I have now gained my first paid work in a long while that keeps me busy ... it isn't related to Perl alas
02:16 dduncan but right now I'm taking a day's break from that
02:16 dduncan otherwise you might have heard my plan sooner
02:18 dduncan now, in Haskell terms, a persistent relational data store is a monad, though a non-persistent one doesn't have to be
02:19 dduncan but given that the 'main' data I address is persistent (what people usually use databases for), its access will probably be monadic
02:19 dduncan however, I would like my operators themselves to be pure where at all possible
02:19 dduncan eg, operators that derive numbers from numbers, strings from strings, relations from relations, each from others, etc
02:20 dduncan the built-in ones anyway
02:21 dduncan but I know people will want to make the equivalent of 'stored procedures', which would not be pure as they change monadic data
02:22 dduncan anyway, thanks for your feedback ... I was wondering about Haskell purity and whatnot
02:31 audreyt np :)
02:34 dduncan FYI, my current working plan for Rosetta D is that it resembles Perl 6 in appearance, though the grammar is very simple (eg, all function calls are in prefix notation), and it expressly does not support the concept of 'undef'.
02:35 audreyt woot
02:35 audreyt also it should not contain any BEGIN parts
02:35 audreyt i.e. you'd have to say
02:35 audreyt &sub := sub { ... };
02:35 audreyt to define a function
02:35 dduncan Theoretically, Perl 6 itself could have the functionality I'm designing built-in and/or a module, if it were possible to make Perl 6 itself less permissive
02:36 dduncan er, not only is it a much simpler grammar, but much simpler functionality
02:36 audreyt sure, but so far p6's must troublesome functionality
02:36 audreyt is the BEGIN block
02:36 audreyt and I discovered once we did without that
02:36 dduncan that won't exist
02:36 audreyt then the runtime parts become very simple
02:37 dduncan the relationship between compile time and run time is somewhat like it is with standard SQL databases
02:37 dduncan but I'm trying to make it possible that all language error checking (besides logic mistakes) can be checked at compile time
02:38 audreyt yup
02:38 dduncan one way that's being made so is that the language is strongly typed only
02:38 dduncan though users can define strong types that emulate weak types
02:39 dduncan so if you pass an argument to a function that is of the wrong data type, that is caught at compile time
02:39 dduncan as a result, Rosetta D is probably more verbose than some languages
02:40 dduncan but I anticipate that much of it will be generated anyway, rather than hand written, by wrapper modules
02:40 dduncan kind of like how no one writes PIL directly
02:44 r0nny joined perl6
02:47 audreyt that seems sane, yeah.
02:47 audreyt (sorry for the high latency; post-conference multitasking)
02:48 Quell joined perl6
02:50 qu1j0t3 joined perl6
03:04 dduncan about that conference ... I should check up on your blog ...
03:04 dduncan on a different note ...
03:05 dduncan I assume this is just due to being in a transition, but a couple days ago it seems that Pugs took orders of magnitude longer to compile something simple than it used to; eg, taking about 70 seconds where it used to take maybe 10 seconds.
03:06 dduncan or maybe its just me
03:06 FurnaceBoy joined perl6
03:07 coumbes joined perl6
03:15 dduncan audreyt, and everyone ... while this isn't Perl 6, I suggest that anyone interested in databases should look at Jeffrey Cohen's Genezzo project, on CPAN and at http://www.genezzo.com/ ... my current hope is to form an alliance between Genezzo and Rosetta, where the former handles the data layer and the latter handles the public interface layer
03:16 dduncan eg, if that works out, that will be my favored back-end
03:17 dduncan I'm not sure how high a profile Genezzo keeps in different circles, so I'm not sure if you've heard of it ... but you should know of it for the future
03:55 svnbot6 r9874 | Darren_Duncan++ | ext/Rosetta/ : rewrote half the DESCRIPTION pod in Rosetta.pm
04:08 audreyt dduncan: interesting indeed
04:09 dduncan yes
04:09 dduncan from what I know of Genezzo, I think our projects are a great match
04:09 dduncan innovation below plus innovation above
04:09 audreyt it looks like so. yes.
04:10 dduncan moreover, my Rosetta design probably lends itself more to larger databases than lite ones anyway
04:13 dduncan audreyt, addressing your earlier "wish you said that sooner"
04:13 dduncan ...
04:14 dduncan did you have previous experience with The Third Manifesto?
04:14 dduncan or was it just that the link helped you understand what I was trying to do?
04:14 dduncan mind you, with all the advanced and/or theory materials you like to read, TTM may be right up your alley
04:15 audreyt I've read TTM before
04:15 dduncan okay
04:15 dduncan fyi, there's a new mailing list for discussion on it, started this last July
04:15 dduncan myself and a couple other CPAN folks are on it
04:16 dduncan and Darwen
04:16 audreyt cool
04:16 dduncan apparently, while its only planning stage, Darwen liked what I was doing enough that he offered to send me a complementary copy of the 3rd edition book
04:17 dduncan I accepted and got it signed too ... its currently in the mail system
04:17 dduncan meanwhile, a different book I already read is the Oreilly 'Database in Depth', which I added to our ReadThem file a few months ago
04:18 audreyt dduncan++
04:19 shamu Do you have recommendations for prereqs needed to understand what 'The Third Manifesto' is about? I'm familiar with SQL, normalization, ... up to ERDs (but don't have any language design background -- ex EE)
04:19 dduncan if my plan works out, Rosetta should be a FULL implementation of what Darwen and Date want, and not just a partial or compromising one
04:19 dduncan shamu, you have enough rereqs to get started
04:20 dduncan TTM is aimed at people that already know about databases, and want to know them better
04:20 shamu can you give me 25-words or less on what problem it's trying to solve?
04:20 dduncan or more specifically, the "Database in Depth" book is aimed at people who are already db developers
04:20 shamu let me check that out
04:20 dduncan the book "The Third Manifesto" is more of a thicker college text
04:21 dduncan DiD is easy to read and not so deep on details
04:21 dduncan the core of TTM is about 10 pages long, and a PDF copy is on the web site ... the rest of the book expands on it
04:22 dduncan see http://web.onetel.com/~hughdarwen/TheThirdManifesto/CHAP04.pdf
04:22 dduncan that's the core of the TTM college book right there, which everything else is in support of
04:23 dduncan shamu, to answer your question, TTM is basically a recipe for how to make a relational database properly ... and not the half-baked way that SQL databases do it
04:23 dduncan s/relational database/relational database manager/
04:26 dduncan a database that follows the recipe of TTM should be easier to use, more reliable, and developers don't have an impedence mismatch problem between it and other languages
04:26 dduncan no one has yet implemented it completely, but I intend to with Rosetta
04:27 dduncan that pdf link was for the 3rd edition of TTM, which just went on sale last month
04:27 shamu sorry, 'impedance mismatch problem between it (RDBM) and 'other'? languages '
04:27 * audreyt adds it to her huge to-read pile
04:27 dduncan maybe I used the wrong word
04:27 shamu you mean a proper way to match RDBM <->programming language , instead of the
04:28 dduncan but its the same subject matter as audreyt's link
04:28 dduncan yes
04:28 shamu current mechanism of RDBM<->SQL<->languag?
04:28 dduncan if you have a proper relational database, you don't need object-relational mappers, for example
04:28 dduncan since a proper RDBMS can store objects somewhat natively
04:29 dduncan technically, you probably still need a lite wrapper, but it is fairly straightforward
04:29 dduncan not big bulky mappers like we have now
04:30 dduncan now, when I say store natively, I mean that a proper RDBMS can let you define arbitrary data types, so you can define one that matches up with your object structure
04:30 shamu example of the o-r mappers you're referring to?
04:30 dduncan so mapping is very straight forward
04:30 dduncan lets see: Class::DBI to start
04:31 Khisanth joined perl6
04:31 dduncan okay, Tangram, Alzabo, DBIx::Class, DBIx::SQLEngine, Rose::DB
04:32 dduncan SPOPS, DBIx::Abstract, DBIx::DBSchema
04:32 dduncan yadda yadda yadda
04:32 dduncan er, technically only some of those are actually object-relational mappers in one sense
04:33 dduncan others are "object persistence tools"
04:33 audreyt (also Jifty::DBI)
04:33 dduncan or others allow you to use perl data structures to define things that you would use sql for
04:33 dduncan audreyt, yes
04:33 dduncan essentially, I see a large number of modules doing that sort of thing
04:34 dduncan at a glance, Rosetta may look like yet another of those, but I like to think differently
04:34 dduncan I've got a long list of perl modules that do data or database stuff in my SeeAlso; I'll do a brute paste here
04:35 dduncan L<DBI>, L<Tangram>, L<DBIx::Class>, L<HDB>, L<Genezzo>, L<Class::DBI>, L<Pixie>, L<Alzabo>, L<DBIx::SQLEngine>, L<SPOPS>, L<DBIx::SearchBuilder>, L<DBIx::RecordSet>, L<DBIx::Abstract>, L<DBIx::AnyDBD>, L<DBIx::Browse>, L<DBIx::DBH>, L<MKDoc::SQL>, L<Data::Transactional>, L<DBIx::ModelUpdate>, L<DBIx::ProcedureCall>, L<DB::Ent>, L<DBIx::DBSchema>, L<DBIx::Namespace>, L<TripleStore>, L<Data::Table>, L<ORM>, L<OOPS>, L<SQL::Statement>, L<S
04:35 dduncan and even that excludes a lot
04:35 dduncan I may have never added Jifty for example
04:35 shamu some of what you pasted is targeted at sql-style interaction directly, but I get your point
04:36 dduncan but it seems like new modules of that type come along on a regular basis, and I'm not trying to keep an exhaustive list
04:36 dduncan one commonality is that every one of those seems to be SQL centered, despite all their differences
04:36 * mugwump ahems
04:37 dduncan I am trying to be very not like SQL
04:37 shamu probably because SQL is what's out there
04:37 mugwump Pixie isn't, and I don't think Tangram is, either
04:37 dduncan yes
04:37 dduncan I understand why people do it ... SQL is what most people use
04:37 dduncan but I'm trying to tackle a different problem and not do it the same as others
04:38 mugwump having said that, Tangram's querying does import a lot of the brain damage of SQL
04:38 dduncan s/others/the masses/
04:38 shamu I had a roomie in 1993 who ended up working for Versant; they were doing object databases back then
04:38 mugwump not all, mind
04:38 dduncan and that was my main point, actually
04:38 dduncan I haven't looked at all of Pixie's internals, but it seemed to be centered on a SQL model
04:39 shamu what's the different problem?  My quick skim of chap04 seems to be trying to force the interface into the db to effectively enforce object encapsulation, of a sort?
04:39 mugwump dduncan: Pixie is basically just a lazy (oid) => (structure) system.  it can run atop BDB, for instance
04:39 dduncan one thing that TTM emphasizes is that users should not have to know any implementation details for their database
04:40 dduncan that a proper relational database simply provides consistent views of data
04:40 dduncan and how its implemented underneath can change without affecting them
04:40 shamu well, that's sort of the case with sql -- you just need to know you're working with tables
04:40 dduncan by contrast, lots of things in SQL are a symptom of implementation leaking through to the interface
04:40 dduncan for example, the char vs varchar type distinctions
04:41 shamu I read that sql has the problem of a set of fields from a db having an implementation/design wart of being ordered, when it really needs to be an associative fieldname->value  -- a level up of 'not knowing about the details of the implementation' -- am I correct?
04:41 dduncan or the fact that you explicitly declare indexes
04:41 dduncan you shouldn't have to say anything to help the database be faster, ...
04:41 dduncan you should simply have a good logical design
04:41 dduncan and the database engine should figure out itself how to do it quickly
04:42 dduncan but more bluntly, there's still the char vs varchar thing
04:42 dduncan that screams implementation: fixed width storage vs not
04:42 dduncan auto padding or not
04:42 shamu it should be able to figure it out itself as a side effect of it storing data structures at the object level, and indexing more based on its idea of an object instance, rather than some random field in a table?
04:43 dduncan you still indicate logical relationships of data
04:43 dduncan eg, a certain attribute (column) is supposed to be unique
04:43 shamu and hence an index
04:43 dduncan or one is related to another
04:43 shamu ok, so it's still basically relational
04:44 dduncan an index is implicitly used behind the scenes to enforce a constraint you specify
04:44 * mugwump offers popcorn around the channel
04:44 * shamu wants some without butter (dairy intolerance), please
04:44 dduncan but you shouldn't need to declare an index which doesn't specify an explicit constraint or relationship
04:45 dduncan an 'index' is an implementation detail
04:45 shamu sure
04:45 shamu hmm -- but sometimes you want to speed up queries on a non-unique field, right?
04:45 dduncan all the user cares about is that a unique constraint is a constraint
04:45 dduncan speeding up your example is not up to the user
04:46 dduncan the user shouldn't have to care about that ... the program should do it for them
04:46 shamu based solely on data relationships?  Or based on usage patterns?  I
04:46 dduncan eg, the program can analyse usage and dynamically make indexes when they would help
04:46 shamu gotcha
04:46 dduncan the program would use both constraints, relationships, and runtime analysis
04:47 dduncan the point is that making things fast is automatic
04:47 dduncan not something the user specifies
04:47 dduncan think of it like this ...
04:47 dduncan lots of things people specify in SQL is something to make one brand of db faster, but with another brand, they have to rewrite their sql for its implementation
04:48 dduncan a proper db has that automatic so you don't have to rewrite when changing vendors
04:48 dduncan another thing the db should do automatically is rearrange queries to perform faster, but have the same result
04:48 shamu err, could you restate that with a little more specificity as to your terms?
04:49 shamu when you switch db vendors, you're switching dbs, right?
04:49 dduncan eg, if you use Oracle, you may write your queries or create your indexes or tune things in one specific way, but if you switch to Postgres or Sybase or something, those special optimizations that you specify yourself don't work and you have to make new ones
04:50 dduncan each db vendor has a different db program
04:50 dduncan usually
04:50 shamu sure
04:50 mugwump yes, quite often "tuning" becomes a little too application intrusive
04:50 dduncan people waste lots of time on tuning
04:50 dduncan on a proper db, they wouldn't
04:50 dduncan this is one example of ease of use that TTM brings
04:51 mugwump dduncan, I'm thinking a great way to demonstrate your concept would be to have a "reference" database, that's just a pure Perl implementation that doesn't support saving its state (except perhaps via complete dump/loads)
04:51 shamu many corporations pay big bucks to dedicated dbas to service tuning requests (creating indices, etc)
04:51 dduncan then they can redirect that money to some use that is more productive
04:52 dduncan mugwump, I agree
04:52 shamu so this could be implemented in an intermediate sql layer that would generate the vendor-specific index creation, et al requests?
04:52 dduncan my Rosetta DBMS, which is to implement TTM, has swappable back-ends
04:53 dduncan I will make a simple one myself, which is for learning, and slow
04:53 dduncan I hope to use Genezzo as another fast powerful one
04:53 dduncan and many others can be made which actually sit over SQL databases, and generate tuned SQL and indexes for them
04:54 shamu or altenately, if someone wants to, they could rip the sql front-end off a free db (sqlite, etc) and use rosetta instead?
04:54 dduncan so if a SQL back end is used that can't tune itself (some actually can, to an extent), the Rosetta back-end for it will try to generate the most tuned SQL possible
04:54 dduncan that is possible
04:54 shamu if the proper interface layer is made available
04:54 dduncan replace the SQL layer with a Rosetta D layer
04:54 Nouk joined perl6
04:54 mugwump dduncan: have you looked at mnesia?
04:55 dduncan well, as it happens, SQLite does have a layered implementation; we could strip out the SQl parser and just use its virtual machine and btree and pager layers
04:55 audreyt yeah, a reusable vdbe sounds useful
04:55 dduncan however, in the short term I see better milage trying to use Genezzo instead of SQLite for that approach ... Genezzo is Perl for one thing, and it is a clustered database
04:56 dduncan look at sqlite.org
04:56 shamu sure.
04:56 dduncan despite the shortcomings of SQL, SQLite is a great product, one of my favorite SQL databases
04:56 dduncan sqlite.org has the specs for its structure there
04:56 shamu well, sql is not the database engine.  Like you said, relational dbs are oo to some extent, and sql is definitely not.
04:57 dduncan here: http://sqlite.org/arch.html
04:57 dduncan that has the architecture diagram
04:57 dduncan easy to read
04:57 dduncan I call things SQl databases that use SQl as their primary interface, and so their behaviour as a whole product is strongly influenced by it
04:58 * FurnaceBoy whispers Mnesia ..
04:58 dduncan yes, about that
04:58 dduncan I've never heard of Mnesia, will have to look
04:58 FurnaceBoy I was looking at it a while back, most intriguing
04:58 FurnaceBoy Erlang db
04:58 FurnaceBoy i.e. functional (not that I'm an expert on FP)
04:58 shamu so, on a related note ... is there anything like ruby on rails/activerecord that's usable as a framework under perl?
04:58 dduncan oh, any of you that didn't look at http://genezzo.com should do so now
04:58 mugwump erlang is an interesting language alright.  it has no mutable state :)
04:58 FurnaceBoy I did look at genezzo, also interesting
04:59 ayrnieu mugwump - no, it has mutable state.
04:59 FurnaceBoy thx for the link
04:59 wolverian shamu, catalyst, jifty
04:59 dduncan if you wanna put up links for Mnesia, Erlang, that may speed up people looking at them
04:59 dduncan er, urls
04:59 dduncan some irc clients turn 'em into links
04:59 FurnaceBoy www.catalystframework.org
04:59 ayrnieu start at www.erlang.org
05:00 dduncan I am aware of catalyst
05:00 dduncan its an mvc where you plug what you want
05:00 FurnaceBoy http://www.erlang.org/faq/x1351.html
05:00 FurnaceBoy ^ mnesia
05:00 dduncan I planned to make a Rosetta binding for it
05:00 dduncan or help someone do so
05:01 mugwump http://www.erlang.org/~hakan/mnesia_overview.pdf  # perhaps a bit heavy, but goes through the basics
05:01 mugwump ayrnieu: I recently had a description from someone who uses it about how it doesn't.  I don't know whether that was only under certain conditions etc.
05:02 mugwump he just said that each code pointer returns a pointer to the current state, so to change state you return a new state pointer that points to a replica of the old state, with the state changes in it
05:03 ayrnieu mugwump - processes have a local dictionary, which is not often used -- and anyway across processes 'state' can be kept easily enough in recursion loops that this is transparent.
05:03 ayrnieu mugwump - I've no idea what you just said.
05:04 dduncan now, if you guys are interested in doing this, please look at the lib/SeeAlso.pod file in my Rosetta distribution (in ext/ of pugs, and also on mugwump's utsl server), then go ahead and add links and descriptions to things
05:04 dduncan sometimes that's better than just telling me
05:04 mugwump ayrnieu: ok, I'll rephrease.  basically as I understood you can only return new state, not change old state.
05:05 dduncan but just edit one copy; I'll resync the other one with it regularly
05:06 ayrnieu mugwump - um, let's just say that Erlang does not have 'variables' and that it does not have mutable data structures, with the small exception of the process dictionary.
05:06 dduncan no mutable data structures?
05:06 mugwump :)  you'd have to be a lisp geek to understand it :)
05:06 dduncan is it supposed to be a ROM database engine?
05:07 mugwump no, you can create new structures, and the old ones get GC'd
05:07 ayrnieu dduncan - yes, there are no mutable data structures.
05:07 FurnaceBoy no -- you should read that Mnesia paper... it seems relevant to Rosetta ideas
05:07 mugwump basically a GC is constantly doing that anyway
05:07 mugwump (well, some do)
05:07 dduncan will try to look at it
05:07 FurnaceBoy s/no//
05:10 shamu dduncan, have you heard of 'Versant'?  They're an object database company, at least 13 years old at this point.
05:10 dduncan boing boing
05:10 dduncan shamu, I have not
05:10 shamu It's faster than a wingped pig on a lightning bolt, if I am to believe the t-shirt I got from my roomie.
05:11 dduncan but there are hundreds of db companies out there
05:11 dduncan can't track 'em all
05:11 shamu These guys were specifically focusing on object storage in databases back then.
05:11 dduncan however, I do plan for the Rosetta distro to have an index of all the other dbs, for reference
05:11 FurnaceBoy Kdb is supposed to be pretty fast ;-) and Genezzo seems to have a lot of potential ... love the low-level ops idea
05:11 dduncan and Genezzo is written in perl ... can any other db say that?
05:12 shamu pro'lly not
05:12 dduncan said index of other dbs will be in the SeeAlso.pod file ... my aggregation point of external links
05:13 dduncan anyway, Rosetta is in version control for a reason, you guys are welcome to make reasonable changes to it as you see fit, though perhaps stick more to adding stuff for now
05:13 dduncan like all those wonderful other projects people really should look at
05:17 mugwump ok, mnesia and genezzo are quite similar in some ways.  but mnesia is probably more robust, and offering much finer control over replication/transactions/etc, using the power of erlang
05:26 dduncan well, I'm going to bed ... good night!
05:26 * FurnaceBoy too
05:26 FurnaceBoy thanks for the interesting discussion
05:26 shamu good night
05:26 FurnaceBoy I hope this channel is logged, otherwise I was tempted to clip :)
05:27 dduncan it is logged, but I tend to clip such things and email them to myself for backup
05:27 dduncan after all, the log is huge, and where would you know to look
05:27 FurnaceBoy yeah.
05:27 FurnaceBoy nite
05:27 shamu http://colabti.de/irclogger/irclogger_log/perl6?date=2006-04-10,Mon
05:27 dduncan um, if any of you want copies, give me your email ... or clip yourself
05:28 dduncan yes, that's the log
05:28 shamu good, because that's what this guy 'dduncan' on that web page says too
05:29 shamu bbiab
05:30 audreyt TimToady: why allow non-whitespace in the
05:30 audreyt $x.   .foo
05:30 audreyt form of long dot?
05:31 audreyt I've implemented the whitespace-only variant
05:32 audreyt but I'd like to understand what the value is in
05:32 audreyt $x. foo(3) .bar
05:32 audreyt to be parsed as $x.bar
05:35 svnbot6 r9875 | audreyt++ | * Support for "long dot" in method calls:
05:35 svnbot6 r9875 | audreyt++ |     4.      .sqrt();
05:35 svnbot6 r9875 | audreyt++ |   Currently only whitespace is allowed between the two dots
05:35 svnbot6 r9875 | audreyt++ |   to save lookahead time; further clarifications needed to
05:35 svnbot6 r9875 | audreyt++ |   support the full form.
05:44 GeJ joined perl6
05:48 mugwump audreyt: isn't that to support method chaining?
05:48 mugwump eg, like the current practice of some authors to make a function that doesn't have anything else worth returning to return $self
05:49 mugwump so that you can go $object.do_this.do_that.do_something_else
05:49 mugwump except s/\./\n\t->/g :)
05:53 ayrnieu some authors?  Who doesn't do that?  GIVE ME THEIR NAMES.
05:55 mugwump it's an idiom that's makes me groan every time
06:01 gaal with 'given' this becomes less of an issue
06:03 avar joined perl6
06:13 dduncan left perl6
06:19 GeJ joined perl6
06:32 elmex joined perl6
06:44 Aankhen`` joined perl6
06:44 nothingmuch joined perl6
06:46 nothingmuch do we have a seen bot nowadays/
06:46 nothingmuch ?
06:47 Grrrr joined perl6
07:02 mugwump Hi all, I'm giving a talk tomorrow about doing perl 6 things on perl 5 today.  I've knocked out a structure for my talk, and would be interested in feedback.  particularly whether there are any recent developments I have overlooked.
07:02 mugwump the initial sketch is at http://www.utsl.gen.nz/talks/perl6.now/
07:02 nothingmuch spork spork spork spork spork
07:02 nothingmuch wasn't pX renamed lrep?
07:02 mugwump right, I'll fix that
07:03 nothingmuch ESLIDETOOLONG: http://www.utsl.gen.nz/talks/perl6.now/slide2f.html#end
07:03 nothingmuch make each project it's own slide
07:03 nothingmuch i like the haskell joke ;-)
07:04 mugwump thanks :)
07:04 nothingmuch what about 'use v5'?
07:04 nothingmuch err
07:04 nothingmuch v6?
07:04 mugwump ah yes, good point
07:04 nothingmuch actually, you have Module::Compile
07:04 nothingmuch just expand on it
07:04 * mugwump nods
07:05 nothingmuch again: one slide per topic:
07:05 nothingmuch http://www.utsl.gen.nz/talks/perl6.now/slide3g.html#end
07:05 nothingmuch also, abolish Contextual::Return
07:05 nothingmuch it is the work of satan!
07:05 mugwump heh
07:06 mugwump I'll tell dconway that the next time I see him :)
07:06 mugwump the plan is to talk a bit about each of those areas.  so I'll probably break up the slides a lot
07:07 mugwump going afk for a bit, travelling home ... will be back later on
07:14 drrho joined perl6
07:15 KingDiamond joined perl6
07:22 gaal seen jabbot
07:22 gaal nothingmuch: guess not
07:24 nothingmuch err, sorry, back
07:25 nothingmuch mugwump: i was just kidding about Contexttual::Return =)
07:41 Alias_ joined perl6
07:41 Alias_ audreyt: ping?
07:44 bsb joined perl6
07:50 mugwump thanks nm, I'll put it back :-P
07:59 nothingmuch mugwump: it's not very Perl 6 related
08:00 nothingmuch and it is pretty evil (what with the ties and all)
08:00 nothingmuch but that doesn't mean that dconway is satan ;-)
08:00 nothingmuch just... half way there
08:02 nothingmuch http://paste.scsys.co.uk/1073 (my YAPC::NA talk proposals)
08:16 lisppaste3 joined perl6
08:18 Alias_ You can never find a MakeMaker expert when you need one
08:19 buu Did I leave my bot in here/
08:19 nothingmuch audreyt: you'll be at YAPC::NA, right?
08:19 buu Oh I did. How nice.
08:21 elmex joined perl6
08:21 digwuren joined perl6
08:24 nothingmuch ingy: ping
08:24 nothingmuch stevan: ping
08:27 nothingmuch audreyt: ping
08:27 nothingmuch luqui: also ping
08:27 nothingmuch maybe
08:28 gaal hey nothingmuch, i submitted a 20 minute talk on smokes
08:28 nothingmuch you're going to YAPC::NA? yay!
08:28 gaal that's the plan
08:28 nothingmuch in that case we should collaborate
08:28 gaal okay. rub my back
08:28 nothingmuch i think i'm going to play the "Ooh! shiney" card
08:29 Alias_ on smokes?
08:29 Alias_ Why haven't I drafted you for PITA yet
08:29 Alias_ :)
08:29 gaal Alias_: 'make smoke'
08:29 gaal i'm not known to be a very draftable moose
08:30 Alias_ I was thinking more 'pita-server run pugs-smoke.xml platforms/*'
08:31 Alias_ What's the difference between smoke and test
08:31 gaal Alias_: make test is with the mainstream Test::Harness
08:32 gaal Alias_: make smoke is with util/yaml_harness.pl, a hacked up possibly-parallelizable harness that stores TAP output in yaml
08:32 gaal all our fancy tools use the make smoke output
08:32 Alias_ interesting
08:32 Alias_ I guess I'm just working in a slightly more abstract direction
08:33 gaal Alias_: then you want to look at Test::TAP::Model which is not related to serialization encoding
08:33 Alias_ Storing the entire output, TAP-inclusive, as XML documents, and lunching test runs inside of virtual machines
08:33 Alias_ Yeah, I've been watching the model stuff
08:33 Alias_ I'm hoping there's a good way for my to XSLT the PITA-XML out to something I can plug into that
08:33 Alias_ s/my/me/
08:34 Alias_ Which shouldn't be too hard, because the actual TAP details aren't XMLified
08:34 hcchien joined perl6
08:34 Alias_ Each test output is a saved as-is
08:35 nothingmuch Alias_: i'm currently generalizing that stuff
08:35 nothingmuch into a more "deployable" smoke server
08:35 Alias_ hmm
08:36 nothingmuch http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/SmokeServer
08:36 nothingmuch http://smoke.woobling.org/
08:36 Alias_ I was kind of going to just do all the platforms on one
08:36 nothingmuch well, that works
08:36 Alias_ By installing into the virtual machines
08:36 nothingmuch these are orthogonal =)
08:36 Alias_ true
08:36 nothingmuch the smoke server is just for displaying results
08:36 nothingmuch and collecting them
08:36 Alias_ oh, the analysis part?
08:36 nothingmuch yes
08:37 nothingmuch that's what gaal was talking about
08:37 Alias_ ok
08:37 nothingmuch make smoke creates a smoke report
08:37 nothingmuch anyway, that smoke server thing abuses tags with prefixes to hack a group-by like behavior
08:37 Alias_ If you were to install PITA::XML, take a look at PITA::XML::Install
08:37 nothingmuch so you have 'platform.osx' and if you "group by" platform you get the reports partitioned by platform
08:37 nothingmuch and also you can filter by tag, ofcourse
08:37 nothingmuch err, not right now
08:38 nothingmuch ETOOBUSY
08:38 Alias_ It would be interesting if you could convert a PITA::XML::Install object into a smoke report compatible with your system
08:38 nothingmuch reverse engineering oracle insanities
08:38 Alias_ ah
08:38 nothingmuch the smoke reports are really just TAP output
08:38 nothingmuch serialized into a deep hash
08:38 nothingmuch with some tags and timing info
08:38 nothingmuch think of tags as extended attrs
08:38 Alias_ A PITA::XML::Install is just the output of the C< perl Makefile.PL; make; make test >
08:38 nothingmuch theoreticallyh all of perl -V or pugs -V should go into tags if it affects the behavior of the system
08:38 Alias_ As a complete thing
08:39 Alias_ with metadata and such
08:39 nothingmuch ah
08:39 nothingmuch this is slightly lower level than make test
08:39 nothingmuch since it replaces Test::Harness
08:39 nothingmuch T::H is for humans
08:39 Alias_ sort of
08:39 nothingmuch Test::TAP::Model is for machines
08:39 nothingmuch (i mean our system)
08:39 Alias_ I'm working on a patch for Test::Harness that will make it dump a copy of each TAP run to a dir
08:39 nothingmuch err
08:39 Alias_ As a side effect
08:40 nothingmuch integrate it with Test::TAP::Model somehow
08:40 nothingmuch you can "parse" recorded taps with TTM
08:40 nothingmuch or you can replace Test::TAP::Harness::Straps
08:40 Alias_ Right, which is why I'm just recording the TAP
08:40 Alias_ As is
08:40 Alias_ As little analysis as possible happens inside the virtual machine
08:40 nothingmuch the diff is that if TTM replaces ::Straps you can capture timing info
08:40 Alias_ It just records
08:40 nothingmuch but that's usually overkill
08:40 nothingmuch aye
08:41 Alias_ Then the XML document gets extracted, and saved into a whopping DB
08:41 Alias_ So we can do whatever we like to it later
08:41 nothingmuch anyway, i suggest that your "hierarchal" report format contains a dump of Test::TAP::Model
08:41 Alias_ Why?
08:41 Alias_ Can't I build that later?
08:41 Alias_ Oh, right
08:41 Alias_ There's an <analysis> tag
08:41 Alias_ So you can attach post-processing anaylsis of various types
08:41 nothingmuch i mean in the object that analysis tools will get
08:41 Alias_ We'd just need to invent you a mime type :)
08:41 nothingmuch just because it's slightly STD
08:42 Alias_ STD?
08:42 nothingmuch standard
08:42 nothingmuch there are a few tools that abuse this already
08:42 nothingmuch see also http://sourceforge.net/projects/smolder
08:42 nothingmuch it's a more "serious" smoke server
08:42 Alias_ If Test::TAP::Model just processes TAP, then it's a post-processing stage
08:42 nothingmuch with deployment issues =/
08:42 nothingmuch again, Test::TAP::Model takes TAP and gives you an introspectable thing
08:42 nothingmuch like how many failed
08:42 Alias_ That's fine
08:42 nothingmuch how many passed
08:43 nothingmuch sub tests
08:43 nothingmuch etc
08:43 Alias_ I'll post-process it and attach
08:43 nothingmuch it's just a "view"
08:43 nothingmuch it can even be a temporary thing, such that the analysis server holds the "raw" TAP output and rebuilds the model on the fly
08:43 lypie joined perl6
08:43 nothingmuch think of it as a DOM for TAP
08:43 Alias_ Well, I don't care about the analysis so much
08:43 nothingmuch right
08:43 nothingmuch so it really doesn't matter where Test::TAP::Model fits in
08:44 * lypie waves to all
08:44 Alias_ At the moment I'm just building the enormous clusterable intrastructure part
08:44 nothingmuch i'm just lobbying that you use it in the API that you expose
08:44 Alias_ I expose XML
08:44 nothingmuch with CDATA?
08:44 Alias_ You send me a testing require file, I run it on the cluster, and you pull back the data afterwards
08:44 Alias_ requirement
08:44 nothingmuch sounds good
08:44 nothingmuch ... but you'll probably also release a perl library to futz the XML later, right?
08:45 nothingmuch *that* part should have TTM built in ;-)
08:45 Alias_ So <xml> ... run this package, on this set of platforms, etc etc, heres a GUID, etc </xml>
08:45 Alias_ Well, PITA::XML already exists
08:45 nothingmuch GUID?
08:45 Alias_ The system gobally uniquely stamps everything
08:45 Alias_ globally
08:45 Alias_ Globally Unique Identifier
08:46 Alias_ So if you want to throw pugs at 50 platforms, you just give a request
08:46 nothingmuch yeah
08:46 nothingmuch i was just unfamiliar with GUID
08:46 nothingmuch i know UUID
08:46 Alias_ What you do with the resulting mountain of data is up to you (for now)
08:46 nothingmuch what's the diff between em? the TLA?
08:47 Alias_ Same thing I believe
08:47 Alias_ Might be subtle differences if you ask an expert
08:47 nothingmuch ah
08:47 nothingmuch anyway, i'm still lobying for PITA::XML to have Test::TAP::Model somewhere for ease of use
08:48 nothingmuch so that you could take a PITA::XML and make a Test::TAP::HTMLMatrix in 2 lines of code
08:48 wilx joined perl6
08:48 Alias_ As I said, it has an <analysis> section
08:49 nothingmuch err, no
08:49 Alias_ So you can attach completely arbitrary analysis to the document
08:49 nothingmuch not XML data
08:49 nothingmuch just perl side
08:49 nothingmuch it's not a part of the document
08:49 Alias_ oh, there
08:49 nothingmuch it's a view on the core data of the document
08:49 Alias_ ok
08:49 nothingmuch it's just glue =)
08:49 Alias_ Well, it would bloat the deps
08:49 nothingmuch sub tap_as_model {
08:49 Alias_ deps, not core
08:49 Alias_ err code
08:49 nothingmuch    eval { require Test::TAP::model } or die "Test::TAP::Model is required to invoke this method";
08:50 Alias_ Better on the other side
08:50 nothingmuch    ...;
08:50 nothingmuch }
08:50 Alias_ sub new_from_pita_xml { ... }
08:50 nothingmuch fair enough
08:50 Alias_ Since there's not question that you have the XML module on the from side
08:50 Alias_ no
08:50 nothingmuch patches welcome =)
08:50 Alias_ If I ever get that far
08:50 Alias_ Currently trying to finish the tests for the core test loop
08:50 nothingmuch for repo in http://nothingmuch.woobling.org/Test-TAP-{Model,HTMLMatrix}; do darcs get $repo; done
08:50 Alias_ Waiting on a 1-2 meg specialised linux image
08:51 Alias_ Apparently nobody can build one
08:51 nothingmuch why 1-2 meg?
08:51 nothingmuch isn't ~40 meg more common?
08:51 Alias_ So it's safe to upload to CPAN without too much bloat
08:51 nothingmuch oh
08:51 * nothingmuch wouldn't want to go into *that*
08:51 Alias_ And yeah, 50 meg are more common
08:51 Alias_ But the whole "boot floppy" era did exist at one point
08:51 nothingmuch i'd post a bit torrent client that can auto install for you
08:51 nothingmuch instead of a copy
08:52 Alias_ That's a pretty heavy Makefile.PL
08:52 nothingmuch i.e., you run it, and it says "no virtual platforms are configured, would you like me to download them?"
08:52 Alias_ And there are no Perl bittorrent clients
08:52 nothingmuch "would you like me to run under $vm_engine? do you have it installed?"
08:52 Alias_ Also, it's like 1-2 meg
08:52 nothingmuch i thought there was
08:53 nothingmuch it's theoretically 1-2 megs
08:53 Alias_ Google funded one, and paid up, but it failed
08:53 nothingmuch theoretically it's 40 megs
08:53 nothingmuch and not just linux
08:53 nothingmuch so theoretically it's 100-300 mb of small OSs ;-)
08:53 Alias_ Well, it's "an OS that can wget a fixed URI"
08:53 Alias_ That's it
09:10 tifo_ joined perl6
09:19 tifo_ \exit
09:20 tifo_ \quit
09:20 Alias_ other slash
09:20 Alias_ :)
09:22 hugues23 joined perl6
09:33 marmic joined perl6
09:46 bsb joined perl6
09:47 tifo joined perl6
09:49 ruz joined perl6
09:49 lypie left perl6
10:00 nothingmuch looking at the coverity stuff in p5p
10:00 nothingmuch i think i'm getting ideas on how the pluggable "optimizer" API can be used for regular warnings, code critique like coverity, as well as optimizations
10:00 * nothingmuch tries to remember this for his talk
10:00 pmurias_ nivk pmurias
10:02 nothingmuch pmurias: don't you mean "m/gs NickServer IDENTIFY secret" ?
10:02 nothingmuch ;-)
10:02 gaal nothingmuch: hey! how did you know my password!
10:03 nothingmuch hmm
10:03 nothingmuch i see no nick colliding ;-)
10:04 nothingmuch all: gaal's passwd is not "secret" ;-)
10:04 pmurias have you checked? :)
10:04 nothingmuch yes
10:06 pmurias my freenode password i 100% secure even i don't know it
10:07 pmurias s/i/is/
10:10 pmurias nothingmuch: shouldn't the "optimizer" api get much lower level form then code critique needs?
10:11 nothingmuch pmurias: aha
10:11 nothingmuch exactly
10:11 nothingmuch the idea is that an optimizer, a warner, an other thing, etc are all just functions
10:11 nothingmuch AST -> AST
10:11 nothingmuch e.g. String -> ParseTree is the parser
10:12 nothingmuch and a lint function might be ParseTree -> ParseTree
10:12 nothingmuch and an optimizer might be at ParseTree -> ParseTree *and* AST -> AST simultaneously
10:12 nothingmuch if it's generalized it can just be the same API
10:13 nothingmuch the top down-ish approach that the whole Perl 6 community is taking WRT perl 6 kind of ensures that this will happen
10:18 azuroth roar
10:19 pmurias it would be nice to be able to specifiy what sort of things you want to have removed/simplified in the ast you get?
10:19 pmurias s/?/./
10:21 nothingmuch pmurias: no, just think of it as pipeline plugins and meta plugins
10:21 nothingmuch for example, the peep hole optimizer is e.g. [PeepHoleSubOptimizer] -> AST -> AST
10:22 nothingmuch and then it recurses the tree, tries to match the sub optimizers to tree nodes, and then return a transformed tree
10:22 nothingmuch so the peephole optimizer is a meta plugin
10:22 nothingmuch (meta = pluugin that has other plugins)
10:22 nothingmuch if this whole pipeline is not hard coded
10:22 nothingmuch and not glued together like in Perl 5
10:22 nothingmuch then we are in a good shape
10:23 nothingmuch because unforseen extensions should be easier to write
10:25 pmurias you could add a new optimiser, instead of rewriting your code in a faster but uglier way?
10:26 nothingmuch potentially yes
10:27 nothingmuch i hope that the next generation of languages will let the users start prefering beautiful code over fast code
10:27 nothingmuch right now it's either or
10:27 pmurias neither
10:27 nothingmuch i believe that with good enough toolchains beautiful code can be faster than fast code ;-)
10:27 nothingmuch because beautiful code carries over much semantic meaning
10:28 nothingmuch "fast" code like one might write in C is not portably fast, usually
10:28 nothingmuch if you really want to be fast you #ifdef on your processor type, etc etc
10:28 nothingmuch and even so, some things simply cannot be expressed in their most simpler form
10:28 nothingmuch otoh a language such as haskell is free to choose the implementation strategy of a function application
10:29 nothingmuch in a few years I hope that systems like GHC and Perl 6 will choose the simplest runtime system that can work for a given chunk of code for a given processor and for a given data set
10:29 nothingmuch so that computers will be better at optimizing than humans 99% of the time
10:29 nothingmuch and people will have no more excuses to write "high performance" code
10:30 nothingmuch and the people who will really need that speed will have to do the next big step: design custom hardware
10:30 nothingmuch which is a much more valid option than writing unreadable code
10:30 nothingmuch anyway, $musings.disable
10:30 pmurias perl6 machines :)
10:31 kane__ joined perl6
10:32 nothingmuch pmurias: i was thinking more like "crypto chips" or "compression chips" or "Graphics cards"=
10:32 nothingmuch oh wait ;-)
10:32 gaal are perl6 machines made of camel hair?
10:33 azuroth I want to wear moosehair underwear.
10:33 gaal azuroth: http://forum2.org/moose/moose08.html
10:34 nothingmuch gaal: i linked to that a few days ago
10:34 azuroth hahaha, what the hell
10:34 nothingmuch we were having a "my moose is bigger" discussion in #catalyst
10:34 gaal alternatively http://forum2.org/moose/moose16.html
10:34 nothingmuch i blame you =)
10:34 gaal by all means blame me
10:34 nothingmuch not many people have the privilige of being responsible for a mainstream obsession
10:34 nothingmuch the pokemon guys
10:35 nothingmuch the tamaguchi guys
10:35 nothingmuch though that was short lived
10:35 gaal of course, you didn't feed it
10:35 nothingmuch and Gaal Yahas =)
10:35 nothingmuch haha
10:35 azuroth papervision monocolour... :-)
10:35 nothingmuch azuroth: what's that?
10:35 gaal dolby antler in selected browsers!
10:35 nothingmuch oh
10:35 azuroth http://forum2.org/moose/moose01.html
10:36 nothingmuch papervision
10:36 nothingmuch yeah, that's because it's a real book in Gaal's apartment =)
10:36 azuroth haha :D
10:36 pmurias can one remove roles from an object?
10:37 nothingmuch pmurias: yes, we just don't have a syntax for that yet =)
10:37 gaal pmurias: why would you want to do that? :)
10:37 nothingmuch it's like my $x = $y but Foo;
10:37 nothingmuch i'm not sure if it's a coercion
10:37 nothingmuch or a different "view" into the same object
10:37 nothingmuch i think it's more like the second
10:37 azuroth hmm. interesting
10:37 nothingmuch it's probably something like 'my $z = $x but !Foo'
10:37 nothingmuch or butn't
10:38 nothingmuch ;-)
10:38 gaal I don't get it, if we have structural typing then, uh, you can remove a role if you break one of the methods
10:38 nothingmuch the &prefix:<!> method in Class returns an overloaded object that *removes* that class when assigned to the metaclass's inheritence list ;-)
10:38 nothingmuch gaal: think of the operation as:
10:39 nothingmuch my $new_class = $x.meta.clone
10:39 gaal do you want something like mixing in everything but removing the trace of having mixed it in from a particular role?
10:39 nothingmuch $new_class.does( Foo ); # appends
10:39 nothingmuch my $y = bless $x, $new_class; # it mgihtb e bless $x.clone, $new_class
10:40 pmurias gaal: if want to mix stuff out, $fido but !Bite
10:40 gaal <pmurias nothingmuch>, you are insane
10:40 nothingmuch as for conflict resolution (or unresolution) in role (de)composition:
10:40 theorbtwo That, or create a new op with the same category as but, called "without".
10:40 nothingmuch you simply get a runtime conflict if something insane is happenning =)
10:40 nothingmuch or a compile time one if that can be inferred
10:40 azuroth gaal++
10:40 stclare joined perl6
10:41 KingDiamond joined perl6
10:41 nothingmuch theorbtwo: but is more general than this
10:41 nothingmuch it's the "add a role at runtime or otherwise annotate" operator =)
10:41 gaal azuroth: what, I get karma for calling people insane? Surely I'll be a moose in my next life
10:41 nothingmuch so presumably it's a short cut to a better named "mix in a role" method
10:41 nothingmuch which could be negated
10:41 azuroth you get karma for being right
10:42 gaal ah. 1+1 == 2!
10:42 nothingmuch azuroth: uh, if you can add a role at runtime, why can't you take one away?
10:42 nothingmuch let's say you were implementing a role playing game ;-)
10:42 nothingmuch my $elf = Elf.new; # initial
10:42 azuroth sorry, I'm only half serious
10:42 nothingmuch # elf finds scroll
10:42 nothingmuch $elf = $elf but Wizard;
10:43 nothingmuch (sorry, i don't know RPGs well, so the actual fnords I'm using are probably lousy)
10:43 nothingmuch the idea is that since an object can change it's member data during it's life
10:43 gaal nothingmuch: hw 3
10:43 nothingmuch then most people either create a new object or change the member data in ugly ways
10:43 nothingmuch in order to do a big change
10:44 pmurias you change it's role,right?
10:44 nothingmuch if we allow objects to transcend between classes (properly! not just rebless but with well known hooks and stuff, much like coercion) and roles then we can clean this up
10:44 nothingmuch pmurias: you *add* a role
10:44 azuroth I haven't really looked into roles much. but what if Elf and Wizard both implement two same methods?
10:44 nothingmuch azuroth: role composition says that it's a conflict
10:44 nothingmuch == fatal runtime error
10:44 azuroth oh, excellent
10:44 nothingmuch *OR* fatal compile time error
10:44 azuroth I like it.
10:44 nothingmuch i'll give a practical example
10:45 nothingmuch this one time i implemented a pop server in perl 5
10:45 nothingmuch i love perl 5 much more ever since
10:45 nothingmuch i'll love perl 6 even more since it will let me do it better
10:45 nothingmuch the pop3 protocol specs that most command have exactly the same syntax:
10:45 nothingmuch my ( $cmd, @args ) = split;
10:46 nothingmuch so you have a socket listener
10:46 nothingmuch that reads lines
10:46 nothingmuch and then does eval { $obj->$cmd( @args ) }
10:46 azuroth there's the trait handles... can you go "$x but $y handles<Foo>" ?
10:46 nothingmuch (with some more scrubbing to make sure that $cmd is just \w+, etc)
10:46 nothingmuch then $obj reblesses itself into new protocol states
10:47 nothingmuch you get the same benefits of implementing it as a state machine with e.g. Workflow
10:47 nothingmuch but with FAR less code
10:47 pmurias how can one define self excluding roles, if i mix one in, the other gets mixed out?
10:47 nothingmuch that operates in a domain you're already familiar with (classes and methods, not XML files for states and transitions and crap like that)
10:47 nothingmuch pmurias: good question
10:47 nothingmuch p6l it?
10:48 azuroth interesting.. cool!
10:48 theorbtwo It is a pretty nifty idea.
10:48 nothingmuch the reason I liked Perl is that it was lax enough to just let me do that reblessing stuff in place without anyone really caring =)
10:49 nothingmuch It Just Worked™
10:49 nothingmuch in C++ i would have to make all of these things virtual, and do weird in place assignemnts, reallocate, etc etc
10:49 nothingmuch that is, I could pull it off
10:49 pmurias nothingmuch: i'll subscribe to p6l and ask it
10:49 nothingmuch but the overhead towards pulling it off would outweigh the gained simplicity
10:50 gaal well, in p5 everything is virtual
10:50 nothingmuch ofcourse =)
10:50 nothingmuch even more than that
10:50 nothingmuch delegated vtables
10:50 nothingmuch that are really a deep structure
10:51 nothingmuch with symbolic lookups =)
10:51 azuroth what, like go new OtherTypeOfPop, putting the value where 'this' currently is, or something magic? or a wrapper class I guess.
10:51 gaal so my question is, if you need this kind of polymorphism, why insist on using roles?
10:51 nothingmuch gaal: it's just another way to do it
10:51 gaal sure
10:51 nothingmuch gaal: and a pretty clean one
10:51 gaal but it stresses roles hella lot
10:51 nothingmuch i dunno:
10:51 gaal because their point is that things are mixed in
10:52 nothingmuch my $user = $user but Admin;
10:52 nothingmuch i like that
10:52 gaal plus, what do you do with things that ain't code?
10:52 pmurias gaal: what should be used instead classes?
10:52 nothingmuch it says "from here on, treat it as ...."
10:52 nothingmuch member data and method names are treated the same in role composition:
10:52 nothingmuch private names are "masked", i.e. they don't conflict
10:52 gaal pmurias: way I imagine it, what nothingmuch did in p5 should still be possible in p6, yes
10:52 nothingmuch and public ones explode
10:52 nothingmuch loudly
10:53 nothingmuch gaal: what I did in perl 5 was still quite "hacky"
10:53 nothingmuch with runtime role composition it would have been cleaner
10:53 kanru joined perl6
10:53 gaal nothingmuch: it's decomposition that scares me :)
10:53 nothingmuch symmetry =)
10:54 gaal oh, is there a summary of masking somewhere?
10:54 gaal $:x_from_roleA
10:54 gaal $:x_from_roleB?
10:55 gaal it's all in the metamodel?
10:56 gaal $self.meta.roleA.x ?
10:57 nothingmuch gaal: err
10:57 nothingmuch the idea is that roleA and roleB are talking about different things
10:57 nothingmuch which they both named 'x'
10:57 nothingmuch but that aren't the same
10:57 nothingmuch they are implementation details
10:57 nothingmuch you can probably just say $self.RoleA::x or something
10:58 gaal indeed
10:59 gaal the methods in the roles just say $:x, yes?
10:59 nothingmuch yes
10:59 nothingmuch sorry, i need to fade out
10:59 * gaal wonders how $self.yaml (for example) should show this
10:59 nothingmuch someone else can play demagogue instead =)
10:59 nothingmuch probably with fully qualified names
10:59 azuroth I'll dem your gog
10:59 gaal me too, c++ unfun wants me
10:59 nothingmuch oracle reverse engineering wants me =(
11:00 nothingmuch they are insane
11:00 nothingmuch string lengths are stored in duplicate for strings under 255 chars long
11:00 nothingmuch one right beside the string
11:00 nothingmuch the other several bytes before
11:00 nothingmuch when it overflows 255 then one of these becomes the magic number 0xFE40
11:00 nothingmuch the other is '02 xx xx'
11:01 nothingmuch where 02 is thw width of the int field
11:01 nothingmuch etc etc etc
11:01 nothingmuch numbers are always returned +1
11:01 nothingmuch i suspect that 0 means NULL in the result table
11:01 nothingmuch but i've yet to verify that (been concentrating on queries, not results)
11:01 nothingmuch *sigh*
11:01 azuroth for what purpose are you doing this?
11:04 chris2 joined perl6
11:05 nothingmuch azuroth: work
11:05 azuroth sounds interesting work
11:06 nothingmuch yes
11:06 nothingmuch but frustrating too
11:06 nothingmuch reverrse engineering is never more than 70% finished, i think
11:06 nothingmuch for binary protocols anyway
11:07 azuroth hmm. that wouldn't surprise
11:07 gaal hmm, won't DBD::Oracle be useful for this stuff?
11:08 gaal or that pure java driver, i forget what they call it
11:08 gaal (tight client?)
11:09 nothingmuch gaal: IIRC yes
11:09 nothingmuch but ENOTIME
11:10 nothingmuch DBD::oracle links to OCI
11:10 nothingmuch so the "good parts" are effectively closed source
11:10 nothingmuch is the pure java client opensource?
11:10 gaal wow, that hash thing mentioned on perl-il really does look like a bug
11:11 gaal don't think so, oracle provide it IIRC but maybe the sources are there
11:11 nothingmuch hmm
11:11 nothingmuch i will have a second look
11:11 nothingmuch boss told me something about it
11:11 gaal jars often do
11:11 nothingmuch but I think he said it was closed
11:12 gaal decompile :)
11:13 gaal i one word he told me secret of success in revengineering
11:13 gaal heh heh it isn't a DD bug, he used a dot instead of a comma
11:14 nothingmuch hahahahaaaaaaaaaaaaaa
11:14 nothingmuch gaal++
11:14 nothingmuch i thought it was something like that where the keys became scalars in the first example
11:14 nothingmuch but '= >' didn't make sense like that
11:16 * gaal did reply with the answer, but it's in his hashcash queue
11:16 tifo joined perl6
11:19 hlen joined perl6
11:20 ingy nothingmuch: pong
11:21 * azuroth intercepts the ball
11:25 ingy :p
11:25 lichtkind joined perl6
11:28 lichtkind Tim Toady hello i have maybe foun inconsistence in the ops may i ask something?
11:28 gaal lichtkind: maybe just ask on perl6-language?
11:29 gaal (the mailing list)
11:29 azuroth or just hope he or audreyt will backlog it
11:29 lichtkind gaal like this one http://dev.perl.org/perl6/lists/ ?
11:31 azuroth yep
11:34 frederico joined perl6
11:52 gaal are there substitution objects? my $s = s/<rule1>/replacement/
11:52 gaal or is a closure the way to capture that?
12:01 nnunley joined perl6
12:14 kolibrie joined perl6
12:33 bsb gaal: does s/// still default to $_?
12:33 azuroth surely
12:35 gaal yeah i hope so :)
12:35 gaal bsb: also, moose
12:40 bsb s/gaal/what are substitution objects?/moose
12:45 fordinal joined perl6
12:48 nothingmuch ingy: will you be at YAPC::NA?
12:48 SamB joined perl6
12:48 nothingmuch gaal: ping too on that topic, actually
12:48 nothingmuch would you guys want to share a room?
12:49 nothingmuch also, bsb: some guy on the Catalyst mailing list has been complaining for about a week now that CGI::Expand won't install on windows, and that you don't respond to mail
12:51 bsb nothingmuch: haven't seen any mail... got a url?
12:51 nothingmuch yes, one sec
12:51 nothingmuch bsb: http://lists.rawmode.org/pipermail/catalyst/2006-April/006303.html
12:52 nothingmuch the thread winds down to "don't reinvent the wheel"
12:52 nothingmuch and then subsequently he says "well, i'll keep my reinvented version because CGI::Expand doesn't install on Windows"
12:56 gaal nothingmuch: yes i would, I'd also like to know about hackathon der^Htails in advance so I can plan my trip
12:57 azuroth night, all!
12:57 gaal putter said something about hackage in boston but I haven't seen him around since $jabbot_knows_when
12:58 gaal night azuroth
12:58 Qiang joined perl6
13:04 PolettiX joined perl6
13:07 mshiltonj joined perl6
13:07 bsb nothingmuch: C::Expand 2.02 tries to avoid unixisms in the Makefile.PL output, but I windows testing will need to wait
13:07 nothingmuch bsb++
13:08 * nothingmuch goes home
13:13 vel joined perl6
13:14 jserv-- joined perl6
13:14 fglock joined perl6
13:15 svnbot6 r9876 | fglock++ | PC-Tokenizer - added 'prefix'; TODO
13:18 pmurias hi fglock
13:19 spinclad bsb: the moose operator is $_$, not $_?
13:19 spinclad                            U
13:20 pmurias what does it do, enforce moose context?
13:21 spinclad i'm not really sure... anything a moose can do, i expect, which is a Lot.
13:21 gaal well, you can protect anything with moose quotes: (:{ anything }:)
13:22 spinclad #:( anything at all ):#
13:22 spinclad #:(new style comment):#
13:22 gaal spinclad: except "):#"   :-)
13:23 spinclad true, true
13:24 spinclad #:{ even }:#
13:24 mshiltonj left perl6
13:24 Limbic_Region joined perl6
13:24 spinclad mugwump: 'perl 6 begat haskell, whence pugs came': wed not begat; of their begetting came pugs... (and the same again with lrep)
13:25 spinclad mugwump: 'Haskell bootstraps with perl5': huh.  i wasn't aware of a haskell implementation in lrep... :)
13:25 spinclad mugwump: nor a pugs one, for that matter, though at least interest and maybe work already on reimplementing the Parsec parts in Perl6 rules
13:26 spinclad (and thus lrep / PGE)
13:26 lumi Haskell actually does afaik bootstrap with p5
13:26 gaal @google evil mangler
13:27 spinclad ah, that's what i was missing there, thanks
13:27 lumi I guess it can't be glorious when bootstrapping
13:27 gaal "It derives it evilness from its utterly ad hoc, machine, compiler, and whatnot dependent design and implementation" - note, not a word about perl
13:28 fglock pmurias: hi
13:28 lumi They're not allowed to say bad things about Perl anymore :P
13:29 gaal nah, that doc has been around for a while
13:29 gaal # http://www.cse.unsw.edu.au/~chak/haskell/ghc/comm/the-beast/mangler.html
13:29 spinclad lumi: which haskell?  ghc, hugs, or something i should already know about just named 'Haskell'?
13:29 lumi ghc
13:29 lumi Mea maxima culpa
13:30 spinclad nulla culpa
13:30 Alias_ lichtkind: ping?
13:31 spinclad (of course lots of things bootstrap with 'perl Configure.pl' these days...)
13:32 pmurias whats the best way to search the p6l archive google,asking the list manager for old messages...?
13:33 fglock is someone interested in starting a new p5-pugs module? - an operator-precedence parser that uses Pugs-Compiler-Tokenizer
13:37 pmurias fglock: i could do it but i have to finish Embed::Parrot first
13:41 fglock pmurias: cool - so I'll keep working on the tokenizer for a while
13:41 kolibrie fglock: I have very few tuits, but it sounds interesting
13:42 bsb ingy: Is YAML::SortKeys gone?
13:44 Alias_ left perl6
13:45 fglock the op-precedence parser can reuse the algorithm in PGE - as in misc/pX/tewk/Rules-P5 - but it needs to be adapted to accept AST as tokens
13:45 fglock (or Match objects)
13:55 justatheory joined perl6
13:58 Limbic_Region fglock - were you able to get Parse::Yapp to work as your shift-reduce parser with the p6 tokens?
13:59 fglock Limbic_Region: no, I need something that can accept objects as tokens - but the algorithm can be reused
14:15 Limbic_Region fglock - is it as simple as subclassing so that a token is first checked if it is an object and if so a method is called to obtain the token or is it more complicated than that?
14:15 * Limbic_Region is mildly interested in helping but only mildly
14:16 fglock it doesn't look so easy - Parse::Yapp is a compiler - it takes a text as input
14:17 fglock I mean, it takes a text as the specification
14:18 fglock while the p6 specification is based on tables
14:18 Limbic_Region ok - well, if there is some non-thinking grunt work you could have me do - let me know (emphasis on the non-thinking part)
14:19 fglock I didn't find a clear explanation of the shift-reduce algorithm yet - that would help
14:21 Limbic_Region ok - and I assume that inlcudes the one on wikipedia
14:21 Limbic_Region so basically if I find something that I can understand then you can understand it too
14:21 fglock yep
14:21 Limbic_Region gotcha - will look around
14:21 fglock thanks!
14:21 Limbic_Region most of what I saw was focused on C
14:22 Limbic_Region I will look for a language independent clear explanation of the algorithm
14:23 PerlJam Isn't it just shifting tokens onto a stack and when they match a production, they're "reduced" to that production?
14:24 fglock PerlJam> basically, yes - but you have to check for circumfix/postcircumfix, etc
14:24 * gaal actually sees the Evil Mangler for the firt time and is amused to find it is written in Literate Perl
14:25 gaal (TeX-style)
14:25 fglock and it must be correct and well tested
14:26 sockstat joined perl6
14:32 pmurias fglock: there is a clear explanation of the shift reduce algorithm in the book "lex and yacc" by o'reilly
14:32 pmurias reread and explain it to you if you want
14:33 pmurias i could
14:33 svnbot6 r9877 | fglock++ | PC-Tokenizer - add_rule() creates new tokens; recompile() refreshes the
14:33 svnbot6 r9877 | fglock++ | internal tables
14:35 Limbic_Region fglock - I have found a combination of 3 links that I think do a fairly adequate job (when combined) of everything that you need to know
14:35 fglock pmurias: I'll check if they have the book in the library
14:36 pmurias do you need to know how it works, or how to implement it?
14:36 fglock pmurias: both, because I need to be able to modify it
14:37 fglock Limbic_Region: can you paste the links?
14:37 Limbic_Region err, I just /msg'd them to you
14:37 Limbic_Region http://www.cs.binghamton.edu/~zdu/parsdemo/srintro.html # introduction to shift-reduce parsing
14:37 fglock I see it now :)
14:38 Limbic_Region http://www.cs.rpi.edu/~gregod/Sugar/doc/design.html # Shift/Reduce Expression Parsing
14:38 Limbic_Region http://www.cs.grinnell.edu/~rebelsky/Courses/CS362/2004S/Outlines/outline.20.html # Compiler class outline for shift-reduce parsing
14:39 Limbic_Region The last one comes in 3 parts
14:40 pmurias fglock: you have o'reilly books in your library?
14:41 fglock pmurias: I have some
14:44 Limbic_Region woah - my library has Safari access from remote locations - just enter your library card number
14:44 * Limbic_Region needs to get a library card
14:45 Limbic_Region even better - I can register for a card online
14:48 pmurias Limbic_Region: where do you live?
14:48 Limbic_Region Odenton, MD
14:49 * Limbic_Region has to wait about a week for the card to show up
14:51 pmurias Limic
14:51 Limbic_Region ?
14:51 pmurias typo
14:52 pmurias you aren't talking about your town library for sure?
14:52 Limbic_Region yes
14:55 Limbic_Region why?
14:57 pmurias in mine it's only forth an fortran and they won't let you borrow a book, just wanted to now what is the state of library service elsewhere
14:57 pmurias s/an/and/
14:58 Limbic_Region oh, well I have never used this library - we moved here less than a year ago and I am a big fan of owning books versus borrowing them
15:02 svnbot6 r9878 | fglock++ | PC-Tokenizer - 'term' checks for modifications in the base categories
15:04 fglock I often donate perl books at YAPC meetings (after reading them) - I usually don't read a book twice
15:05 fglock but I have a few 'historical' ones - like a 1964 Fortran book
15:08 hlen joined perl6
15:08 hexmode joined perl6
15:09 Limbic_Region fglock - http://web.mit.edu/gnu/doc/html/bison_toc.html may be of some interest as well though it is specifically focused on bison
15:10 * Limbic_Region mostly uses books as reference and started collecting them when he found that, after giving several away after reading them, they were out of print
15:10 fglock Limbic_Region: thanks
15:10 fglock lunch &
15:26 hlen_ joined perl6
15:35 autark joined perl6
15:42 cdpruden joined perl6
15:46 * kolibrie suddenly realizes Limbic_Region lives less than an hour away (given good traffic conditions)
15:46 PerlJam kolibrie: planning a hit or just stalking?  :)
15:47 kolibrie PerlJam: my life is too boring for either
15:47 Limbic_Region kolibrie in what direction?
15:47 kolibrie Fairfax
15:47 FurnaceBoy joined perl6
15:47 Limbic_Region oh, well you are being extremly optimistic about good traffic conditions then
15:48 Limbic_Region last time I was in FairFax it was to meet jdporter (PerlMonks) for drinks, filipino food, and karaoke
15:48 PerlJam He may have also been factoring in his normal average speed.
15:48 kolibrie I only drive to MD before 7:00 Saturday mornings
15:49 Limbic_Region well - if you happen to be in the Baltimore area and want to meet, let me know
15:49 kolibrie Limbic_Region: sure
15:49 Limbic_Region it is a bit more difficult these days with a new baby to just do things without planning but with a day or two notice most anything could be arranged
15:50 ingy bsb: shouldn't be
15:52 kolibrie Limbic_Region: I usually make plans days or weeks in advance (we have three small kids)
15:58 bsb ingy: you're right, I was misled by:
15:58 justatheory joined perl6
15:58 bsb perl -w -MYAML -e '$YAML::SortKeys = 0'
15:58 bsb Name "YAML::SortKeys" used only once: possible typo at -e line 1.
15:58 bsb but it still actually works
15:58 ingy yeah, so?
15:59 ingy doesn't Data::Dumper do the same thing?
15:59 gaal yes
15:59 ingy it's just a global var
15:59 bsb It was just a new warning
15:59 gaal eg if you want to fudge DD::Indent you need to no warnings 'once' it
15:59 bsb no big deal
15:59 gaal or += 0 it
16:00 gaal or $^W = 0 :)
16:01 ayrnieu YAML and DD::Indent could just export a subroutine to change this.
16:02 gaal YAML.pm and YAML::Syck should both have class method variants for Dump and Load etc, so it becomes easy for client code to do $YAMLCLASS->Load(..)
16:02 gaal also people should buy ingy a beer
16:03 gaal also my cat should not attempt to eat this fly
16:03 bsb I owe ingy soooo many beers
16:03 gaal I'm just sayin'.
16:04 ingy :D
16:04 ingy I LIKE BEER
16:05 ingy and coffee too
16:06 FurnaceBoy mmmmmmm coffee
16:06 FurnaceBoy thanks for reminding me
16:06 FurnaceBoy I knew there was something missing from my morning
16:08 gaal it's a tricky business, expecting us to remeber coffee in the morning before we've had our coffees
16:09 gaal &
16:09 bsb ingy, if I make it to taipei from hong kong I'll repay me debts
16:11 ingy bsb: cool
16:11 ingy how long are you there?
16:12 bsb 19/april - 3/may
16:12 bsb this time
16:13 xinming joined perl6
16:19 pdcawley_ joined perl6
16:32 ilogger2 joined perl6
16:40 fglock joined perl6
16:42 ghenry joined perl6
16:48 chovy joined perl6
16:48 svnbot6 r9879 | fglock++ | PC-Tokenizer - added 'infix' category
16:48 chovy anybody know what app was used to create this chart? http://www.pugscode.org/images/container.png
16:49 wolverian visio, I believe
16:49 gaal anyone around who groks higher-order types?
16:50 gaal in haskell
16:50 wolverian I might, if you tell me what they are
16:50 wolverian :)
16:50 gaal :)
16:53 FurnaceBoy lol@gaal coffee
16:54 wolverian hrm coffee might be a good idea
16:54 wolverian thanks!
17:04 chovy those icons look like KDE
17:05 wolverian they do.
17:05 wolverian .o(Crystal?)
17:07 _bernhard joined perl6
17:31 david_ joined perl6
17:42 justatheory joined perl6
17:44 rindolf joined perl6
17:44 rindolf Hi all!
17:44 rindolf TimToady: here?
17:46 fglock rindolf: hi
17:46 rindolf fglock: hi! What's up?
17:47 fglock I'm working on p5-pugs - I could use some help :)
17:47 arcady joined perl6
17:53 fglock rindolf: re pessach - look for 'matzo-man' in google
17:56 rindolf fglock: OK.
17:57 rindolf fglock: is p5-pugs the pugs Perl 5 compiler backend?
17:57 fglock it's 'pugs', but written in p5
17:59 rindolf fglock: so you're re-writing pugs in perl5?
18:01 larsen joined perl6
18:04 fglock the very early initial plan for bootstrapping p6 was to write it in perl5 - it's much easier now that we have more detailed synopsis and Pugs and Parrot experience
18:05 rindolf fglock: I see.
18:06 TimToady rindolf: you rang?
18:06 rindolf TimToady: yes.
18:07 rindolf TimToady: we finished transcribing http://wiki.osdc.org.il/index.php/Larry_Wall_-_Present_Continuous,_Future_Perfect . You may wish to proof read the transcription.
18:07 TimToady okay, thanks.
18:09 rindolf TimToady: no problem.
18:11 TimToady audreyt: just refactored long dot to take only <ws>, but of course that now includes #(comment) so you can still write foo.#<bar>.baz and mean foo.baz. #() is now officially whitespace rather than non.
18:13 wolverian that's a bit weird when using <ws> outside perl6 source
18:14 TimToady or whatever the <ws> rule is in Perl 6's grammar...
18:14 TimToady it can be <p6ws> to match #() etc.
18:15 TimToady was just trying to abbreviate "whitespace", which I get tired of typing...
18:15 wolverian right. :)
18:15 wolverian rules have namespaces (grammars), right? so it can be <Perl6.ws> or so?
18:15 TimToady right, in which case it's still <ws> :)
18:16 wolverian just not the generic <ws>, I hope :)
18:16 wolverian (if I use <ws> inside a class called Perl6, does it look up <Perl6.ws>?)
18:16 TimToady generic whitespace is \s*
18:16 fglock TimToady: I'm looking for existing p5 op-precedence parsers to reuse - do you have any recommendation? I'm currently thinking about using Parse-Yapp as a starting point
18:16 wolverian oh. I thought <ws> was generic. nevermind then
18:17 TimToady actually, <ws> is supposed to be the smart whitespace matcher that :w uses.
18:17 rindolf left perl6
18:17 TimToady \s+ between idents, \s* otherwise.
18:18 TimToady but maybe that should be "between tokens that would otherwise be confused as single tokens"
18:18 PerlJam joined perl6
18:18 TimToady since that's precisely the situation with .. and .#(). now.
18:22 nothingmuch joined perl6
18:22 TimToady so maybe it's really <tb> for "token boundary" or some such.  On the other hand, if we do all our longest-token matching with <%hash>, maybe the situation never arises in a "real" grammar.
18:23 TimToady well, gotta transit, commute, and associate.  not planning to distribute soon, however... &
18:24 wolverian cheers :)
18:27 KingDiamond joined perl6
18:39 b_jonas joined perl6
18:48 svnbot6 r9880 | fglock++ | Pugs-Compiler-Precedence - experimental precedence parser using Parse::Yapp
18:54 svnbot6 r9881 | fglock++ | PC-Precedence - Parse::Yapp can generate "ast"
19:02 * PerlJam just notices that fglock is taking PCP
19:02 PerlJam actually, I guess he's a manufacturer and distributor of PCP
19:04 svnbot6 r9882 | fglock++ | Pugs-Compiler-Precedence - Parse::Yapp takes ast as input
19:04 ifdev joined perl6
19:05 * fglock monopolizes PCP production and terminals
19:09 hlen joined perl6
19:12 fglock Wow, that was easy
19:15 david__ joined perl6
19:22 kolibrie fglock now has a precedence parser?
19:26 r0nny joined perl6
19:26 zgh joined perl6
19:30 r0nny joined perl6
19:31 fglock kolibrie: yes! I'm packaging it and adding API and tests stuff
19:31 chris2 joined perl6
19:31 svnbot6 r9884 | fglock++ | PCR - moved Category stuff to the new PC-Precedence module
19:31 kolibrie fglock: woot!
19:32 PerlJam fglock: now all you need to do is create a TGE in perl5 and you'll have recreated the entire toolchain that will be used to make a perl6 compiler.
19:32 fglock so we mostly have the 3 layers of p6 parser figured out
19:33 fglock PerlJam: TGE is not necessary with the new 'return blocks'
19:33 fglock TGE is useful for optimizations, but you can make the compiler without it
19:37 arcady perl 6 is looking like a very good language for writing compilers in
19:37 arcady presumably because that's the biggest use for it that has been found so far
19:38 Limbic_Region fglock - Parse::Yap takes ast as input?
19:38 Limbic_Region s/p/pp/
19:39 Ann joined perl6
19:40 fglock Limbic_Region: yes - I can feed the matches from Pugs-Compiler-Tokenizer into Parse::Yapp using a few transformations
19:44 fglock Limbic_Region: and I can get ast back
19:45 Limbic_Region ok - still color me confused
19:45 Limbic_Region ast is going into P::Y or is coming out
19:45 PerlJam both sounds like
19:46 fglock I'm using P::Y for ast->ast transformation (ast list to ast tree)
19:46 Limbic_Region ah
19:47 Limbic_Region ok so the "few transmformations" is what is making the object as a token problem go away?
19:47 fglock this is surprisingly not documented
19:47 fglock yes
19:48 Limbic_Region cool beaners and moldy chicken
19:49 fglock this is the prototype - misc/pX/Common/Pugs-Compiler-Precedence/precedence.pl
19:51 Limbic_Region I currently can't get Pugs to build on my work machine so my local repo is out of date - I will svn up
19:51 * Limbic_Region really needs to figure out why Pugs doesn't build here though
19:52 fglock you don't need pugs to run p5-pugs
19:52 FurnaceBoy joined perl6
19:52 Limbic_Region I know
19:53 Limbic_Region perhaps you missed the part where I said my local repo was out of date and that I will svn up
19:53 Limbic_Region and that the figuring out why pugs doesn't run here was a "though"
19:54 fglock ok
19:54 Limbic_Region it has been a couple of weeks - this might take a while
20:01 svnbot6 r9885 | fglock++ | Pugs-Compiler-Precedence/precedence.pl - added more operators
20:01 Limbic_Region wow - short and sweet
20:05 fglock Limbic_Region: I wrote quite a few parsers myself using a lot of different algorithms before finding this out
20:06 * Limbic_Region just noticed the eval $p
20:06 Limbic_Region how is the performance?
20:07 fglock quite good - there is a report that says it's half the speed of the C version
20:08 fglock I mean, half the speed of some better parser - I don't know if it was in C
20:08 clkao summon audreyt
20:09 fglock and magnitudes faster than Parse::RecDescent
20:10 fglock the eval disappears if you are compiling code - it turns into plain source code
20:11 Limbic_Region hrmm
20:11 Limbic_Region presumably all optimizations happen in Parse::Yapp land which is mature enough to have already gone through a few trips to the tinker shop
20:11 fglock PGE works this way too
20:13 fglock PCR also generates source code and than evals it
20:16 * Limbic_Region was misremembering something about Safe and eval
20:16 Limbic_Region or rather, I was misattributing a performance issue with Safe and eval to eval
20:21 david_ joined perl6
20:25 Limbic_Region fglock - the bigger difference with Parse::RecDescent that Larry was harping about was the ease of adding in precedence levels later
20:25 Limbic_Region beyond just the speed that is
20:27 fglock that, and P::R needs some tricks to avoid infinite loops
20:27 Limbic_Region ok - well my grats message apparently didn't come through - so grats
20:28 * Limbic_Region is headed homewards
20:32 TimToady fglock+=42
20:33 fglock thanks!
20:39 macli joined perl6
20:41 tri joined perl6
21:00 p5evalbot joined perl6
21:00 ifdev left perl6
21:17 FurnaceBoy is now known as FB|afk
21:27 lichtkind ? eval 4
21:28 lichtkind ?eval 4
21:28 evalbot_9885 4
21:28 b_jonas left perl6
21:29 lichtkind ?eval @a<1 2>;
21:29 evalbot_9885 Error: Undeclared variable: "@a"
21:29 lichtkind ?eval my @a = (1,2); @a<0 1>;
21:30 evalbot_9885 Error: Cannot cast into Hash: VRef <Array>
21:32 fglock ?eval my @a = (1,2); @a[<0 1>];
21:32 evalbot_9885 [1, 2]
21:33 lichtkind no i wanted to know if i can use the <> syntax also to ask for subarrays
21:33 lichtkind like with hashes
21:34 fglock it would be nice, but you can't - it's like saying @a{'0','1'}
21:44 lichtkind i know
21:45 lichtkind it would be a bit of dwimmery
21:45 lichtkind i just tried
21:53 svnbot6 r9886 | fglock++ | PCP - added Precedence.pm, TODO
21:57 KingDiamond joined perl6
22:02 Limbic_Region joined perl6
22:12 cognominal ?eval my @a = ('toto'); say @a<0>
22:12 evalbot_9886 Error: Cannot cast into Hash: VRef <Array>
22:12 cognominal ?eval my @a = ('toto'); say @a['0']
22:12 evalbot_9886 OUTPUT[toto ] bool::true
22:13 cognominal say 'toto'
22:13 cognominal ?eval say 'toto'
22:14 evalbot_9886 OUTPUT[toto ] bool::true
22:21 tri left perl6
22:25 justathe1ry joined perl6
22:30 frederico joined perl6
22:36 colares joined perl6
22:42 vel joined perl6
22:42 wolverian hm, what are the current thoughts on open()? is http.open, file.open etc still the way to go?
22:43 wolverian (mm, lowercase modules)
22:43 Limbic_Region wolverian - were you present for the stream of conciousness chat larry had on the topic here in #perl6?
22:44 wolverian yes, I was wondering if there were any developments on it afterwards
22:44 wolverian didn't see any in the logs, though.
22:45 wolverian (egrep Tim.*open)
22:46 Limbic_Region wolverian - you have your own local copy of the logs?
22:46 Limbic_Region why not just use http://colabti.de/irclogger/irclogger_log_search/perl6
22:46 Limbic_Region ?
22:46 wolverian yes, I have my own copy.
22:47 wolverian I'm not sure what the www page has that the localy copy doesn't, besides downtime (which shouldn't be drastic)
22:47 wolverian anyway, thanks, I guess that discussion was the latest on the topic :)
23:02 Juerd wolverian: I hope for a URI based open.
23:03 wolverian Juerd, I think I still want open "foo.txt" to work, though.
23:04 macli left perl6
23:05 arcady it could be something like ruby's uriopen module
23:05 arcady open "foo.txt" works
23:06 arcady require 'uriopen'; open "http://www.ruby-lang.org/" also works
23:07 wolverian does anyone use that?
23:07 arcady yes
23:07 arcady rubygems does, I'm fairly sure
23:11 arcady err... actually it's called open-uri
23:11 arcady and is a part of rubygems
23:16 Juerd wolverian: Local filesystem as fallback in case of absense of ^\w+\: makes sense, yes :)
23:17 Juerd wolverian: And an :adverb can decide if the string should be parsed as URI or local file, to override the heuristics
23:17 wolverian Juerd, then again I'm not sure if I want even that much magic in open()
23:18 Juerd wolverian: I do.
23:18 Juerd I want magic everywhere.
23:18 arcady putting the magic in a separate module would work, though
23:18 rafl joined perl6
23:19 wolverian Juerd, how about io() and open(), and put the magic in io()?
23:19 Quell joined perl6
23:19 Juerd I also want magical @ARGS open to be smart enough to never parse things specially.
23:19 Juerd wolverian: io() is a silly name. Everything a program does to communicate is io.
23:19 wolverian I'd assume it would be magic enough to fit that bill...
23:19 Juerd Maybe File.open, and URI.open, where Magic.open is the default.
23:20 wolverian that's an interesting idea
23:20 wolverian I like Magic :)
23:20 Juerd use File <open>;  to override lexically.
23:20 wolverian open file: ...;
23:21 Juerd open File: ...;
23:21 wolverian I wonder how often I want to specify what I want to open
23:21 Juerd I would want to specify it only when I have arbitrary filenames.
23:21 Juerd Calculating URIs is counterproductive, and hoping they won't trigger URI parsing heuristics is dangerous.
23:22 arcady opening a URI is much less common than opening a file, so specifiying that that's what you want is the better idea
23:22 Juerd Consider @ARGV's huge gaping security breach waiting to happen in Perl 5.
23:22 Juerd arcady: I would want URI opening to become a natural action, possible because Perl supports it naturally.
23:22 Juerd Not because the programmer was clever enough to support it.
23:23 Juerd There are many things I use in Perl programs that the authors never thought of, but are possible because Perl is so cleverly designed.
23:23 Juerd (Or, not designed at all, and flexible enough to compensate for that, depending on your theory of evolution versus ID ;))
23:23 wolverian I can certainly understand making open() understand URIs. it's just future proof.
23:25 arcady there are very evil uses for a OpenURI type functionality
23:25 Juerd arcady: There are.
23:25 arcady such as installation scripts:
23:25 arcady eval(open("http://foo.com/install").read)
23:25 Juerd OTOH, I may not want URIs to be the default because they're entirely incompatible with many other file operations, like -d or unlink.
23:26 Juerd arcady: I think that point is highly irrelevant.
23:26 arcady sure
23:26 Juerd Opening *arbitrary* files is dangerous by definition if there's any magic. See also Perl 5 and ARGV.
23:26 Juerd Opening *literal* URIs will be done anyway, regardless of URI open being the default or not.
23:27 arcady right
23:27 wolverian some programmers won't know that open() understands URIs, creating DoS scripts, perhaps.
23:28 mugwump can p6compiler.pl compile without running the program?
23:29 Juerd wolverian: But if "some programmers" who "don't know" (or in fact "won't know") that arbitrary open is dangerous, and they ALSO don't/won't use taint mode, let them suffer.
23:29 Juerd Let them create dangerous programs and lose their jobs. Please.
23:29 theorbtwo ...or make a locally-accessable priv esc become global, when silly programmers assume that on-the-filesystem paths must be safe.
23:29 Juerd And in case you didn't know, Perl 5's <> is dangerous in almost the same way.
23:30 theorbtwo Of course, that's no worse then now, when silly admins assume on the local network is safe, and forget about their open 802.11 with convient DHCP.
23:30 Juerd Perl 5 has URI open, except you have to use external commands to get it.
23:30 theorbtwo Perl has never been shy about letting you have enough rope.
23:30 Juerd perl -e'print while <>' "|curl http://juerd.nl/"
23:30 wolverian GET! (it's even perl)
23:31 Juerd Believe me, I've used (and abused) this more than once.
23:31 Juerd Ever used somescript.pl /path/to/*
23:32 theorbtwo A lexical no open 'URI' would be nice, of course.
23:32 Juerd That's a little bit safer than ./somescript.pl *  if somescript.pl happens to use ARGV (through readline ARGV, which is what <> is, for example)
23:33 mugwump fglock: you available to give a tour of lrep?
23:34 mugwump or does anyone know how to get lrep to build itself?
23:35 mugwump I get an error trying to use it on, say, iterator_engine.p6
23:36 mugwump `perl p6compiler.pl p6prelude.p6' seems to hang
23:36 Juerd Your quotes are different.
23:37 mugwump they're called `TeX' quotes :)
23:37 zgh joined perl6
23:37 theorbtwo They're called "stupid-looking non-matching quotes", too.
23:37 theorbtwo They are one of my major pet peeves.
23:38 Juerd I'd call them a silly attempt to refit ASCII into something that it is not and can never be.
23:38 FurnaceBoy_ joined perl6
23:38 Juerd If you want to have bracketing quotes, use any of the many unicode alternatives, but not ASCII.
23:39 Juerd In Dutch it can be even funnier (sadder), as the traditional form of quotes is sometimes asciified as ,,foo''
23:40 Juerd I don't know which other languages use this kind of quoting. Fortunately, in the youngest decade, the use of these quotes has dramatically decreased :)
23:40 TimToady I'm partial to ❝fat❞ quotes myself...
23:40 theorbtwo Apparently, in some very old fonts, ` and ' did form a reasonable-looking pair.  Those fonts are now properly considered wrong.
23:41 theorbtwo Juerd: They're traditional German too, I think.
23:41 wolverian TimToady, it's so wrong to quite the 'fat' there.
23:41 wolverian er, s,quite,quote,
23:41 mako132_ joined perl6
23:41 theorbtwo I didn't actually see them when I lived in Germany, though.
23:41 Juerd theorbtwo: I thought German used >>these<<?
23:41 theorbtwo I suspect, like the Gothic font, they are considered old and stogy.
23:42 theorbtwo Sometimes.  Mostly they use "normal" double-quotes.
23:42 theorbtwo >>foo<< seems to be the German equiv of scare quotes.
23:42 wolverian I wonder if I can make my locale insert the unicode curly quotes when I type ".
23:42 mugwump ok, I'll use “unicode” quotes from now on :)
23:42 wolverian since that would be proper for fi_FI.utf8
23:42 wolverian (then again, I'm not typing finnish now, so it'd break. oh well.)
23:43 TimToady Actually, ASCII quoting still works fine as long as you don't assume ` is symmetrical with '
23:43 TimToady (my current font has them symmetrical though, grr...)
23:44 mugwump well, moving right along...
23:44 Juerd I always use "ASCII quotes"
23:44 Juerd Sometimes 'these'
23:44 mugwump onto lrep: running p6compiler.pl on p6primitives.p6 seems to work on head
23:44 Juerd I don't care enough about the glyphs to use anything else. Straight, non-curly, quotes are good enough, as long as they're somewhat symmetrical and not abused.
23:45 * theorbtwo wonders if he should map compose-6-6 and compose-9-9 to ‟...”.
23:45 theorbtwo Then gain, I don't care.
23:45 theorbtwo s/gain/again/
23:46 mugwump but, using p6compiler.pl on p6prelude.p6 hangs, and iterator_engine.p6 fails
23:47 * wolverian never could figure out how to use compose
23:47 Juerd http://en.wikipedia.org/wiki/Quotation_mark#Table  # What a mess!
23:48 theorbtwo xmodmap -e 'keycode 94 = Multi_key'
23:48 theorbtwo Now the key to the right of left shift is compose.  Try compose, s, s.
23:48 Juerd I never knew that besides <<foo>> and >>foo<<, even >>foo>> existed, each with and without inner spacing.
23:49 theorbtwo (Assuming xorg on a normal european PC keyboard.)
23:49 wolverian I don't have a key to the right of the left shit.
23:49 Juerd "Normal European"
23:49 wolverian er, shift.
23:49 wolverian er
23:49 wolverian sigh, I'm retarded.
23:49 Juerd Mind you that in .nl, American keyboards are used. On a QWERTY model, the key right of the left shift is Z.
23:49 wolverian theorbtwo, thanks, that worked
23:50 wolverian now I can't type the arrow brackets anymore
23:50 wolverian heh.
23:50 Cyrup joined perl6
23:50 Juerd I think it's more sane to map Alt Gr to compose.
23:50 mugwump also try gnome-keyboard-properties
23:50 Juerd Or any of the windows keys
23:50 wolverian I need alt gr to type @ and such
23:51 TimToady theorbtwo: it would appear that your ‟...” quotes aren't matching quotes. your left one is DOUBLE HIGH-REVERSED-9 QUOTATION MARK, while your right one appears to be RIGHT DOUBLE QUOTATION MARK
23:51 Juerd wolverian: You can still do so, iirc. It's the difference between using it as a key and as a meta key.
23:51 wolverian Juerd, ah.
23:52 wolverian heh, how can I clear the keycode mapping?
23:53 Juerd By re-loading an entire keymap
23:53 Juerd xsetkbmap us  # or s/us/whatever/
23:53 Juerd xmodmap -e 'keycode 117 = Multi_key'
23:53 Juerd 117 is the Windows menu key.
23:54 arcady back when I had a mac, I used the option key for that purpose
23:54 wolverian I don't have a xsetkbmap. heh
23:54 Cyrup left perl6
23:54 theorbtwo I use an en_US keymap on european keyboards, so the key to the left of right shift is useless except for compose.  I like having two alt keys, and the keyboard on my desktop doesn't have windows keys, so it works out well for me.
23:55 mugwump http://mail.pm.org/pipermail/wellington-pm/2005-June/000338.html  # my thoughts on keymaps
23:55 theorbtwo I use "normal european" to mean 102 key, plus possible windows keys.  Most european keyboards seem to be like that, though what's printed on the keycaps varies.
23:56 Juerd wolverian: setxkbmap, sorry.
23:56 Juerd xsetkxmap is a contamination of xset and setxkbmap
23:57 arcady there's plenty of extra keys, if you really need one, though
23:57 arcady I mean, does pause/break do anything on linux?
23:57 arcady or scroll lock?
23:58 theorbtwo Scroll lock is quite useful -- it will "pause" output on terminals, like ^Q/^S.  Also, alt-scroll-lock can be used as a magic sysrq.
23:58 Juerd Err, scroll lock is essential. Couldn't do without it :)
23:58 theorbtwo However, the second will happily ignore keyboard mappings, which is part of the point.
23:58 wolverian Juerd, thanks!
23:58 Juerd theorbtwo: sysrq can be on scroll lock or print scrn or break, depending on the keyboard (and/or mapping?)
23:59 Juerd There's always a key that someone thinks is useless, until it's taken away
23:59 Juerd Consider some of the new Logitech keyboards, without insert key.
23:59 theorbtwo EEEP!

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo