Older blog entries for chromatic (starting at number 458)

Perl 5 Design Minutes for 06 January 2010

The Perl 6 design team met by phone on 06 January 2010. Larry, Allison, Patrick, Will, and chromatic attended.

Larry:

  • in Spec Land, renamed p{} to qp{} to avoid using up another common single letter
  • bare say/print is now just a warning
  • Carl Mäsak dug up fossilized restriction on hash literals, which I removed
  • since the insides of blocks are now parsed as statements, there is no longer an inconsistency in line-ending curlies
  • refined the picking vs grabbing semantics with respect to immutable vs mutable bags and such
  • to avoid legacy confusion, renamed break/continue to succeed/proceed
  • clarified that an implicit succeed returns the value of the whole when block
  • it is not somehow magically inserted around the last statement
  • renamed true to so to avoid confusion of the predicate with the True enum value
  • at the suggestion of moritz++, split Any up into Any and Cool types
  • Cool stands for Convenient OO Loopbacks, or any other acronym you'd like
  • the built-in types derived from Cool are the ones that do Perlish dwimmy coercions
  • user types still derive from Any by default, so aren't born with gazillions of methods
  • conjecturally, also keep "last-resort" multis in Cool package
  • responded non-explosively to a potentially explosive rant/twitter
  • clarified various things in response
  • it is not necessary that all implementations be equally good at everything
  • there will be a minimal Perl 5ish grammar alongside STD that any VM can support as a well-behaved subset
  • it is also acceptable to support bug-for-bug compatibility with Perl 5
  • the language designer is neither omniscient nor omnipotent
  • the design process is therefore convergent on the part of all parties involved
  • the rate of convergence is an emergent property, and is to be forced
  • convergence is deemed to be positive as long as anyone is still working on Perl 6
  • the solidification of the spec is also part of the convergence, and depends on proven implementation
  • unproven parts of the spec are to be considered implicitly conjectural
  • as implementations converge on specs, we can throw out or delay parts of the spec that as yet unproven
  • everyone is allowed to panic once.
  • on to implementation, found fencepost precedence error inside list prefix
  • moved the default initparse method from STD into Curso so other grammars don't have to define it
  • added quote modifier:p (aka:path) so we can form the qp{} path literal
  • installed better warnings about bare say/print
  • generalized the say/print warning to anything a p5er might try that might be in p6 without the defaulting
  • STD and CORE now support recent renamings to so, succeed, and proceed
  • no longer reports "Bogus statement" when "Missing term" is more accurate
  • now catches/\b/ and advises to use an appropriate p6 word boundary assertion instead
  • emits better message when an intended reduce is interpreted as composer
  • detects most attempts to use postfix after whitespace, and suggests omitting whitespace
  • now parses tick-less embedded comment syntax as line-end comment (but still warns for now)

Patrick:

  • took the last couple of weeks off
  • keeping up with things, but not much writing code
  • read the S01 changes with great interest
  • glad to see them
  • answered some PGE questions for Carl

Larry:

  • we've talked about them all along
  • they weren't written down in an obvious place

Will:

  • working on Parrot
  • trying to move as much out of the configure process into a Makefile as possible
  • intended to improve the build
  • attempting to remove recursive makes
  • avoid unnecessary rebuilds
  • improve dependency tracking in the build
  • probably ready after 2.0

Patrick:

  • I'm impressed
  • thanks for taking that on; we needed it

Allison:

  • working on deprecation notices
  • we've talked about a lot of things over the past six months
  • not sure they're all in the file appropriately

c:

  • working on bugfixes
  • also working on deprecations

Patrick:

  • I intend to merge the ng branch before the January release
  • some people are antsy, but I have a lot of confidence
  • we'll probably pass about 70% of the test suite
  • it looks like a regression, but we have different features added now
  • lazy lists work, for example
  • lots of things fudged in the previous version work now

Syndicated 2010-01-23 00:12:46 from pudge

Perl 6 Design Minutes for 16 December 2009

The Perl 6 design team met by phone on 16 December 2009. Allison, Patrick, Jerry, and chromatic attended.

Patrick:

  • finished my Hague Grant
  • sent the final report to Jesse to wild approval
  • drafted a new version of PDD 31 on HLL interop
  • write some code to implement part of that in NQP's HLLCompiler
  • added various tests
  • need to get languages using that now
  • Rakudo will use that
  • it's the basis for Rakudo's use and import
  • if it works for Rakudo, it should follow for other languages which use HLLCmpiler
  • had a few comments about missing pieces and corrections
  • it's still a draft spec, but we need iteration to finish the spec
  • working on little bits of code here and there
  • adding features for projects which use NQP
  • trying to return to using Rakudo and updating the -ng branch

Allison:

  • working on the Pynie refresh this week
  • started over with the Python 3 grammar
  • have that translated into NQP-rx
  • it compiles and can parse a few things
  • working my way through the grammar
  • no actions set up yet

Patrick:

  • there is a.DEBUG rule
  • call it on a subrule to turn on tracing from that rule down
  • that saves you from having to put in panic statements

Allison:

  • is there a good NQP-rx tutorial for actions?

Patrick:

  • working on it
  • is your work in the Pynie repo?

Allison:

  • it's in Mercurial on bitbucket.org under project pynie
  • that's what Python 3 uses
  • also the Parrot roadmap session went very well

Jerry:

  • we still have some actions to take based on that work
  • need to convert our priority list into Trac tickets and wiki items
  • Parrot's goal for every month until Rakudo * is to support Rakudo * and HLLs in general

Allison:

  • that's valuable
  • it changes our priorities in the next year
  • it moves things between "would be nice" and "necessary"

c:

  • worked on the roadmap session
  • helping with the Context/CallSignature merge
  • will do a dry run of the Rakudo release today

Syndicated 2010-01-22 01:52:43 from pudge

Perl 6 Design Minutes for 09 December 2009

The Perl 6 design team met by phone on 09 December 2009. Larry, Allison, Patrick, Will, and chromatic attended.

Will:

  • some work on NQP port of Partcl
  • Patrick has been very helpful
  • sent a message to the Parrot list about the planning meeting this Sunday
  • initiated a community document to discuss those plans

Allison:

  • implemented large chunks of obscure C code to perform fast string matching using the FFT
  • wondering if that'd be useful in Parrot
  • maybe we do our indexing operations by character set in the NFG form
  • also does very basic pattern matching by leaving out optional characters
  • could be useable in the core tests, where it's tricky to depend on PGE
  • this was my final assignment before the Christmas break
  • have a month off to work on Parrot stuff then
  • I'll show off my assignment when I submit it

Patrick:

  • finished my final report for my Hague grant
  • haven't quite finished the grant, but left TODO items
  • rather than trying to finish everything and then write the report, I'd draft the report and keep notes on what I needed to finish
  • need to work on HLL interop
  • enable Perl 6 and other Parrot languages to load libraries from other HLLs
  • will work on that over the next few days
  • had several coversations about optimizations, constants, and inferior runloops
  • made minor PAST improvements
  • integer constants can automatically promote to num constants without going through a PMC
  • updated NQP to make it easier to write custom operator subs, if you're using the operator precedence parser
  • implemented the beginnings of smart matching
  • not full Perl 6 smart match
  • makes sense in the Parrot context
  • can match against regexes, tokens, rules, and any types with protoobjects
  • code looks more like Perl 6
  • not much on Rakudo besides answering questions
  • will get back to the Rakudo-ng merge after finishing my grant work
  • also worked on Partcl
  • updated its regex syntax, particularly for enumerated character classes
  • fixed it to handle unquoted, non-word characters in regexes
  • previously it only handled barewords as literal matches
  • it's closer to the Perl 5 syntax now

Larry:

  • didn't like the name PairValSet, renamed it EnumMap
  • likewise PairSet is now PairMap, and PairVal is just Enum
  • so individual constant pairs now called "enums"
  • we distinguish pairs, which have read-write values, from enums, which are constant in the value
  • you can now do.enums on hashes and arrays as well as enumerations
  • differs from.pairs, which give reference semantics into the values of the original data structure
  • .enums gives you a constant snapshot
  • David Green suggested renaming Enum.name to Enum.key, and he was right, since they're constant pairs
  • trying to be consistent about calling the whole type an "enumeration" and referring to the bits as "enums", even though the keyword is enum
  • thought people would rebel at typing the long name
  • clarified that the anonymous enum is compile-time evaluated as an anonymous list of constants
  • you can always cast to an EnumMap at run time for the other behavior
  • simplifying conditional semantics
  • STD parser now parses a WHENCE closure as part of the typename, rather than relying on subscript parse
  • block escape within a closure within a string used to parse as a normal block by responding to comments outside of the block
  • already fixed the embedded block in the regex syntax
  • made that usable by strings and regexes now
  • blocks in regular code try to figure out if they're at the end of a statement
  • look for the trailing curly
  • inside a string or regex, there are no statements
  • it makes no sense to look for the end of the statement there
  • the obsolescence messages were still in the old framework that upsets some Perl 5 people
  • changed the wording to "Unsupported use of..."
  • #perl6 found a precedence inconsistency in parsing of list prefixes vs list infixes in NG
  • turned out to be wrong in STD first, and NG copied it
  • I fixed it in STD, Patrick fixed it in NG
  • otherwise last week was rather too ADD-ish, so mostly did Q&A on IRC

c:

  • fixed some bugs
  • made some optimizations
  • think I've fixed most constant PMCs in PBC now, which should help NQP and Rakudo

Patrick:

  • it'll take a while before Jonathan and I can take advantage of that
  • Allison, when you push_eh an ExceptionHandler onto an array in a context, it creates an RPA
  • does that hold other things besides an EH?

Allison:

  • potentially
  • events get stored in the scheduler
  • only EHs are scoped to a context
  • the old pushmark/popmark stuff to do actions used that same global array
  • it may have changed to use the same array
  • that's deprecated though
  • they won't use that array for long

Patrick:

  • I need something to replace pushaction and popaction before they go away
  • when we handle LEAVE semantics, we want to avoid generating an exception to leave that scope for caching
  • I don't want to generate and rethrow actions to go up the stack
  • those ops let me do that without generating exceptions

Allison:

  • we do need singleton exception objects for FAIL and RETURN
  • no extra information needed
  • right now, you can insert anything you want in that array
  • the local_branch and local_return uses that array

Patrick:

  • it shouldn't
  • bsr and ret may have
  • I provide my own there

Allison:

  • oh right
  • I might not have checked in that code

Patrick:

  • by the way, NQP doesn't use local_branch or local_return

Syndicated 2010-01-21 04:41:19 from pudge

Announce: Parrot 2.0.0 "Inevitable" Released!

The Beyond and below are like a deep of ocean, and we the creatures that swim in the abyss. We're so far down that the beings on the surface superior though they are can't effectively reach us. Oh, they fish, and they sometimes blight the upper levels with points we don't even understand. But the abyss remains a relatively safe place.

Vernor Vinge, A Fire Upon the Deep

On behalf of the Parrot team, I'm proud to announce Parrot 2.0.0 "Inevitable." Parrot is a virtual machine aimed at running all dynamic languages.

Parrot 2.0.0 is available on Parrot's FTP site, or follow the download instructions. For those who would like to develop on Parrot, or help develop Parrot itself, we recommend using Subversion on our source code repository to get the latest and best Parrot code.

Parrot 2.0.0 News:

  • Features

    • Context PMCs now support attribute-based introspection
    • Context and CallSignature PMCs merged into CallContext
    • .lex directive throws exceptions when used with incorrect register types
  • Platforms

    • Packaging improved for free OS distributions
    • PPC, PPC64, and ARM now tested when running Linux
  • Performance

    • Minor improvements to the profiling runcore
    • Improvements from the CallContext PMC merge
  • New deprecations

    • In/out parameters in STRING modification functions
    • Void handling in NCI signatures
    • Parameter passing opcodes order in PBC
  • Tests

    • Continued migration of core tests from Perl 5 to PIR
  • Tools

    • dependency checker improved
  • Miscellaneous

    • Deprecation cycle length changed to three months from six
    • GC accuracy improved
    • PMC freeze improvements; much more reliable
    • Makefile improvements for dependency handling

Thanks to all our contributors for making this possible, and our sponsors for supporting this project. Our next release is 16 February 2010.

Enjoy!

Syndicated 2010-01-21 04:37:49 from pudge

Announce: Rakudo Perl 6 development release #24 ("Seoul")

On behalf of the Rakudo development team, I'm pleased to announce the December 2009 development release of Rakudo Perl #24 "Seoul". Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine. The tarball for the December 2009 release is available from http://github.com/rakudo/rakudo/downloads.

Due to the continued rapid pace of Rakudo development and the frequent addition of new Perl 6 features and bugfixes, we recommend building Rakudo from the latest source, available from the main repository at github. More details are available at http://rakudo.org/how-to-get-rakudo.

Rakudo Perl follows a monthly release cycle, with each release code named after a Perl Mongers group. The December 2009 release is code named "Seoul" for Seoul.pm, who hosted Jonathan so well recently, and because they have a cake duck.

Shortly after the October 2009 (#22) release, the Rakudo team began a new branch of Rakudo development ("ng") that refactors the grammar to much more closely align with STD.pm as well as update some core features that have been difficult to achieve in the master branch. Most of our effort for the past month has been in this new branch, but as of the release date the new version had not sufficiently progressed to be the release copy. We expect to have the new version in place in the January 2010 release, but may elect to have an interim release from the new branch before then.

This release of Rakudo requires Parrot 1.9.0. One must still perform make install in the Rakudo directory before the perl6 executable will run anywhere other than the Rakudo build directory. For the latest information on building and using Rakudo Perl, see the readme file section titled "Building and invoking Rakudo".

Some of the specific changes and improvements occuring with this release include:

  • Rakudo is now passing 32,192 spectests, a "decrease" of 561 passing tests since the November 2009 release. We pass fewer tests now because specification changes caused many obsolete (but passing) tests to be removed from the suite -- from 38,318 in November to 37,376 now. The percentage of passing tests has increased, from 85.5% in November to 86.1% today.
  • More improvements to the Rat type and related math functions to remain aligned with the specification.

The Perl 6 language specification is still in flux. Please take note of the following changes, which might affect your existing programs. In the next release of Rakudo, the deprecated features will likely be gone.

  • The root of the object hierarchy has been changed from Object to Mu. The type Object goes away.
  • The term undef is gone. You can replace it with other constructs, depending on context:

    • Nil is undefined in item context, and the empty list in list context
    • Mu is the most general undefined value which does not flatten in list context
    • as a smart matching target, you can replace $obj ~~ undef by $obj ~~ *.notdef

The development team thanks all of our contributors and sponsors for making Rakudo Perl possible. If you would like to contribute, see http://rakudo.org/how-to-help, ask on the perl6-compiler@perl.org mailing list, or ask on IRC #perl6 on freenode.

The next release of Rakudo (#25) is scheduled for January 21, 2010. A list of the other planned release dates and codenames for 2010 is available in the docs/release_guide.pod file. In general, Rakudo development releases are scheduled to occur two days after each Parrot monthly release. Parrot releases the third Tuesday of each month.

Have fun!

Syndicated 2009-12-18 08:14:37 from pudge

Perl 6 Design Minutes for 02 December 2009

The Perl 6 design team met by phone on 02 December 2009. Larry, Allison, Patrick, Will, and chromatic attended.

Allison:

  • mostly mailing list talk
  • finishing up course work before the break

Larry:

  • renamed void context to sink context
  • appears to have worked
  • working out the semantics of higher-level abstract conversions with the lower-level ones
  • the method conversions.Num,.Str,.Bool are low-level
  • the abstract ones are conversions to roles, like + to Numeric
  • the generic role is in charge of which conversion to use
  • seems to map better to what people expect
  • started to straighten out.true versus.Bool
  • renamed is ref to is parcel
  • made it synonymous with backslash
  • did more work on the Rat semantics to separate out what we originally called Ratio
  • now called FatRat
  • looked at all of the mentions of context in the spec
  • removed overloaded meanings
  • dynamic contexts are now call frames
  • contextual variables are now dynamic variables
  • context means two things now, the old list versus scalar notion and some notion of a thread's context (left those alone)

Allison:

  • "call frame" makes a lot of sense
  • we may kidnap that

Larry:

  • Damian has sent in various spec tweaks, as we gear up to do a Perl 6 book
  • kicked the p5=> out of the core into something supplied as a macro by a translator
  • ranges now preserve interval semantics when you do math on ranges
  • renamed blorst to blast so we can talk about phaser blasts
  • worked on the nature of constants
  • constant declaration is now in the same category as the subset keyword and othe declarators
  • now have an anon declarator
  • it confused people to misuse my or our in a situation without a name
  • had added an else to go with also, as Damian suggested
  • removed both of those in favor of a new metaoperator which guarantees sequential evaluation of the arguments
  • the S metaoperator
  • after deciding that undef is a lousy concept in Perl 6 -- it turns out to mean five or six different things -- we decided to untangle all of them
  • temporarily renamed Object to U, for the most generic undefined
  • then revised, per Damian's suggestion, to Mu
  • that represents the most generic undefined value and the type from which all other classes derive
  • one use of undef was in smart matching
  • added a.notdef method for the convenience of testing definedness
  • possible to write longer versions which work with smart match
  • a convenience method felt nicer
  • used heavily in the test suite
  • can test something directly with the method without having to use smartmatch
  • worked on the Rats of unusual precision (not ROUSes)
  • some confusion as to when things get limited to 64-bit denominators
  • clarified that only the user-visible results use that limit
  • intermediate calculations performed by an operator which can and must exceed that limit temporarily
  • added a scaling option to the round function
  • easy to round to a particular rational value
  • after lots of carping about how ill-defined enums are, I rewrote that spec
  • they're no longer roles
  • the but and does infix operators still can intuit an attribute property mixin
  • that's a function of operator DWIMmery though
  • enums, to the first approximation, are simply collections of constants
  • they also supply a method,.mapping, which returns a hashlike mapping
  • that takes care of most of the special cases
  • STD now forces the symbols it matches into strings
  • lots of hacking to track spec changes, such as renames
  • complex number literals now parse the initial plus or minus as part of the complex
  • prevents tragedy in negating the wrong part of the number
  • need to nail down pure versus impure ideas to move that into constant folding
  • infix operators couldn't accept assignment operator forms for baseops with square bracket or hyperoperator forms; fixed that
  • worked on error messages, especially the Borg forms
  • removed some redundant rules and the term lexer decreased in size by two-thirds
  • added a warning about the use of undef; gives a long list of things you might mean instead
  • if you use ** in a range in a regex, but you mess it up where it parses.. as matching anything, you now get a malformed range warning
  • added a few missing things to the CORE setting, such as range iterator
  • now trims pi and e to fit in to a Rat64
  • tweaked viv to support code production of infix operators
  • don't have to grovel around to find the operator

Patrick:

  • not a lot of direct Rakudo coding
  • working in the ng branch
  • have eval working; it doesn't poke in the middle of the compiler guts
  • also provides a cleaner interface that other HLLs can reuse from PCT
  • added regular expression matching
  • still needs some work
  • added array push and unshift
  • fixed a few bugs
  • otherwise working on some design issues, such as lazy lists
  • answering questions for the branch
  • lots of syntax improvements in NQP
  • improved error messages
  • adding a few features
  • added:c($x) (continue) and:p($x) (position) options for regex matching in NQP and ng
  • those didn't exist in PGE or the previous Rakudo
  • cleaned up the abstract match handling (.ast) to match the new spec
  • reviewed Stephen Weeks's work to add try and catch blocks, and it was fine
  • updated a few things in NQP to make it easier to write built-in operators
  • enables the Perl 6 operator syntax directly
  • also working on Partcl
  • handles quite a bit already, but not enough
  • keep plugging away
  • the parsing works closely to what the language spec requires
  • I like that
  • throughout the implementation, we've focused on doing most of it in NQP itself, not PIR
  • seems to work out fine
  • adding lots of different commands
  • that's fed back into improvements for NQP
  • working out very well
  • started a regex syntax for Partcl which matches what Tcl requires
  • previously used the P5 syntax, which isn't an exact match
  • an example for other people of how to do it
  • mostly doing Parrot fixes to support the other tasks
  • a few small updates to PAST
  • improving code generation
  • enabling features that other languages need
  • bugfix for handling self attribute access in method calls
  • adding methods and interfaces for the compiler objects
  • will refocus on Rakudo's ng branch
  • lots of work fleshing out HLL interop interfaces
  • necessary to handle module imports
  • also a roadmap item and the last piece on my Hague grant
  • posted an interim report recently
  • that report marks the halfway point, but I'm much further than that
  • should finish the grant this week

Will:

  • have a version of Partcl mostly written in NQP
  • putting some energy into a discussion about reexamining our roadmap priorities
  • been doing that incrementally, but never had a specific meeting just to talk about that
  • trying to focus some energy on the list

c:

  • fixed a bug or two
  • profiled and optimized a bit

Allison:

  • how long would it take to migrate Pynie to the new NQP?

Patrick:

  • shouldn't take too long at all

Allison:

  • have a month off between classes starting in a week
  • might work on that

Patrick:

  • glad to help wherever I can
  • might be an area where you run into a problem and I need to write documentation

Will:

  • you can look at the NQP version of Partcl to start

Allison:

  • examples have been most helpful in the past

Will:

  • Stephen's also converting Squaak and abc to NQP
  • might be helpful to look at those too

Syndicated 2009-12-09 23:57:09 from pudge

Perl 6 Design Minutes for 18 November 2009

The Perl 6 design team met by phone on 18 November 2009. Larry, Allison, Patrick, Jerry, Will, and chromatic attended.

Patrick:

  • adding new features to NQP
  • checked in a copy to the Parrot repository
  • added the ability to create empty lists and hashes
  • added floating point constants
  • added array flattening into positional arguments
  • added statement modifiers
  • S05 changed with regard to subrule aliasing; updated NQP for that
  • so glad I created a new regex engine for this
  • that would have been difficult to do in PGE while maintaining backward compatibility
  • moved expression parsing closer to Perl 6
  • cleaned up literal handling
  • added the ability to have contextual variables look in global namespace and dynamic caller stack
  • simplified ability to set variables in other namespaces
  • continuing to bring Rakudo-ng branch up to feature parity with master
  • we'll release the Rakudo master tomorrow
  • mostly the same as October, but it uses the new Parrot calling conventions
  • spent my time working on the Rakudo-ng branch
  • we now have pointy blocks
  • updated to S05 interpretation
  • can parse numbers with decimal points
  • they produce Rats, not Floats, but I'm waiting for the spec to settle there
  • needs some cleaning anyway
  • statement modifiers now work
  • implemented Nil, after extensive discussion with Larry
  • works really well as an empty Parcel
  • implemented the.map method for lists
  • this version is lazy and can handle lazy lists
  • Jonathan and I updated dotty method operators to work correctly
  • still more to do there
  • worked on getting exported methods into a place where they're globally visible
  • currently they export themselves into the global namespace
  • works out pretty well
  • wrote a milestone report; completed the first half of my Hague grant milestones
  • should finish the rest of the grant by the end of the year
  • Jonathan's doing his amazing work on getting Rakudo pieces back in place
  • concentrating on method calls and class handling
  • we'll work on that through the next week
  • we'll pass a lot of the spectest suite in the branch by then
  • it's easy to get things to work
  • very few blockers in the new branch
  • most of the slowdowns are places where we were cheating but don't want to cheat anymore
  • have to do some work to figure out what the right approach is
  • started working on a new version of Partcl based on NQP
  • it's in the early stages, but it's worth trying to help Will there
  • so far it looks very promising

Allison:

  • working on tickets and small tasks this week
  • have no RT tickets left in my name
  • there are no RT tickets left at all
  • Will did a lot of fantastic work closing, rejecting, and migrating them
  • next week, I may work more on Pynie

Larry:

  • a bit under the weather this week
  • clarified the Nil semantics of empty blocks and missing branches
  • straightened up the Nil semantics for Patrick, as to what it actually is
  • the spec allowed a few of the phaser blocks to be statements instead
  • we opened that up to be almost all of them
  • they're now blorst -- block-or statements
  • Damian suggested we find some way of renaming those to blast, so we can have phaser blasts
  • unfortunately, they're block-or, not block-and
  • but maybe we can force that anyway
  • hankered for several months on this next one
  • when you alias a rule in the grammar, it does not suppress the original capture
  • people who wanted to give multiple aliases to an existing rule had to repeat it
  • that made sense in the original rule capture conception
  • after we added the dot form to suppress capture, it became easy to suppress a capture and alias a the same time
  • foo=bar in an assertion gives you both foo and bar in a capture
  • you say foo=.bar to suppress the capture
  • removed:panic last week
  • turned out to please the crowd
  • decided to execute:keepall this week
  • it's not very powerful, and it duplicates the semantics of.caps and.chunks
  • thinking a lot about Rats, as Patrick mentioned
  • design-wise, they consisted of a numerator and denominator of the same type
  • frequently you want a larger numerator than a denominator
  • settled on that as a normal thing
  • the default Rat type, even though it still has a 64-bit denominator, is just an Int on top
  • added a FatRat, a Rational with arbitrary precision on both numerator and denominator
  • easy to get in trouble that way, performance-wise
  • as Moritz suggested, Rat types are instantiations of the Rational role with the two types in question
  • Damian pointed out that STASH was the only type in all caps
  • changed that to Stash for consistency
  • Damian also pointed out that the CONTEXT pseudo-package was confusing
  • a singular noun implies one thing, even though it searches upward the dynamic stack
  • it's now DYNAMIC
  • individual frames are now Context; we distinguished them
  • worked on Rat normalization
  • they do not have negatives in the denominator
  • conversion to String now looks to see if the denominator is factorable into only twos and fives
  • if so, converts to straight decimal output
  • if not, it converts to a Numeric form in the String case
  • in the.perl case, it converts to the slash form
  • if it can convert conveniently into a decimal form, it does so directly
  • unbroke the check yada (bitrotted)
  • thus STD now allows forward-declaration of classes and subs
  • rearranged integer capture for Patrick, but he said he didn't need it
  • improved consistency of literal rules
  • changed to the new capturing/aliasing notation
  • fixed up the new blorsts
  • added a new Parcel type to CORE
  • thinking about the literal formats
  • a bad problem turned up with negated complex literals
  • they had a different meaning than if they weren't literals, in terms of negating the imaginary part
  • prototyped adding the pluses and minuses into the literal parts
  • thinking of going the other way
  • there is no literal form of complexes; always formed by constant folding
  • with recent changes to the semantics of angle brackets, a single literal inside angle brackets would recognize the literal forms we're getting away from
  • we could use angle brackets to emphasize the literalness of these forms
  • some performance ramifications to putting signs in literal rules
  • interactions with different sets of rules to apply to user input is questionable
  • that could run things you don't want to run in a tainting fashion
  • may be wise to separate literal parsing from the grammar's notion of literals
  • beyond that, working out the semantics of numification and stringification
  • when we want a basic version of those (give me this type) and otherwise (give me something that does this role)
  • the + operators probably do abstract numification, where it picks the type you want
  • if you say.Num, you get a Num
  • if you say.Rat, you get a Rat
  • Moritz pointed out inconsistent specs with regard to stringification and type objects
  • we expected them to stringify to the name, with parentheses, but other places expected them to stringify to nothing
  • if the internal uses of.str are low-level, inside say or print, we can make that one print the actual name
  • say Type.WHAT will give you the name so you can see it
  • most of the places we do abstract strings, we want to stringify
  • if ~ does the concatenation, we can have it check for undef, return null string, and give a warning
  • that maps to the use cases pretty well
  • most coercion operations probably want to use the abstract coercion
  • maybe
  • also probably removing is ref in favor of backslash
  • haven't specced that yet
  • want to play with the importation syntax
  • tag set notation is clunky
  • thinking about how to track foldability
  • what can you consider a literal, from a grammar point of view
  • otherwise, bug fixes

Will:

  • talked with Patrick about converting Partcl to NQP-rx
  • answering questions about that
  • hopefully Patrick will do all of the work
  • pushing people to close old tickets from RT
  • we can finally use Trac for everything now
  • now we have 600 Trac tickets to close

c:

  • fixed some bugs
  • working on medium term planning

Jerry:

  • are you releasing NQP-rx regularly?

Patrick:

  • I planned to make a new release a week before the Parrot release
  • didn't work out this way this week
  • it's evolving too quickly
  • but that's still the plan

Jerry:

  • will Parrot get a new NQP release in the Parrot releases?
  • sounds like yes, unless a language on Parrot needs a critical bugfix between the merge and the release

Patrick:

  • right
  • NQP will be very stable in the next month or two
  • already has most of the features I ever want to add
  • still has a couple of regex features I need to add
  • expect it to be stable before Parrot 2.0
  • could be wrong, as people jump to use it
  • but that was the point, and we'll see

Jerry:

  • blast could be BLocks, Alternatively STatements

Patrick:

  • blast is far less ugly than blorst

Syndicated 2009-12-04 01:20:53 from pudge

Perl 6 Design Minutes for 11 November 2009

The Perl 6 design team met by phone on 11 November 2009. Larry, Allison, Patrick, Jerry, and chromatic attended.

Larry:

  • named all of the funny-looking blocks "phasers"
  • met with wide-spread approval, or at least humor
  • no change as to the language itself besides nomenclature
  • nice to have a handle to think of them as one thing
  • decided there's no name for the concept used by our lexically-scoped control exceptions
  • those are now lexotic
  • something that'll unwind the stack to a lexically-determined destination
  • noticed the old:panic modifier in S05
  • decided it was impossible to implement correctly
  • very little demand for it
  • couldn't think of a good use for it anyway
  • I removed it
  • the name interpolator,::(), had some strange lookup rules
  • now the runtime lookup in that interpolation is identical to what it would be if the name had been there at compile time
  • clarified that empty blocks and non-matching conditionals return Nil, as suspected
  • documented that clearly now
  • STD now uses something like Patrick's O() assertion form instead of the wrong coercion semantics
  • Patrick also noticed that if you declare a module with a block, it did not disallow semicolon declaration
  • fixed that
  • found three places in the test suite where people had used semicolon syntax as forward declarations
  • fixed those too
  • decided that the STD grammar class needed to split into two
  • one is the mainline Perl 6 class
  • the other is the base class from which everything else derives
  • you don't want all of the rules of the mainline code in that one
  • started to split those
  • probably could use more reformatting for readability
  • thinking about how to do a real parallel NFA
  • reading up on the new Go language

Allison:

  • another small tasks week
  • reviewing patches and answering design questions
  • have a long list of things to do
  • put that list on the Parrot wiki, which has helped
  • Julian submitted a patch for one of those things
  • would like to get some time to work on Pynie
  • have three massive assignments due at the end of next week, so may not be able to get back to Pynie after that

Patrick:

  • the weeks are all blending together so well....
  • Jonathan noticed that on GitHub you can get a list of commits on a project's page
  • Rakudo commits yesterday exceeded a page
  • we're making excellent progress on Rakudo with the new grammar
  • wrote a post on use.perl.org about that last night
  • we're on track with our plan we published a couple of weeks ago
  • made the sanity tests pass sufficiently that we can run the test suite
  • now it's just a matter of re-enabling features to pass the test suite
  • most of those features are written in Perl 6
  • either because of the core Setting or because we went to rewrite them in Perl 6
  • should get major swaths of features working then
  • we'll see how that goes over the next couple of weeks
  • expect that we'll land the new branch sometime in December
  • we'll pass as many tests then as we did in the October release
  • the new version fixes many features we couldn't implement in the previous version
  • lazy lists and constant handling, for example
  • this week, I'll bring NQP into the Parrot repo
  • lots of people want to use it more easily
  • having Parrot compile and install it helps
  • will continue adding features to Rakudo
  • will guide others to add new features to Rakudo
  • it's at the point where lots of other people can do that
  • would still like to write a tutorial on how to write a compiler with NQP
  • it's probably worth waiting a week on Pynie to take advantage of that
  • figured out why NQP-rx code generation was slow
  • UTF-8 bit us again
  • took care of that
  • compilation time from actions.pm went from 108 seconds to 15 on Jonathan's machine
  • about a factor of ten speedup in compilation time

Allison:

  • some parts of Pynie need replacing

Patrick:

  • it's worth it if you want to use protoregexes or the new operator precedence parser
  • they'll give you speed too
  • will use Punie (Perl 1) as the example
  • it has a lot of the features you want in a language

c:

  • fixed a few bugs
  • talking design
  • talking development process and strategy

Patrick:

  • on the semicolon form of module declarators
  • the only model I can think of which works cleanly is that you can put anything you want prior to that declarator
  • once you write one, you can't write another one for the rest of the file
  • that's how I read it
  • originally, the semicolon form had to come first
  • that caused problems with importing things to declare
  • if you allow anything other than module declaration, that's a special case
  • it's easier to say that you get one semicolon form per file, and that's it

Larry:

  • as the errors show in the test suite, people will use the semicolon form out of habit
  • whatever they mean by it will be wrong
  • they use it as a forward declaration in the tests
  • that's neither of these interpretations

Patrick:

  • maybe the semicolon form is wrong
  • maybe we need a brace form which lets you slurp the rest of the file

Jerry:

  • some kind of EOF heredoc?

Larry:

  • if we do use it, I want it close to the top of the file
  • as soon as you put large blocks of things in front of it, you get into trouble
  • it's not obvious which package it is then
  • maybe there's some way of separating the name of the file from the declaration of its dependencies
  • let me think about that more

Patrick:

  • it's not pressing or urgent
  • Rakudo will continue to do what it does

Larry:

  • that hurts the tests, which assumed some other behavior
  • neither STD nor Rakudo caught these errors until I fixed STD
  • I like how STD handles this behavior better now

Syndicated 2009-11-16 21:16:39 from pudge

Perl 6 Design Minutes for 04 November 2009

The Perl 6 design team met by phone on 04 November 2009. Allison, Patrick, Jerry, Will, and chromatic attended.

Larry:

  • answered lots of questions on #perl6
  • speculated about a new test primitive using $a [op] $b to capture pertinent info on falseness
  • many minor spec clarifications this week in response to Jonathan and Patrick
  • closures in strings and regexes now documented to create a lexical scope
  • $_ now defaults to being is ref rather than is rw
  • in regexes, tightened up reversed character class ranges, indirect rule failure semantics
  • deprecated the CANDO section in packages, since we don't look in packages for either methods or subs
  • in hacking, continue to check and fix tests when others check in parsefails
  • STD now gives better messages on bogus statements and backslashes
  • implemented the $_ is ref semantics (to the extent STD cares, which is not very)
  • tightened up error message for precedence failure within a function's arguments
  • catch names with null identifiers
  • .caps now always returns key/value pairs in STD instead of naked values
  • now gives a better message on an unexpected !!
  • .panic now protects itself from infinite recursion on probe for two terms
  • various other minor bug fixes

Allison:

  • asked for a list of things to work on
  • worked through a list of RTs
  • wrote a migration guide for the PCC changes
  • spending a lot of time on my studies
  • quantum computation is a fairly dense subject
  • should catch up soon, will spend more balanced time on Parrot and school

Jerry:

  • answered some S19 questions this week for Patrick
  • didn't answer some others; don't have answers yet
  • working on those

Patrick:

  • busy week for me
  • (refer to my latest journal post)
  • we're redoing Rakudo's grammar using the new tools
  • the Rakudo grammar is a generation closer to the STD grammar
  • we're getting rid of cheats in the existing code as we get closer to STD
  • Rakudo now supports lazy lists
  • it also has true metaoperators
  • previously, Rakudo had separate subs for every metaoperator
  • now it detects when you use a metaoperator and registers the code to generate that metaoperator at load time
  • we don't have to build metaoperators at load time
  • you only pay for the ones you use
  • fixed the problem of assigning to a constant; no longer permitted
  • subroutines now stored with & sigil
  • operator subs stored under their true Perl 6 names, not the PGE-faked versions
  • most of the sanity suite runs
  • Test.pm compiles, but doesn't run
  • it needs END blocks; that'll be trivial to add
  • Jonathan has class/method declarations, multisubs, type checking all working in Rakudo
  • we need to finish getting the core types in place
  • also need to parse subroutine names for operator subs
  • that should get us to compile the Setting again
  • we expect to pass the spectest suite to the same level as the previous version by the end of November
  • could take longer than that, but based on our experience in the past week, I'm optimistic
  • helped Geoffrey Broadwell and others switch plumage to the new NQP
  • they're eager to use the new features of the new NQP
  • working on several other tasks
  • fixing some bugs for Jonathan
  • going to write a blog post about writing a new compiler with NQP
  • probably will use Punie as the example
  • it's easy to do; already done once
  • wrote a compiler for a stack-based language during an IRC conversation last night in about five minutes
  • surprised myself by how easy it is

Will:

  • working on migrating away from Parrot's RT
  • we switched to Trac a year ago
  • it's long past time we switched
  • we're down to 95/96 tickets now
  • encouraging other people to help, so I don't have to do them all
  • eagerly awaiting Patrick's help to convert ParTcl over to the new NQP
  • still three or four Parrot segfaults blocking some effort in Tcl
  • they all have tickets

c:

  • fixed bugs

Jerry:

  • in reimplementing Rakudo with the new NQP, are you pulling out the old cheats?
  • are you putting in new ones?

Patrick:

  • we're starting the internals of the grammar from NQP
  • the Setting, written in Perl 6, stays the same

Allison:

  • is that because the data structure returned from NQP is different?
  • the actions work on parse tree data structures, and have those changed from PGE?

Patrick:

  • they're significantly different
  • it works on protoregexes
  • previously, the operator precedence parser was separate
  • it used to be part of PGE
  • it's more extensible now
  • we based NQP's grammar on the Perl 6 grammar
  • Rakudo's grammar started before that
  • the action methods have changed a lot
  • in answer to Jerry's question, we're refusing to put the old cheats back in
  • the new cheats go in their own directory called cheats/
  • that documents them
  • we know we'll eventually have to take them out
  • we acknowledge that previous cheats were blockers to Rakudo's progress
  • now we come to the point where we ask if we should do the quick cheat or do things the right way
  • so far, we've decided to do the things the right way
  • hence assigning to a constant no longer works
  • we have real lazy lists too

Syndicated 2009-11-07 00:36:09 from pudge

Perl 6 Design Minutes for 28 October 2009

The Perl 6 design team met by phone on 28 October 2009. Larry, Allison, Patrick, and chromatic attended.

Larry:

  • unified nouns and terms in the grammar into a single category
  • they're really the same thing
  • did more spec work
  • worked on global linkage between separate compilation units
  • kicked the GLOBAL:: package out of core
  • the linker has to pull all of those things together
  • different units have different ideas what belongs in global namespaces
  • never specified that I wanted decimal literals to show up as rationals
  • documented that literals stay exact as long as they can
  • there was no specification if you match an undefined variable inside a regex
  • now it warns and fails to match, rather than matching ''

Patrick:

  • if you were looking up out of an aggregate?
  • I'd expect to get a message about an undeclared variable

Larry:

  • trying not to propogate magical undefinedness without more help from the user

Patrick:

  • does it throw the standard "use of undefined value" warning?

Larry:

  • it fails to continue to match
  • lots of places Parrot and Rakudo throw exceptions I think ought not to be exceptions
  • that's been getting better over time
  • people continually try to use angle brackets for lists of numbers
  • we ought to make them more DWIMmy in terms of elements, but not the type of the whole list
  • Carl pointed me at a rant of Guido's about why Python didn't take rationals from abc
  • I decided that the default Rat type should not be infinite precision
  • we can make one available
  • by default, it maxes out precision at something outrageous, like 64 bits for numerator and denominator
  • something that'll be easy to calculate and detect overflow on a modern processor
  • won't try to go beyond that, which'll trend to overflow
  • decided to break the symmetry with integers
  • integers don't naturally expand geometrically in terms of accuracy required
  • clarified the semantics of private accessors
  • they're very primitive, though we're mulling changes to the syntax
  • currently feels a little kludgy
  • the AST entry in a Match object only gets set explicitly to an AST tree node
  • no longer defaults to the string
  • the $() form will default to the string, if there's no AST
  • you can still get the AST/string semantics that way
  • now you can test.ast directly as a boolean to see if you have one
  • holding forth on #perl6 and answering questions

Patrick:

  • watched as others took care of the Rakudo release
  • I like to list that as an accomplishment
  • worked on the new implementation of NQP and the regex engine
  • it's going extremely well
  • it passes all but one test from the Parrot test suite for NQP
  • I haven't bothered to make it parse POD comments right yet
  • worked on native support of grammars and regexes last night
  • worked on having NQP self-host today, compiling its own grammar and action methods
  • there's one runtime issue with initialization
  • then I have to fix up the makeful
  • then it'll be entirely self hosted and won't need Parrot's NQP or PGE to build or run
  • very impressed with the new grammar and protoregex features
  • makes it really easy to put this stuff together
  • frighteningly easy

Larry:

  • I am, after all, lazy

Patrick:

  • if only you had come up with this idea four years ago!

c:

  • he's too lazy for that

Patrick:

  • the code reads naturally
  • where it doesn't read naturally, I haven't put in features yet
  • has contextual operators, defined-or, direct access to PIR ops as if they were function calls
  • you don't have to box and unbox within a PIR string
  • that gets handled automatically now
  • NQP is really convenient for writing PIR subroutines

c:

  • the generated code is ~60% smaller

Patrick:

  • it's much smaller
  • if you combine PIR instructions, NQP-rx knows the types
  • you don't have to box and unbox between them
  • an integer result that goes into an op that takes a string doesn't go through a PMC for the conversion
  • fell out naturally from the PAST implementation
  • had a long IRC discussion about fetch and vivify opcodes
  • fetch now exists
  • don't expect a huge performance improvement, but I do expect our generated code to look nicer
  • can replace eight or ten opcodes with a single opcode
  • highly reusable in many new situations
  • people will admire the efficiency of the generated code
  • started a file with various questions to record for Larry
  • hopefully that works out well

Larry:

  • I have to be careful about updating the file versus the spec

Patrick:

  • I'll point it out to you
  • reviewed the Perl 6 book, the work of Jonathan, Moritz, and Carl
  • very pleased with the progress they're making
  • plan to contribute in the next couple of weeks
  • Jonathan updated Rakudo to work with Parrot's new PCC on trunk
  • there's a bit of a slowdown as a result
  • mostly from parsing
  • that's mostly PGE
  • not too surprised about that
  • won't worry about that, as we'll use a new parser soon
  • we'll optimize the new parser
  • need to get that a little bit further
  • then I'll put out a public call for people to profile the NQP tests
  • they're relatively small, compared to Rakudo
  • they exercise a lot of the parser
  • good place to find bottlenecks and improvements
  • our next step is to convert Rakudo to its new grammar
  • had a breakthrough last night
  • obvious place to start: NQP's grammar
  • it's heavily based on STD as well
  • I'll copy that over to a branch in the Rakudo tree and we'll build it up from there

Allison:

  • mainly working on PCC merge and cleanup
  • a few fixes
  • added a function for Will that I'd planned to add for 2.0 anyway
  • released a new version of Pod::Simple, with lots of help from David Wheeler
  • that makes me look forward to Perl 6 a lot
  • the old format for parsing POD needs to die
  • working on Pynie again
  • asked for suggestions as to what to work on yesterday
  • cleaning up old code as well

c:

  • added fetch
  • will wait to see how that works out for NQP before adding vivify
  • did a lot of profiling, especially with Vasily
  • Parrot trunk is as fast as or faster than it was before the PCC merge
  • otherwise, fixing bugs

Allison:

  • is it possible with the new NQP/PGE combination to use them as lex and yacc?
  • in the language tarball, you can ship only PIR code, not NQP code

Patrick:

  • the short answer is "yes"
  • that's how NQP bootstraps itself
  • keeps a PIR copy in the repo
  • builds that copy into PBC files, which should be complete by themselves
  • then it uses them to compile the source twice through to get source updates
  • you could take those PIR files
  • they stand alone
  • compile them into PBC files and use that as a library

Allison:

  • I want to ship the PIR files
  • can ship Debian/Ubuntu packages of Pynie that depend only on Parrot

Patrick:

  • I consider the PIR files the shippable artifacts
  • I can set up Parrot so that those files are part of the Parrot repo
  • periodically, with a discussion of periodicity, Parrot puts a copy of NQP files in the repo

Allison:

  • do we need it in the tarball?

Patrick:

  • that makes it easier for Pynie and other languages

Allison:

  • I'd make NQP a build dependency of Pynie in the packages
  • the tarball for Pynie only includes the PIR version of Pynie's grammar

Patrick:

  • Parrot isn't completely standalone for this
  • you can use NQP to build the PIR files for a parser and translator
  • running the parser/translator does not depend on NQP.pbc
  • the parser and translator will still depend on Regex.pbc and HLL.pbc, which are effectively the new versions of PGE.pbc and PCT/HLLCompiler.pbc

Allison:

  • we need that PIR library with Parrot

Patrick:

  • there are four components
  • they're separate now, but they'll be there
  • the regex engine will be a standalone Regex.pbc
  • there's a new version of HLLCompiler
  • those are the two biggies
  • there's a PAST compiler which compiles Perl 6 regular expressions
  • only necessary if you want to compile Perl 6 regular expressions
  • then there's NQP itself
  • I think everyone will want to have three of those four lying around
  • every language (hopefully) will use them
  • why not include them?
  • NQP doesn't need to be in the Parrot runtime
  • it can be in parrot-dev

Allison:

  • my wariness comes from trying to maintain Pod::Simple outside of the Perl 5 core
  • it's painful trying to maintain that on two different development cycles at the same time

Patrick:

  • that's similar to what we have now with Rakudo
  • Parrot and Rakudo have different cycles

Allison:

  • I was hoping that moving NQP out of the Parrot repository helped alleviate that problem
  • NQP could have its own release cycle
  • it's an external module that people depend on and load when they need or want it

Patrick:

  • I don't expect it to evolve much after January
  • it'll be very, very stable
  • the point isn't to make NQP powerful or add lots of extensions
  • it's supposed to be simple

Allison:

  • are Perl 6 grammars still changing?

Patrick:

  • not much, in my impression
  • I suspect they might evolve toward what NQP provide
  • we have several months to try different approaches

Allison:

  • what's in the repo right now will be there until 2.0
  • I was toying with the idea of using CPython's parser and parse its AST
  • still think we're better off using PGE in whatever form it ends up with
  • looking for ways to make sure that we can still ship Debian packages right away
  • even if it takes a while for NQP as a separate package to make it in

Patrick:

  • I'll create a patch
  • or check in an example with the four files
  • I'll leave the existing NQP and PGE alone in the repo
  • they'll remain at least through 2.0 and the forseeable future
  • I'll set up Parrot to make it easiest for HLL developers
  • if not necessarily packagers
  • you can change that if you want

Syndicated 2009-11-02 00:43:41 from pudge

449 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!