Forwarding reply to list.
On Tue, Sep 24, 2013 at 11:46 AM, Will Coleda <w...@coleda.com> wrote: > First off, thank you for your interest in partcl. > > You may be overestimating how much of tcl was implemented - math::bignum > never worked -- The PIR-only implementation only ever ran about 30% of the > tests, if I recall correctly. > > I have no intention of adding more to it, as it became very hard to > maintain the existing work several years ago. I'm currently actively > working on getting partcl-nqp up to speed running against the github's > perl6/nqp (not the nqp shipping with parrot) - once that's working, we'll > be able to target parrot as a VM, but I've no idea how HLL interop would > work in that case. > > I'd be willing to consider pull requests against partcl/partcl if you > still want to try - package is implemented here: > > https://github.com/partcl/partcl/blob/master/runtime/builtin/package.pir > > As you can see, there's just a shell of [package], and it should error out > when you give it a arguments it doesn't understand. > > If you're trying to pull in something from tcl's stdlib, you'll need to > add it to library/ (being sure to pull a version compatible with the > existing files - see > https://github.com/partcl/partcl/blob/master/library/README) > > Note that this was a challenging effort, as tcl isn't designed to be > re-implemented; so it's quite possible that pulling in ::math::bignum will > require some other huge chunk of tcl to be implemented that might not be. > Best of luck. > > If you get stuck, I'd be happy to get some tuits against partcl/partcl-nqp > instead. > > Regards. > > On Tue, Sep 24, 2013 at 10:43 AM, Ashraya <theemeralds...@gmail.com>wrote: > >> Hi Will, >> >> I was able to get partcl working in parrot 5.7.0. >> It needed the Glod.pir file to be present in the appropriate directory in >> parrot. It works then. >> >> But, looks like importing modules is a problem now. >> >> ashiva@ubuntu:~/rakudo/partcl$ ./tclsh >> % package require math::bignum >> % set a [::math::bignum::fromstr 88888881111111] >> Null PMC access in get_pmc_keyed() >> % set c [::math::bignum::mul 88888881111111 88888881111111] >> Null PMC access in get_pmc_keyed() >> % >> >> >> This is what I am getting. Any clues as to where I can try to fix this ?? >> I don't mind fixing it to make it work. >> I need clues as to where to look to fix it. Please help. >> >> Thanks & Regards, >> Ashiva >> >> Thanks & Regards,* >> Ashraya S Shiva* >> >> >> On Wed, Jul 24, 2013 at 12:12 AM, Will Coleda <w...@coleda.com> wrote: >> >>> FYI, I'm the partcl developer. >>> >>> Some notes about the status of partcl on parrot: >>> >>> https://github.com/partcl/partcl is the old, PIR based version - this >>> version was more complete, written in PIR & C, but it is not even being >>> tested regularly to insure that changes in parrot don't break it, as >>> previous breaking changes are still unresolved. >>> >>> https://github.com/partcl/partcl-nqp is newer, and is targeting the >>> nqp-rx that ships with parrot, which is, so far as I know, no longer >>> maintained - a snapshot is bundled in with parrot. >>> >>> partcl-nqp has a branch, nqp2, which is in the middle of trying to >>> target the standalone nqp, which is being maintained. However, this is a >>> work in progress, and I'm not sure the branch even compiles at this point. >>> The goal is to 1) make this work with the new standalone NQP, and then to >>> get this version as functional as the PIR version once was. But it's not an >>> actively developed project. >>> >>> So, it looks like you're using the first version... and yes, I can >>> reproduce your problem with my installed parrot (5.5.0-devel) >>> >>> I haven't done a bisect, but it looks like this file (Tcl::Glob) was >>> installed as part of parrot's 5.0.0-devel branch, but isn't as of 5.5.0 >>> >>> So, partcl on PIR is extra broken until that's fixed, or you could try >>> with an older parrot version. >>> >>> Apologies. >>> >>> On Tue, Jul 23, 2013 at 2:18 PM, Ashraya <theemeralds...@gmail.com>wrote: >>> >>>> One more thing.. I am trying to compile TCL code here too.. >>>> >>>> But it doesn't seem to work : >>>> >>>> ashiva@ubuntu:~/Parrot/rakudo/partcl$ ../parrot/parrot tcl.pbc -e >>>> "puts {hello world}" >>>> "load_bytecode" couldn't find file 'Tcl/Glob.pir' >>>> current instr.: 'prepare_lib' pc 27748 (runtime/builtin/dict.pir:102) >>>> called from Sub '_main' pc 0 (src/tclsh.pir:39) >>>> called from Sub '_main' pc 3 (src/tclsh.pir:42) >>>> ashiva@ubuntu:~/Parrot/rakudo/partcl$ >>>> >>>> >>>> I read in a conversation thread that this is working.. But I am not >>>> able to understand where I am going wrong. >>>> >>>> Please help. >>>> >>>> Thanks a lot, >>>> Ashraya >>>> >>>> Thanks & Regards,* >>>> Ashraya S Shiva* >>>> >>>> >>>> On Tue, Jul 23, 2013 at 9:54 PM, Will Coleda <w...@coleda.com> wrote: >>>> >>>>> It sounds like you're trying to compile C code with parrot - Parrot is >>>>> a compiler for the languages PIR and PASM, and provides an interpreter to >>>>> run PBC (parrot bytecode). >>>>> >>>>> You can compile C code that interoperates with parrot (using the >>>>> embed/extend interface), but you cannot use parrot to compile and run C >>>>> code by itself. For that, you'd use a tool like GCC. >>>>> >>>>> >>>>> On Tue, Jul 23, 2013 at 11:58 AM, Ashraya <theemeralds...@gmail.com>wrote: >>>>> >>>>>> >>>>>> Hello Duke, >>>>>> >>>>>> Let me rephrase my question. >>>>>> >>>>>> For example, I write a simple perl file, hello.pl : >>>>>> #!/usr/bin/perl >>>>>> print "Hello World" >>>>>> >>>>>> To compile this, I use : parrot perl6.pbc hello.pl >>>>>> >>>>>> The output is : Hello World >>>>>> >>>>>> Similarly, if I have a C file, hello.c : >>>>>> >>>>>> #include<stdio.h> >>>>>> >>>>>> int main() >>>>>> { >>>>>> printf("Hello World\n"); >>>>>> return 0; >>>>>> } >>>>>> >>>>>> How would I compile this to get the output? >>>>>> >>>>>> Note : I downloaded the c99 package for parrot from github but I >>>>>> could not get this installed. >>>>>> >>>>>> Thanks & Regards,* >>>>>> Ashraya S Shiva* >>>>>> >>>>>> >>>>>> On Tue, Jul 23, 2013 at 7:23 PM, Jonathan "Duke" Leto < >>>>>> jonat...@leto.net> wrote: >>>>>> >>>>>>> Howdy Ashraya, >>>>>>> >>>>>>> I believe nobody is answering you because they don't quite understand >>>>>>> what you mean. >>>>>>> >>>>>>> Could you ask your question another way, and give some more >>>>>>> background >>>>>>> about what you are trying to do? >>>>>>> >>>>>>> Duke >>>>>>> >>>>>>> On Sun, Jul 21, 2013 at 10:51 PM, Ashraya <theemeralds...@gmail.com> >>>>>>> wrote: >>>>>>> > A gentle reminder.. Please reply. How to convert a C code into PIR >>>>>>> code ? >>>>>>> > >>>>>>> > Thanks & Regards, >>>>>>> > Ashraya S Shiva >>>>>>> > >>>>>>> > >>>>>>> > On Wed, Jul 17, 2013 at 4:30 PM, Ashraya <theemeralds...@gmail.com> >>>>>>> wrote: >>>>>>> >> >>>>>>> >> Hello Duke, >>>>>>> >> >>>>>>> >> I am trying one of the examples in the .pod you have given : >>>>>>> >> >>>>>>> >> /* foo.c */ >>>>>>> >> >>>>>>> >> /* specify the function prototype */ >>>>>>> >> #ifdef __WIN32 >>>>>>> >> __declspec(dllexport) void foo(void); >>>>>>> >> #else >>>>>>> >> void foo(void); >>>>>>> >> #endif >>>>>>> >> >>>>>>> >> void foo(void) { >>>>>>> >> printf("Hello Parrot!\n"); >>>>>>> >> } >>>>>>> >> >>>>>>> >> Then, after having compiled the file as a shared library, the PIR >>>>>>> code >>>>>>> >> looks like this: >>>>>>> >> >>>>>>> >> >>>>>>> >> Here, how do I compile the .c file to produce a .pir file ?? >>>>>>> >> >>>>>>> >> Thanks, >>>>>>> >> Ashiva >>>>>>> >> >>>>>>> >> Thanks & Regards, >>>>>>> >> Ashraya S Shiva >>>>>>> >> >>>>>>> >> >>>>>>> >> On Wed, Jul 17, 2013 at 2:08 AM, Jonathan "Duke" Leto < >>>>>>> jonat...@leto.net> >>>>>>> >> wrote: >>>>>>> >>> >>>>>>> >>> Howdy, >>>>>>> >>> >>>>>>> >>> You can embed Parrot inside of a C or C++ application. It can be >>>>>>> any >>>>>>> >>> language, actually (it works with FORTRAN), but we have the best >>>>>>> docs >>>>>>> >>> for C and C++. I have embedded Parrot inside of PostgreSQL >>>>>>> (PL/Parrot >>>>>>> >>> [0]), but that uses the old interface [1]. The new interface [2] >>>>>>> is >>>>>>> >>> infinitely better, but has not been heavily used. But it was >>>>>>> designed >>>>>>> >>> very well by Whiteknight, so it is high quality. >>>>>>> >>> >>>>>>> >>> You can also call out to C/C++ libraries from parrot via >>>>>>> "dlopen" and >>>>>>> >>> cousins via the Native Call Interface (NCI) substem of Parrot >>>>>>> [3]. >>>>>>> >>> >>>>>>> >>> Which of those things do you want to do, or possibly both? >>>>>>> >>> >>>>>>> >>> Duke >>>>>>> >>> >>>>>>> >>> [0] http://pl.parrot.org >>>>>>> >>> [1] https://github.com/parrot/parrot/blob/master/docs/embed.pod >>>>>>> >>> [2] >>>>>>> https://github.com/parrot/parrot/blob/master/docs/embed_new.pod >>>>>>> >>> [3] >>>>>>> >>> >>>>>>> https://github.com/parrot/parrot/blob/master/docs/pdds/draft/pdd16_native_call.pod >>>>>>> >>> >>>>>>> >>> >>>>>>> >>> On Tue, Jul 16, 2013 at 4:58 AM, Ashraya S < >>>>>>> theemeralds...@gmail.com> >>>>>>> >>> wrote: >>>>>>> >>> > Hello All, >>>>>>> >>> > >>>>>>> >>> > I switched to my favorite Ubuntu and parrot got installed like >>>>>>> a charm. >>>>>>> >>> > >>>>>>> >>> > However, I would like to know how parrot supports C program >>>>>>> >>> > compilation. >>>>>>> >>> > Is there any tutorial I can find ? I did not get much support >>>>>>> for C in >>>>>>> >>> > google. Got loads for perl and pasm. >>>>>>> >>> > >>>>>>> >>> > Please advise. >>>>>>> >>> > >>>>>>> >>> > Thanks, >>>>>>> >>> > Ashiva >>>>>>> >>> > >>>>>>> >>> > >>>>>>> >>> > On Wednesday, July 10, 2013 7:30:29 PM UTC+5:30, Coke wrote: >>>>>>> >>> >> >>>>>>> >>> >> Do you have a C compiler installed? >>>>>>> >>> >> >>>>>>> >>> >> >>>>>>> >>> >> On Wed, Jul 10, 2013 at 6:39 AM, Ashraya S < >>>>>>> theemer...@gmail.com> >>>>>>> >>> >> wrote: >>>>>>> >>> >>> >>>>>>> >>> >>> Hi All, >>>>>>> >>> >>> >>>>>>> >>> >>> I am new to parrot and i am trying to install this in >>>>>>> windows 7. >>>>>>> >>> >>> I have installed perl and minGW and have added these to my >>>>>>> PATH as >>>>>>> >>> >>> well. >>>>>>> >>> >>> >>>>>>> >>> >>> But i get the following error : >>>>>>> >>> >>> >>>>>>> >>> >>> C:\Users\ashiva\Documents\GitHub\parrot>perl Configure.pl >>>>>>> >>> >>> Parrot Version 5.5.0 Configure 2.0 >>>>>>> >>> >>> Copyright (C) 2001-2013, Parrot Foundation. >>>>>>> >>> >>> >>>>>>> >>> >>> Hello, I'm Configure. My job is to poke and prod your system >>>>>>> to >>>>>>> >>> >>> figure >>>>>>> >>> >>> out >>>>>>> >>> >>> how to build Parrot. The process is completely automated, >>>>>>> unless you >>>>>>> >>> >>> passed in >>>>>>> >>> >>> the `--ask' flag on the command line, in which case I'll >>>>>>> prompt you >>>>>>> >>> >>> for a >>>>>>> >>> >>> few >>>>>>> >>> >>> pieces of info. >>>>>>> >>> >>> >>>>>>> >>> >>> Since you're running this program, you obviously have Perl >>>>>>> 5--I'll be >>>>>>> >>> >>> pulling >>>>>>> >>> >>> some defaults from its configuration. >>>>>>> >>> >>> >>>>>>> >>> >>> init::manifest - Check >>>>>>> >>> >>> MANIFEST.....................................done. >>>>>>> >>> >>> init::defaults - Set Configure's default >>>>>>> >>> >>> values.....................done. >>>>>>> >>> >>> init::install - Set up installation >>>>>>> >>> >>> paths..........................done. >>>>>>> >>> >>> init::hints - Load platform and local hints >>>>>>> >>> >>> files................done. >>>>>>> >>> >>> inter::progs - Determine what C compiler and linker to >>>>>>> >>> >>> use...Compilation >>>>>>> >>> >>> failed with 'gcc' >>>>>>> >>> >>> >>>>>>> >>> >>> C:\Users\ashiva\Documents\GitHub\parrot> >>>>>>> >>> >>> >>>>>>> >>> >>> Please help me resolve this problem. >>>>>>> >>> >>> >>>>>>> >>> >>> Thanks a lot, in advance. >>>>>>> >>> >>> >>>>>>> >>> >>> -- >>>>>>> >>> >>> Ashiva >>>>>>> >>> >>> >>>>>>> >>> >>> _______________________________________________ >>>>>>> >>> >>> http://lists.parrot.org/mailman/listinfo/parrot-dev >>>>>>> >>> >>> >>>>>>> >>> >> >>>>>>> >>> >> >>>>>>> >>> >> >>>>>>> >>> >> -- >>>>>>> >>> >> Will "Coke" Coleda >>>>>>> >>> > >>>>>>> >>> > >>>>>>> >>> > _______________________________________________ >>>>>>> >>> > http://lists.parrot.org/mailman/listinfo/parrot-dev >>>>>>> >>> > >>>>>>> >>> >>>>>>> >>> >>>>>>> >>> >>>>>>> >>> -- >>>>>>> >>> Jonathan "Duke" Leto <jonat...@leto.net> >>>>>>> >>> Leto Labs LLC http://letolabs.com >>>>>>> >>> 209.691.DUKE http://duke.leto.net >>>>>>> >>> @dukeleto >>>>>>> >> >>>>>>> >> >>>>>>> > >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Jonathan "Duke" Leto <jonat...@leto.net> >>>>>>> Leto Labs LLC http://letolabs.com >>>>>>> 209.691.DUKE http://duke.leto.net >>>>>>> @dukeleto >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> http://lists.parrot.org/mailman/listinfo/parrot-dev >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Will "Coke" Coleda >>>>> >>>> >>>> >>> >>> >>> -- >>> Will "Coke" Coleda >>> >> >> > > > -- > Will "Coke" Coleda > -- Will "Coke" Coleda
_______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev