Re: Yet another C compiler

2005-10-25 Thread Christian Renz



Maybe someone wants to experiment a bit, if it compiles Parrot.


Here's another thought...

The ACK achieves maximum portability by using an intermediate
byte-code language called EM. (..)
EM is a relatively high-level stack-based machine, and one of the
tools supplied with ACK is an interpreter capable of executing EM
binaries directly, with a high degree of safety checking

See also http://tack.sourceforge.net/doc/em.html

It's stack-based, but a EM-PASM converter might be an interesting way
to compile Modula-2 to Parrot ;-)

--
[EMAIL PROTECTED] - http://christian.web42.com - http://www.web42.com/crenz/ 


Real theology is always rather shocking to people who already think
they know what they think. I'm still shocked myself.  -- Larry Wall


Re: wxParrot -- linking problems

2005-10-24 Thread Christian Renz

Ciao Mattia,

thanks for your reply. I read a bit about ABI and I guess it's
something I only want to touch with a long pole, that pole being an
extra layer of indirection I initially hoped to be able to avoid.

I like the idea of leveraging the wxPerl XS files. Any comments on why
you introduced xsubppp (on top of xsubpp) for some XS files?

Regards,
  Christian

--
[EMAIL PROTECTED] - http://christian.web42.com - http://www.web42.com/crenz/ 


So, who am I to disagree with God? :-)  -- Larry Wall


wxParrot -- linking problems

2005-10-22 Thread Christian Renz

Hi all,

I've recently decided to try to hook up the wxWidgets GUI library with
parrot and Pugs. I haven't dabbled much with parrot yet so I consider
this a good way to learn more :-).

Right at the start, I ran into a curious problem loading the Wx
libraries with loadlib. (I'm on Mac OS X 10.4, by the way).

After trying different versions, I finally compiled Wx into one big
dynamic library called libwx_macu-2.6.0.2.0.dylib. However, I could
only link to it when I renamed/symlinked it to libwx.dylib or
libwx_macu.dylib. Otherwise, I get error messages like Couldn't load
'libwx_macu-2.6': unknown reason (and doing a typeof on the PMC var
reveals that it is indeed undef). It seems loadlib fails as soon as
the library name contains a number. Is this normal/desired behaviour?

Sorry if this is a stupid question, but I'm not very experienced with
linking on Unix systems. In fact, my questions are gonna get worse
right now :-):

How do I find the right symbol name for a function? For example, the
void wxBell(void) function can be found in the library as __Z6wxBellv
(found using otool -vT /usr/lib/libwx.dylib), but I guess on Windows
it bould be something like _wxBellA. And of course it gets harder in
the case of overloaded methods/constructors/destructors with different
parameter signatures. So how would I go about finding the symbol I
need (short of compiling a small C++ program and find out which
symbols it imports...)?

Greetings,
  Christian

--
[EMAIL PROTECTED] - http://www.web42.com/crenz/ - http://christian.web42.com/

You don't have a soul. You are a Soul. You have a body.  -- C.S. Lewis


Re: Parrot - 100% Gnu.NET ?

2003-09-02 Thread Christian Renz
Clemens,

classpath
I guess the proper term would be class library. The path is only where
you look for the libraries :).
It doesn't seem to be the Perl way to limit yourself to one option
only (There's more than one way to do it). Of course we wouldn't
want five different implementations of Unicode, and it makes sense to
ship _one_. However, people might want to use different GUIs --
e.g. wxWindows, TK, native Windows GUI, Aqua, ... Basic network
classes, on the other hand, might be something that might be shipped
with Parrot. Sound is a whole different beast -- implementations vary
wildly across systems, and I'm not sure whether it is possible to have
a high-performance cross-platform implementation that satisifes 90% of
users. 

On the other hand, I don't think we only have the choice between
shipping all libraries like Java and having a complicated install
system (for the average GUI-loving end user) like CPAN. There's a
couple of middle options:
For bytecode based packages:

- Parrot bytecode executables might be packages that contain the
 necessary libraries in bytecode format (e.g. wxWindows).
- Installers might include libraries (in bytecode) and install
 them if needed (install = simple copy)
For binary (platform-dependant) packages:

Usually, people just ship these statically linked against those libs
that can't be typically expected to be installed on the system. 

So I guess for Parrot apps distributed in binary, there's not much of
a problem. For apps shipped as bytecode, it still needs to be
discussed what is going to be provided:
- Preferably a small package ( 5 - 10 MB) that lets people use Parrot apps
 quickly.
- A huge package complete with
 Perl/Python/PHP/Befunge/hq9+/... support so that everybody will have
 95% of everything they are ever gonna need
- Or both?

Liebe Grüße,
  Christian (since you started the German greetings thingie ;-))
--
[EMAIL PROTECTED] - http://www.web42.com/crenz/ - http://www.web42.com/
Surely what a man does when he is taken off his guard is the best evidence
for what sort of man he is.  -- C.S. Lewis, Mere Christianity


Re: We *need* this op! :-)

2003-08-07 Thread Christian Renz
Shouldn't it be the 
what_do_you_get_if_you_multiply_six_by_nine_then_subtract_twelve op?
No, it shouldn't. Meditate about it again and you will be enlightened.

Hint: Base 13.

Greetings,
  Christian
--
[EMAIL PROTECTED] - http://www.web42.com/crenz/ - http://www.web42.com/
The worst attitude of all would be the professional attitude which regards
children in the lump as a sort of raw material which we have to handle.
   -- C.S. Lewis, On Three Ways of Writing for Children


Re: [RFC] Dynamic PMC Classes

2003-07-31 Thread Christian Renz
Thanks for the clarification. Does that mean that a mechanism for
dynamic PMCs would automatically allow them to be written in Parrot
also (and not only load binary libs)?
--
[EMAIL PROTECTED] - http://www.web42.com/crenz/ - http://www.web42.com/


Re: [RFC] Dynamic PMC Classes

2003-07-30 Thread Christian Renz
I don't pretend that I fully understand what dynamic classes are
about, but Dan's suggestions made it a lot clearer to me. This seems
like one possible way to attach something like wxWindows to parrot.
I'm wondering about one thing, however:

We build classes as shared libraries, unless otherwise noted. PMC 
Are there any plans to allow PMCs to be implemented in Parrot? Or am I
asking something stoopid :).
Greetings,
  Christian
--
[EMAIL PROTECTED] - http://www.web42.com/crenz/ - http://www.web42.com/


Re: approaching python

2003-07-24 Thread Christian Renz
to link with python, we should probably write our own parser.[1]
Just use Perl 6 to write it :). Ooops... looks like a chicken-and-egg
problem... 

Greetings,
  Christian


Re: wxWindows Support / Interfacing libraries with Parrot

2003-07-06 Thread Christian Renz
The easiest way isn't avaialble yet. That is custom dynamically loaded 
PMCs (classes) representing some functionality.
Hmm... then I think I misunderstood something. I thought PMCs are
only used for language-specific data types (e.g. PerlScalar,
PythonString) that are part of the Parrot core and not so much for
user-defined types that I can hook up with Parrot myself. I also
thought that PMCs only support basic operations rather than being
full-fledged classes.
Sorry if I sound a bit ignorant of Parrot internals. That's because I
am :) although I try my best to follow Parrot development. 

When Parrot's OO handling is ready, will it use PMC for external
classes (ie. classes in binary form rather than Parrot bytecode) or
something else?
Why the smilies ;-)
Because my guess was that if such a beast is possible, it's gonna be a
lot of work. After all, Parrot seems to be much more intelligent than
the average CPU out there :). 

Greetings,
  Christian


wxWindows Support / Interfacing libraries with Parrot

2003-07-04 Thread Christian Renz
Actually, I was the one mentioning it in a completely offhand remark
in some discussion about the future of wxWindows ;-).
I'm not looking for official endorsement of wxWindows as the
GUI toolkit for Parrot -- TIMTOWTDI -- but it sure would be sweet to
have, and definitely would not hurt Parrot-based application
development :). 

When starting to think about this, I asked myself what library
interfacing with Parrot would look like. My first thought was to have
a Perl 6 interface for wxWindows, but then it ocurred to me that it
would be more clever to have all the interface classes in Parrot; this
way, _any_ language using Parrot could use the wxWindows classes. Is
this correct? Are there already tools to do the interfacing (á la
Swig) or does it need to be done by hand?
Greetings,
  Christian
--
[EMAIL PROTECTED] - http://www.web42.com/crenz/ - http://www.web42.com/
One of the problems with Java is that they swept a bit too much of the
innate complexity of life under the carpet of the libraries. And so
now they've had to replace the carpets several times.  -- Larry Wall