Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading… and cause confusion #622

cotto opened this Issue · 14 comments

7 participants


It's confusing to have two scripts that appear to do the same thing without a clear indication why they both exist. We need to differentiate the documentation of these scripts to the point where a potential HLL dev can look the inline POD of both of them and easily decide which one is appropriate for his or her needs.



tools/dev/ was added to the repository by pmichaud last December:

r38147 | pmichaud | 2009-04-16 01:21:25 -0400 (Thu, 16 Apr 2009) | 13 lines
Add tools/dev/, a substantially modified version
of tools/dev/ .

... and further maintained by pmichaud:

r42889 | pmichaud | 2009-12-04 12:26:19 -0500 (Fri, 04 Dec 2009) | 3 lines
[tools] Update to build for nqp-based toolchain.
Add to files in installed Parrot.

tools/dev/ now appears to be generated from tools/dev/ gerd and fperrad appear to be the principal contributors to this program.

Gerd, François, Patrick: Can you comment on any of the issues cotto has raised?

Thank you very much.



Okay here is my comment without knowing much about it. is the one that the PCT-Tutorial in examples/languages/squaak/doc refer to. seams to be newer.

> perl /usr/lib64/parrot/2.7.0/tools/dev/ Blabla Blabla.dir
Your new language has been created in the Blabla.dir directory.
To do an initial build and test of the language:
cd Blabla.dir
perl [--gen-parrot]
make test

If the language is created with, the same is done with this commands:

> cat README
Language 'Blabla' was created with /usr/lib64/parrot/2.7.0/tools/dev/, r47087.
$ parrot setup.pir
$ parrot setup.pir test

It seams to be a question of design.

That is what I am thinking:

If "" is newer and better then "" can removed und the PCT Tutorial should be updated to have a nice starting point for potential HLL developer. Perhaps the PCT-Tutorial can refer to both.


My vote is to pick ONE. I don't care which one, but having 2 is just confusing to incoming HLL devs.


The basic language files (, ...) generated from both scripts have the same content. So it should be possible to merge "" and "" and give the result an option to choose the design that should be used for the generating of a language. I will start putting both scripts together. I will call the result of the merge "", because I like this name more. [--generate-with=make|setup]

I will give the option "generate-with" as default the value "setup". Better names for the option as "generate-with" are welcome.


Replying to gerd:

So it should be possible to merge "" and "" and give the result an option to choose the design that should be used for the generating of a language. I will start putting both scripts together.

Gerd, Thanks for taking this on. I'm just hoping that we can hear from Patrick as to his thoughts around


On Mon, Sep 06, 2010 at 12:33:12PM -0000, Parrot wrote:
> Comment(by jkeenan):
>  Replying to [comment:4 gerd]:
>  > So it should be possible to merge "" and
>  > "" and give the result an option to choose the design
>  > that should be used for the generating of a language. I will start putting
>  > both scripts together.
>  Gerd, Thanks for taking this on.  I'm just hoping that we can hear from
>  Patrick as to his thoughts around ''''.
Sorry it's taken me so long to respond -- I've been trying (and largely
failing) to formulate a positive and clear response.  Overall I'm -0.5 on
the proposal to merge the two scripts into a single tool.
As gerd++ points out earlier in the thread, behind the two tools lie
strong differences of opinion regarding the mechanics of the build and
install system.  In fact, the primary reason I abandoned
and started is because I was extremely uncomfortable
with the many modifications being made to, and it was
far easier to start again from scratch with a new tool than to try to
work around the changes being made to the existing one.
At this point I'm still strongly in favor of a build system similar to
what, NQP, and Rakudo currently use, and I don't want
to feel "encumbered" by setup.pir.  I don't find the proposal to provide
a "make vs. setup" option switch to to be all that
compelling; to a large degree I think it just converts the newbie question
of "Which script do I choose, and why?" to "Which --generate-with= option
do I choose, and why?".  The fact that --generate-with= is proposed to
default to "setup" makes me even less happy with the proposed merger, as
it basically eliminates the whole reason behind why I started in the first place.
The reason my vote is -0.5 instead of a full -1.0 is because I recognize
the current situation is not ideal, and I don't have any strong alternatives
to offer at this time.  I'm also trying to avoid an appearance of
"my way of doing things is the only correct answer", because I do
acknowledge that there are justifications for the setup.pir approach
as well and I respect the efforts the setup.pir authors have put into
that system.
So, I'm not wanting to say "absolutely don't go down this path".  I'm
just trying to flag up that I think that trying to develop a single
language creation script that supports setup.pir isn't likely
to work out at all well for the projects I'm working on, I'm not likely
to support the resulting script if it is merged, and that perhaps
we could continue searching for other means of resolving the
existing confusion.

I don't care about the default value of "--genetate-with=". Setting it to "setup" was only a suggestion. I only think that the "setup.pir" approach should not completely ignored. I think a script with an option is more easy to maintain then two scripts and an option is easier to explain then a reason for two scripts.

The "setup.pir" part could go in a separate subroutine and even in a separate file and this part could be maintained from the setup.pir group.

In consideration to Patick's comment I still suggest the merge:

- by start writing a merge in

- generate the file from it

- setting --generate-with to "make" as default

- working on it as long everybody agree with it

- then delete and and let be generated from

- I would like that has a correct shebang, is executable and installed in the bin path

Would it be okay if I start to do this? Or may be the composers of the scripts want to do this by themselves? May be someone has a better or complete other idea. Means are welcome.


I am +1 to gerd++'s merging of the scripts, which should default to "make". Another possibility is to keep the scripts separate but have them use the same backend code.

At the least, we need some basic tests for these scripts.

As for installing the scripts, I think they should have the word "parrot" in them somewhere, such as "create_parrot_language", if we are going to install them.


I vote for the shared backend code. If people insist, we can have two thin front-ends which call the shared backend code. The benefit to this kind of setup is less duplicated logic, easier maintainability, etc. Also, if this is a tool that we're going to be using and relying on in the long term, we need to add unit tests and lots of good documentation and examples (and tests for those examples).

It's probably worth taking some effort to get the design of this tool correct, especially since this is going to be the first introduction to Parrot that many developers are going to have, and if it's an absolute piece of shit a first impression will be created that is going to be hard for us to overcome later. Plus, this tool is going to create a foundation for new projects, and problems in this setup will be difficult for people to correct later.

I suggest the following:

  • Merge core logic between the two modules. Add a script with a front-end that takes a switch. Whichever default we use is inconsequential
  • Create two new front-end scripts, create_language and mk_language_shell, that are thin wrappers around the core utility to force the switch argument to one value or the other
  • Abstract away the generated files and folder structure into some kind of template file format. That way people will be able to use any existing template, or create their own. This may be important on certain platforms where the default setup.pir or makefile might not be correct, or in cases where certain types of project need different templates. One thing that comes to mind here is creating extension/embedding applications or shared bytecode libraries that do not use the same format as a new HLL project, but for which a template would be very valuable.

Fixing this ticket will make trivially easy, which is a very important ticket to close.


Replying to dukeleto:

Fixing this ticket will make TT #1845 trivially easy, which is a very important ticket to close.

That ticket has been closed, but see also TT #2003 and TT #2009.


Replying to jkeenan:

duke, Can we get an update on the status of this ticket?

Thank you very much.



pmichaud mentioned in a private thread that his focus will be on nqp-based language creation scripts (not nqp-rx) and that we should drop unless someone cares to maintain it. If nobody steps forward in the next few weeks, consider it a license to delete the script and close this issue.


Yeah, it needs to be totally rewritten.

I have a slightly improved fork of it in but I think I am leaning towards just starting fresh with Module::Starter.

app-parrot-create is a webapp that will allow people to choose a few drop-downs and create a language skeleton. It would make a good GSoC project as well.

@leto leto was assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.