<div dir="ltr">Forwarding reply to list.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 24, 2013 at 11:46 AM, Will Coleda <span dir="ltr"><<a href="mailto:will@coleda.com" target="_blank">will@coleda.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">First off, thank you for your interest in partcl.</div><div class="gmail_extra">
<br></div><div class="gmail_extra">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.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">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.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">I'd be willing to consider pull requests against partcl/partcl if you still want to try - package is implemented here:</div><div class="gmail_extra"><br></div>

<div class="gmail_extra"><a href="https://github.com/partcl/partcl/blob/master/runtime/builtin/package.pir" target="_blank">https://github.com/partcl/partcl/blob/master/runtime/builtin/package.pir</a></div><div class="gmail_extra">
<br></div>
<div class="gmail_extra">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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">

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 <a href="https://github.com/partcl/partcl/blob/master/library/README" target="_blank">https://github.com/partcl/partcl/blob/master/library/README</a>)</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">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.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">If you get stuck, I'd be happy to get some tuits against partcl/partcl-nqp instead.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards.</div>

<div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Tue, Sep 24, 2013 at 10:43 AM, Ashraya <span dir="ltr"><<a href="mailto:theemeraldsoul@gmail.com" target="_blank">theemeraldsoul@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Will,<div><br></div><div>I was able to get partcl working in parrot 5.7.0.</div>

<div>It needed the Glod.pir file to be present in the appropriate directory in parrot. It works then.</div><div><br></div><div>

But, looks like importing modules is a problem now.</div><div><br></div><div><div>ashiva@ubuntu:~/rakudo/partcl$ ./tclsh</div><div>% package require math::bignum</div><div>% set a [::math::bignum::fromstr 88888881111111]</div>



<div>Null PMC access in get_pmc_keyed()</div><div>% set c [::math::bignum::mul 88888881111111 88888881111111]</div><div>Null PMC access in get_pmc_keyed()</div><div>% </div></div><div><br></div><div><br></div><div>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. </div>



<div>I need clues as to where to look to fix it. Please help.</div><div><br></div><div>Thanks & Regards,</div><div>Ashiva</div></div><div class="gmail_extra"><div><br clear="all"><div>Thanks & Regards,<i><br>
Ashraya S Shiva</i><br>

</div>
<br><br></div><div class="gmail_quote"><div>On Wed, Jul 24, 2013 at 12:12 AM, Will Coleda <span dir="ltr"><<a href="mailto:will@coleda.com" target="_blank">will@coleda.com</a>></span> wrote:<br></div><div>
<div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div class="gmail_extra">FYI, I'm the partcl developer.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Some notes about the status of partcl on parrot:</div><div class="gmail_extra"><br>




</div><div class="gmail_extra"><a href="https://github.com/partcl/partcl" target="_blank">https://github.com/partcl/partcl</a> 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.</div>




<div><br></div><div><a href="https://github.com/partcl/partcl-nqp" target="_blank">https://github.com/partcl/partcl-nqp</a> 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.<br>




</div><div><br></div><div>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.</div>




<div class="gmail_extra"><br></div><div class="gmail_extra">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)</div><div class="gmail_extra">




<br></div><div class="gmail_extra">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</div><div class="gmail_extra"><br>




</div><div class="gmail_extra">So, partcl on PIR is extra broken until that's fixed, or you could try with an older parrot version.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Apologies.</div><div class="gmail_extra">




<br><div class="gmail_quote">On Tue, Jul 23, 2013 at 2:18 PM, Ashraya <span dir="ltr"><<a href="mailto:theemeraldsoul@gmail.com" target="_blank">theemeraldsoul@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div dir="ltr"><div><div><div><div>One more thing.. I am trying to compile TCL code here too.. <br><br></div>But it doesn't seem to work :<br><br>ashiva@ubuntu:~/Parrot/rakudo/partcl$ ../parrot/parrot tcl.pbc -e "puts {hello world}"<br>






"load_bytecode" couldn't find file 'Tcl/Glob.pir'<br>current instr.: 'prepare_lib' pc 27748 (runtime/builtin/dict.pir:102)<br>called from Sub '_main' pc 0 (src/tclsh.pir:39)<br>called from Sub '_main' pc 3 (src/tclsh.pir:42)<br>






ashiva@ubuntu:~/Parrot/rakudo/partcl$ <br><br><br></div>I read in a conversation thread that this is working.. But I am not able to understand where I am going wrong.<br><br>Please help.<br><br></div>Thanks a lot,<br></div>






Ashraya<br></div><div class="gmail_extra"><div><br clear="all"><div>Thanks & Regards,<i><br>Ashraya S Shiva</i><br></div>
<br><br></div><div><div><div class="gmail_quote">On Tue, Jul 23, 2013 at 9:54 PM, Will Coleda <span dir="ltr"><<a href="mailto:will@coleda.com" target="_blank">will@coleda.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">






<div dir="ltr">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).<div><br></div><div>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.</div>







</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 23, 2013 at 11:58 AM, Ashraya <span dir="ltr"><<a href="mailto:theemeraldsoul@gmail.com" target="_blank">theemeraldsoul@gmail.com</a>></span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><br>Hello Duke,<br><br></div>




Let me rephrase my question.<br><br></div>For example, I write a simple perl file, <a href="http://hello.pl" target="_blank">hello.pl</a> : <br>


</div><div>#!/usr/bin/perl<br></div>

<div>print "Hello World"<br></div><div><br>To compile this, I use :  parrot perl6.pbc <a href="http://hello.pl" target="_blank">hello.pl</a><br><br></div><div>The output is : Hello World<br><br></div><div>Similarly, if I have a C file, hello.c :<br>









<br></div><div>#include<stdio.h><br><br></div><div>int main()<br>{<br></div><div>    printf("Hello World\n");<br></div><div>    return 0;<br></div><div>}<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">









How would I compile this to get the output?<br><br></div><div class="gmail_extra">Note : I downloaded the c99 package for parrot from github but I could not get this installed.<br></div><div class="gmail_extra"><div>
<br clear="all">

<div>Thanks & Regards,<i><br>Ashraya S Shiva</i><br></div>
<br><br></div><div><div><div class="gmail_quote">On Tue, Jul 23, 2013 at 7:23 PM, Jonathan "Duke" Leto <span dir="ltr"><<a href="mailto:jonathan@leto.net" target="_blank">jonathan@leto.net</a>></span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Howdy Ashraya,<br>
<br>
I believe nobody is answering you because they don't quite understand<br>
what you mean.<br>
<br>
Could you ask your question another way, and give some more background<br>
about what you are trying to do?<br>
<span><font color="#888888"><br>
Duke<br>
</font></span><div><div><br>
On Sun, Jul 21, 2013 at 10:51 PM, Ashraya <<a href="mailto:theemeraldsoul@gmail.com" target="_blank">theemeraldsoul@gmail.com</a>> wrote:<br>
> A gentle reminder.. Please reply. How to convert a C code into PIR code ?<br>
><br>
> Thanks & Regards,<br>
> Ashraya S Shiva<br>
><br>
><br>
> On Wed, Jul 17, 2013 at 4:30 PM, Ashraya <<a href="mailto:theemeraldsoul@gmail.com" target="_blank">theemeraldsoul@gmail.com</a>> wrote:<br>
>><br>
>> Hello Duke,<br>
>><br>
>> I am trying one of the examples in the .pod you have given :<br>
>><br>
>>   /* foo.c */<br>
>><br>
>>   /* specify the function prototype */<br>
>>   #ifdef __WIN32<br>
>>   __declspec(dllexport) void foo(void);<br>
>>   #else<br>
>>   void foo(void);<br>
>>   #endif<br>
>><br>
>>   void foo(void) {<br>
>>     printf("Hello Parrot!\n");<br>
>>   }<br>
>><br>
>> Then, after having compiled the file as a shared library, the PIR code<br>
>> looks like this:<br>
>><br>
>><br>
>> Here, how do I compile the .c file to produce a .pir file ??<br>
>><br>
>> Thanks,<br>
>> Ashiva<br>
>><br>
>> Thanks & Regards,<br>
>> Ashraya S Shiva<br>
>><br>
>><br>
>> On Wed, Jul 17, 2013 at 2:08 AM, Jonathan "Duke" Leto <<a href="mailto:jonathan@leto.net" target="_blank">jonathan@leto.net</a>><br>
>> wrote:<br>
>>><br>
>>> Howdy,<br>
>>><br>
>>> You can embed Parrot inside of a C or C++ application. It can be any<br>
>>> language, actually (it works with FORTRAN), but we have the best docs<br>
>>> for C and C++. I have embedded Parrot inside of PostgreSQL (PL/Parrot<br>
>>> [0]), but that uses the old interface [1]. The new interface [2] is<br>
>>> infinitely better, but has not been heavily used. But it was designed<br>
>>> very well by Whiteknight, so it is high quality.<br>
>>><br>
>>> You can also call out to C/C++ libraries from parrot via "dlopen" and<br>
>>> cousins via the Native Call Interface (NCI) substem of Parrot [3].<br>
>>><br>
>>> Which of those things do you want to do, or possibly both?<br>
>>><br>
>>> Duke<br>
>>><br>
>>> [0] <a href="http://pl.parrot.org" target="_blank">http://pl.parrot.org</a><br>
>>> [1] <a href="https://github.com/parrot/parrot/blob/master/docs/embed.pod" target="_blank">https://github.com/parrot/parrot/blob/master/docs/embed.pod</a><br>
>>> [2] <a href="https://github.com/parrot/parrot/blob/master/docs/embed_new.pod" target="_blank">https://github.com/parrot/parrot/blob/master/docs/embed_new.pod</a><br>
>>> [3]<br>
>>> <a href="https://github.com/parrot/parrot/blob/master/docs/pdds/draft/pdd16_native_call.pod" target="_blank">https://github.com/parrot/parrot/blob/master/docs/pdds/draft/pdd16_native_call.pod</a><br>
>>><br>
>>><br>
>>> On Tue, Jul 16, 2013 at 4:58 AM, Ashraya S <<a href="mailto:theemeraldsoul@gmail.com" target="_blank">theemeraldsoul@gmail.com</a>><br>
>>> wrote:<br>
>>> > Hello All,<br>
>>> ><br>
>>> > I switched to my favorite Ubuntu and parrot got installed like a charm.<br>
>>> ><br>
>>> > However, I would like to know how parrot supports C program<br>
>>> > compilation.<br>
>>> > Is there any tutorial I can find ? I did not get much support for C in<br>
>>> > google. Got loads for perl and pasm.<br>
>>> ><br>
>>> > Please advise.<br>
>>> ><br>
>>> > Thanks,<br>
>>> > Ashiva<br>
>>> ><br>
>>> ><br>
>>> > On Wednesday, July 10, 2013 7:30:29 PM UTC+5:30, Coke wrote:<br>
>>> >><br>
>>> >> Do you have a C compiler installed?<br>
>>> >><br>
>>> >><br>
>>> >> On Wed, Jul 10, 2013 at 6:39 AM, Ashraya S <<a href="mailto:theemer...@gmail.com" target="_blank">theemer...@gmail.com</a>><br>
>>> >> wrote:<br>
>>> >>><br>
>>> >>> Hi All,<br>
>>> >>><br>
>>> >>> I am new to parrot and i am trying to install this in windows 7.<br>
>>> >>> I have installed perl and minGW and have added these to my PATH as<br>
>>> >>> well.<br>
>>> >>><br>
>>> >>> But i get the following error :<br>
>>> >>><br>
>>> >>> C:\Users\ashiva\Documents\GitHub\parrot>perl Configure.pl<br>
>>> >>> Parrot Version 5.5.0 Configure 2.0<br>
>>> >>> Copyright (C) 2001-2013, Parrot Foundation.<br>
>>> >>><br>
>>> >>> Hello, I'm Configure. My job is to poke and prod your system to<br>
>>> >>> figure<br>
>>> >>> out<br>
>>> >>> how to build Parrot. The process is completely automated, unless you<br>
>>> >>> passed in<br>
>>> >>> the `--ask' flag on the command line, in which case I'll prompt you<br>
>>> >>> for a<br>
>>> >>> few<br>
>>> >>> pieces of info.<br>
>>> >>><br>
>>> >>> Since you're running this program, you obviously have Perl 5--I'll be<br>
>>> >>> pulling<br>
>>> >>> some defaults from its configuration.<br>
>>> >>><br>
>>> >>> init::manifest -      Check<br>
>>> >>> MANIFEST.....................................done.<br>
>>> >>> init::defaults -      Set Configure's default<br>
>>> >>> values.....................done.<br>
>>> >>> init::install -       Set up installation<br>
>>> >>> paths..........................done.<br>
>>> >>> init::hints -         Load platform and local hints<br>
>>> >>> files................done.<br>
>>> >>> inter::progs -        Determine what C compiler and linker to<br>
>>> >>> use...Compilation<br>
>>> >>> failed with 'gcc'<br>
>>> >>><br>
>>> >>> C:\Users\ashiva\Documents\GitHub\parrot><br>
>>> >>><br>
>>> >>> Please help me resolve this problem.<br>
>>> >>><br>
>>> >>> Thanks a lot, in advance.<br>
>>> >>><br>
>>> >>> --<br>
>>> >>> Ashiva<br>
>>> >>><br>
>>> >>> _______________________________________________<br>
>>> >>> <a href="http://lists.parrot.org/mailman/listinfo/parrot-dev" target="_blank">http://lists.parrot.org/mailman/listinfo/parrot-dev</a><br>
>>> >>><br>
>>> >><br>
>>> >><br>
>>> >><br>
>>> >> --<br>
>>> >> Will "Coke" Coleda<br>
>>> ><br>
>>> ><br>
>>> > _______________________________________________<br>
>>> > <a href="http://lists.parrot.org/mailman/listinfo/parrot-dev" target="_blank">http://lists.parrot.org/mailman/listinfo/parrot-dev</a><br>
>>> ><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Jonathan "Duke" Leto <<a href="mailto:jonathan@leto.net" target="_blank">jonathan@leto.net</a>><br>
>>> Leto Labs LLC <a href="http://letolabs.com" target="_blank">http://letolabs.com</a><br>
>>> 209.691.DUKE <a href="http://duke.leto.net" target="_blank">http://duke.leto.net</a><br>
>>> @dukeleto<br>
>><br>
>><br>
><br>
<br>
<br>
<br>
--<br>
Jonathan "Duke" Leto <<a href="mailto:jonathan@leto.net" target="_blank">jonathan@leto.net</a>><br>
Leto Labs LLC <a href="http://letolabs.com" target="_blank">http://letolabs.com</a><br>
209.691.DUKE <a href="http://duke.leto.net" target="_blank">http://duke.leto.net</a><br>
@dukeleto<br>
</div></div></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
<a href="http://lists.parrot.org/mailman/listinfo/parrot-dev" target="_blank">http://lists.parrot.org/mailman/listinfo/parrot-dev</a><br>
<br></blockquote></div><br><br clear="all"><span><font color="#888888"><div><br></div>-- <br>Will "Coke" Coleda
</font></span></div><span><font color="#888888">
</font></span></div></div></blockquote></div><span><font color="#888888"><br></font></span></div></div></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Will "Coke" Coleda
</font></span></div></div>
</blockquote></div></div></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Will "Coke" Coleda
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Will "Coke" Coleda
</div></div>