Re: HP-UX build notes
Nick Glencross [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: #define PARROT_HASH_ALIGNED_FUNCPTR 0 Actually, where it uses this in mmd.c is actually an #ifndef which means that really the above line should be commented out. The various HPUX-related changed didn't make it into the release, sorry. Could you please provide a patch for all outstanding issued. Thanks, leo
Re: Building Parrot with MinGW, ActivePerl command.com
On Saturday 04 June 2005 20:29, Clement Cherlin wrote: I actually have Linux installed on this machine, but for reasons which I'm not going to get into here I use Win98 for day-to-day computing. I therefore took it as a challenge to get Parrot to build with crufty ol' command.com. I have a Win98 installation, too. (But I use it only for testing...) I noticed the problems you describe, but had no time to fix them yet. So, thanks for that patch, I'll have a look at it this week (or, maybe at the begin of the next week). jens
Re: [perl #36119] [PATCH] Reapply execute permissions on dynclasses for HP-UX
Leopold Toetsch wrote: Nick Glencross (via RT) wrote: +if ($^O ne 'MSWin32') { I'd much more prefer one of: a) if $^O eq 'hpux' b) fix the copy to preserve perms Anyway, as hpux is still broken in several other places, I'll drop a note in PLATFORMS and not apply the patch now. While this change was put in specifically for HP-UX, from what I've seen most Unices do actually have execute permissions on dynamic libraries, which are currently lost in the copy. It just so happens that HP-UX is really unhappy about it. That's why I've said chmod for non-Windows. [Have a look in runtime/parrot/dynext, and you'll see that Linux has libnci_test.so with execute, but the others don't] I don't think that File::Copy is intended to preserve execute flags, it's aim for for cross-platform compatibility. Anyhow, as you say, let's leave this for the time being until I've made better progress on HP-UX next week. Nick
flattening arguments
Hi, From the Perl6 and Parrot Essentials: - 8 - sub flat_hash ($first, $second) { say first: $first; say sec. : $second; } my %hash = (first = 1, second = 2); flat_hash(*%hash); - 8 - It says, that No compatible subroutine found. I've modyfied the subroutine: - 8 - sub flat_hash (+$first, +$second) { say first: $first; say sec. : $second; } - 8 - Now, I got: first: first 1 second 2 sec. : - I've tried it on the feather.perl6.nl machine, with pugs. Is it the right behaviour? Bye, Andrs
Re: using rules
Hi, No ideas? Bye, Andras I'm working on a web templating system, and I'm wondering how should I use rules? I have these defs: rule elem { \ wts \: ([a..z]+) \/ \ } rule block { \ wts \: ([a..z]+)\(.*?)\ \/ wts \: $1 \ } I would like to execute subroutines during the evaluation. What should I do? Is the following the right way? given $template { s/block/{trigger_block()}/; s/elem/{trigger_elem()}/; } How can I catch the matched elem name, and block content? I'm guessing that hypotetical variables can be the solution, but it says, that those variables should have been defined, before I use them, and it's not that case.
Re: flattening arguments
On 6/5/05, BÁRTHÁZI András [EMAIL PROTECTED] wrote: I've tried it on the feather.perl6.nl machine, with pugs. Is it the right behaviour? Caller-side splatted arguments aren't yet implemented in Pugs. As far as I know, the specced behaviour is still correct. Stuart
Re: using rules
I'll take a shot at it since no one else seems to want to. :-) On 6/3/05, BÁRTHÁZI András [EMAIL PROTECTED] wrote: How can I catch the matched elem name, and block content? I'm guessing that hypotetical variables can be the solution, but it says, that those variables should have been defined, before I use them, and it's not that case. Named subrules have their values stored in the $/ match object under a key of the same name. So, in this case: $foo ~~ m/block/; $/block will contain the matched block, and $/block[1] will contain the block content (i.e. the content of the second capturing group). The working is the same in the case of s///, so you can probably safely use $/ within your trigger_block and trigger_elem. Hypothetical variables work like this: my $bar; # not quite sure you need to initialise it; just in case :-) $foo ~~ m/$bar := (bar|baz)/; Now $bar will contain either bar or baz, depending on which one was matched. Hope this is helpful. Corrections are welcome from anyone who spots any mistakes. Aankhen
Re: using rules
Hi, I'll take a shot at it since no one else seems to want to. :-) Hope this is helpful. Corrections are welcome from anyone who spots any mistakes. Thanks, it helped me! More questions. ;) It seems to me, that the following constructs not yet(?) implemented in Pugs. Is it true? Built-in rules: sp alpha etc. Rule modifiers (:i modifier after the name of the rule): rule xxx :i { anything } It works well w/o :i. Bye, Andras
Parrot on HP-UX
Folks, I hope that not too many of you are getting fed up with me going on about HP-UX. I'm nearly there with having it working with manually hacked Makefiles etc. Some tweaks will be needed to the Configure tests (not too many), but I'd just like to summarise what I believe to be the 'big picture' in a single email. I guess the main complexity comes from potentially having 3 C compilers and 2 linkers. We have: * The Bundled C compiler: which comes as standard with HP-UX, is a KR compiler and is pretty much just intended to generate a new kernel. It won't be up to compiling parrot. * A purchased HP C compiler. This is invoked with 'c89' or 'cc -Aa'. Full C compiler. * GNU C. Invoked with gcc or perhaps cc Most of us know and love it. * HP-UX linker, ld. Not sure if there is a bundled/commercial version. * GNU ld. gcc may be configured to use the HP-UX or GNU linker backends. HP-UX also has some quirks: * Shared libraries *must* have execute permissions * All C files which are to go into shared libraries *must* all be compiled with 'Position Independent Code' flags * The system ld doesn't export symbols in the main executable to be visible to shared libraries by default * The HP-UX linker does not like -g * [Some strange alignment rules?] I'll now try to clearly and concisely summarise the flags that are required for compilation. HP-UX C compiler: cc: c89 or 'cc -Aa' cc_shared: +z (should be Perl's cccdlflags variable) ccdlflags(?): -Wl,-E if used with HP-UX ld GCC compiler: cc: cc or gcc cc_shared: -fpic (Perl's cccdlflags variable) ccdlflags(?): -Wl,-E if used with HP-UX ld HP-UX ld: ld: ld ld_share_flags: -b GNU ld: ld: ld ld_share_flags: -shared The -Wl,-E (actually -E passed to ld) tells the linker to export symbols from the resulting binary so that they are available to dynamically loaded libraries. -fPIC is possible instead of -fpic, and +Z -z is better than -z (thanks H.Merijn), but we'd use whatever Perl supplies. There basically seem to be a few assumptions in the configured system which are a bit gcc/linux-centric. For instance, the following files need to be compiled with $(cc_shared) as they make their way into dynamic libraries: src/extend.o src/nci_test.o dynclasses/*.o The parrot executable need to be linked with (what I've called above) $(ccdlflags) for dynclasses to work. If no one sees any big misunderstands here, I'll press on with my tweaks over the next few days, Regards, Nick
Re: Parrot on HP-UX
Nick Glencross wrote: Folks, I hope that not too many of you are getting fed up with me going on about HP-UX. I'm nearly there with having it working with manually hacked Makefiles etc. My hacked HP-UX build now passes most tests. Wohooo! Failed Test Stat Wstat Total Fail Failed List of Failed t/pmc/nci.t2 512562 3.57% 8 52 t/pmc/signal.t 2 512 32 66.67% 1-2 t/src/manifest.t 1 256 51 20.00% 3 3 tests and 69 subtests skipped. Failed 3/151 test scripts, 97.35% okay. 5/2488 subtests failed, 99.76% okay. nci tests 8 and 52 actually hang, so I've hacked them so that they just fail. Something bad happens with manifest which I haven't looked into (there are lots of unitialised variable messages). signal adds a 'Hangup' message from the shell. Now for the hard part of integrating this back into the build process! Cheers, Nick
Re: Hello
GlennH wrote: Hello folks, I read about the Phalanx project on the yahoo Agile Testing group and thought I'd sign up the mailing list and skulk in the background. Don't just skulk. Enlist! http://qa.perl.org/phalanx/ http://phalanx.kwiki.org/ jimk
fail to embed parrot in pugs
As follows are what I did: # follow the instruction of parrot/README, I download the http://www-306.ibm.com/software/globalization/icu/downloads.jsp, and success to install the ICU library. # perl Configure.pl make make install # now parrot is running. but it's not in my PATH. should I 'ln fs' it? # exprot PUGS_EMBED='parrot' export PARROT_PATH='/usr/local/parrot-0.2.0' perl Makefile.PL make # make failed, after tons of successful Compilings, it returns Linking ... /usr/bin/ld: cannot find -lparrot collect2: ld returned 1 exit status # my OS is ubuntu. and gcc version 3.3.5 (Debian 1:3.3.5-8ubuntu2) + GNU Make 3.80 ExtUtils::MakeMaker is the newest. and the pugs and parrot is the newest.(I svn up them.) I think I miss something, but what the hell is it? Thanks, Regards /Fayland Lam/ --- http://www.fayland.org/
Re: Parrot on HP-UX
On Sun, 05 Jun 2005 17:05:13 +0100, Nick Glencross [EMAIL PROTECTED] wrote: Folks, I hope that not too many of you are getting fed up with me going on about HP-UX. I'm nearly there with having it working with manually hacked Makefiles etc. Some tweaks will be needed to the Configure tests (not too many), but I'd just like to summarise what I believe to be the 'big picture' in a single email. I guess the main complexity comes from potentially having 3 C compilers and 2 linkers. We have: * The Bundled C compiler: which comes as standard with HP-UX, is a KR compiler and is pretty much just intended to generate a new kernel. It won't be up to compiling parrot. Because it is not an ANSI compliant compiler, and does not pretend to be one It's braindead and useless * A purchased HP C compiler. This is invoked with 'c89' or 'cc -Aa'. Full C compiler. cc -Ae * GNU C. Invoked with gcc or perhaps cc Most of us know and love it. On HP-UX, please use 3.0.4 or newer For 64bit compiles on HP-UX 11i, do NOT use 4.0.0 * HP-UX linker, ld. Not sure if there is a bundled/commercial version. there is only one. Please advice HP-UX users to check if they have applied the most recent patches, which makes a difference * GNU ld. Not available for 32bit builds on HP-UX gcc may be configured to use the HP-UX or GNU linker backends. HP-UX also has some quirks: * Shared libraries *must* have execute permissions * All C files which are to go into shared libraries *must* all be compiled with 'Position Independent Code' flags -z +Z for HP C -fPIC for gcc * The system ld doesn't export symbols in the main executable to be visible to shared libraries by default * The HP-UX linker does not like -g Yes, it does, but not in combination with -O2 or higher HP C and GNU gcc with -O1 both work fine with -g * [Some strange alignment rules?] I'll now try to clearly and concisely summarise the flags that are required for compilation. HP-UX C compiler: cc: c89 or 'cc -Aa' -Ae cc_shared: +z (should be Perl's cccdlflags variable) -z +Z (capital Z) ccdlflags(?): -Wl,-E if used with HP-UX ld -Ae will automatically pass this to ld GCC compiler: cc: cc or gcc cc_shared: -fpic (Perl's cccdlflags variable) -fPIC ccdlflags(?): -Wl,-E if used with HP-UX ld HP-UX ld: ld: ld ld_share_flags: -b GNU ld: ld: ld ld_share_flags: -shared The -Wl,-E (actually -E passed to ld) tells the linker to export symbols from the resulting binary so that they are available to dynamically loaded libraries. -fPIC is possible instead of -fpic, and +Z -z is better than -z (thanks H.Merijn), but we'd use whatever Perl supplies. The most recent perl5 hints for HP-UX already do so IIRC There basically seem to be a few assumptions in the configured system which are a bit gcc/linux-centric. For instance, the following files need to be compiled with $(cc_shared) as they make their way into dynamic libraries: src/extend.o src/nci_test.o dynclasses/*.o The parrot executable need to be linked with (what I've called above) $(ccdlflags) for dynclasses to work. If no one sees any big misunderstands here, I'll press on with my tweaks over the next few days, -- H.Merijn BrandAmsterdam Perl Mongers (http://amsterdam.pm.org/) using Perl 5.6.2, 5.8.0, 5.8.5, 5.9.2 on HP-UX 10.20, 11.00 11.11, AIX 4.3 5.2, SuSE 9.2 9.3, and Cygwin. http://www.cmve.net/~merijn Smoking perl: http://www.test-smoke.org,perl QA: http://qa.perl.org reports to: [EMAIL PROTECTED],perl-qa@perl.org
Announcing amber for parrot 0.2.1
I have made available version 0.2.1 of the amber for parrot scripting language. This is a language being designed specifically for parrot. The syntax and semantics of amber are largely inspired by Eiffel although there's a good deal of ruby in there too (especially the anonymous agents which work like ruby blocks). This is nothing more than a proof-of-concept release, a piece of hack pie to confirm that one can implement some of the ideas of Eiffel in a scripting language that targets the parrot virtual machine. Many things don't work, and those that do are poorly documented. Nevertheless, the example programs and the hand-crafted test cases do all work. The current release is for Linux, and was built with SmartEiffel 2.1. http://smarteiffel.loria.fr/ You will need to install version 0.2.1 of the parrot virtual machine. For those who don't want to install an Eiffel compiler, it should be possible to build amber from the C-code generated by SmartEiffel. I'll make another announcement when I have prepared a C-based distribution. I've set up a website at http://xamber.org/ - just click on the Download link. You can also browse the development sources online, and if you have the darcs version control client you can keep a synchronised copy on your own machine. Thanks to anyone who takes the time to try this. Let me know if you have any problems - either by posting to this group or by emailing me directly. To whet your appetite, here's a sample amber script: -- Prints the song 99 Bottles of Beer -- See http://99-bottles-of-beer.net/ 99.down_to(1, agent(n) do print_line(bottles(n) on the wall, bottles(n) .) if n = 0 then print_line(Go to the store and buy some more ... 99 bottles of beer.) else print(Take one down and pass it around, ) print_line(bottles(n - 1) on the wall.\n) end end) private bottles(n) do if n = 0 then result := No more bottles of beer elseif n = 1 then result := 1 bottle of beer else result := n bottles of beer end end end Regards, -- Roger Browne [EMAIL PROTECTED]
Re: Parrot on HP-UX
Nick Glencross wrote: Folks, I hope that not too many of you are getting fed up with me going on about HP-UX. I'm nearly there with having it working with manually hacked Makefiles etc. I've nearly finished making my updates. I need some help on one aspect though... extend.o and nci_test.o need to be built with $(CC_SHARED) in addition to the normal flags. What's the most straightforward way of doing this? I've had a couple of experiments with config/gen/makefiles/root.in, but don't know what the 'right thing' to do is... Any help would be appreciated... Cheers, Nick
Quick questions: multi submethod and undef.method
Hi, two quick questions: Are multi submethods allowed? my $x = undef; my $y = $x.some_method; # $y now contains an unthrown exception object, saying that undef # doesn't .can(some_method), right? say $y; # Only now it dies, correct? This is important if you have a sub which may either return a custom object or undef: my $x = sub_which_returns_an_object_or_undef(); my $y = $x.some_method; One builtin example is caller: my $x = caller(); # undef if there's no such stack frame my $y = $x.line; # unthrown exception object --Ingo -- Linux, the choice of a GNU | Elliptic paraboloids for sale. generation on a dual AMD | Athlon!|
Re: Parrot on HP-UX
Nick Glencross wrote: Nick Glencross wrote: extend.o and nci_test.o need to be built with $(CC_SHARED) in addition to the normal flags. What's the most straightforward way of doing this? I've had a couple of experiments with config/gen/makefiles/root.in, but don't know what the 'right thing' to do is... Just to clarify, I've got the CC_SHARED variable set in the Makefile, the help I need is on the actual line to do the compile... Should I just list these two dependencies explicitly, or is there some clever magic? Cheers, Nick
Re: fail to embed parrot in pugs
On Sun, 05 Jun 2005, fayland wrote: # exprot PUGS_EMBED='parrot' export PARROT_PATH='/usr/local/parrot-0.2.0' perl Makefile.PL make # make failed, after tons of successful Compilings, it returns Try the parrot build tree, rather than where parrot is installed. -- Greg Matheson, Taiwan