Thread Exe-/binary-Erstellung mit Perl 6 möglich? (36 answers)
Opened by schwabi at 2008-08-20 12:30

Taulmarill
 2009-05-06 14:30
#121291 #121291
User since
2004-02-19
1750 Artikel
BenutzerIn

user image
[quote="moritz@2009-05-05T08:16:56"]
2008-08-20T10:47:48 moritz
Inzwischen geht das, wenn auch nicht in einem Schritt:
Code: (dl )
1
2
3
4
5
6
7
8
9
$ cat foo.pl
say 2+3;
$ ./perl6 --target=PIR foo.pl > foo.pir
$ ./parrot/parrot --output-pbc foo.pir > foo.pbc
$ ./parrot/parrot foo.pbc
5
$ ./parrot/pbc_to_exe foo.pbc
$ ./foo
5


Sehr cool! Vor allem, dass man die ganzen Zwischenschritte anschauen kann hält interessante Optionen für das spätere Optimieren eines Programms bereit.

Die ausführbare Datei, die da bei mir rauskommt ist außerdem nur 33k klein. Da ist zwar nur ein minimaler Versuch, kommt mir aber trotzdem recht kompakt vor. Ist da die komplette VM drin oder hat das noch Abhängigkeiten zu irgendwelchen Bibliotheken?

Jetzt muss Rakudo/Parrot nur noch schneller werden (> 1 sec für hello world ist nicht wirklich wirkbetriebstauglich), dann wird es richtig interessant...
$_=unpack"B*",~pack"H*",$_ and y&1|0& |#&&print"$_\n"for@.=qw BFA2F7C39139F45F78
0A28104594444504400 0A2F107D54447DE7800 0A2110453444450500 73CF1045138445F4800 0
F3EF2044E3D17DE 8A08A0451412411 F3CF207DF41C79E 820A20451412414 83E93C4513D17D2B

View full thread Exe-/binary-Erstellung mit Perl 6 möglich?