trsnslating pypy to another language besides C
Hey If i wanted to translate PyPy in to another language.. Where would i start? What would be the absolute minimum i had to do to get it working? I cant run any C code.. at all (obscure sandboxed platform that only runs an obscure scripting language none of you has probably ever heard of) how much of a problem will this be? how to mitigate?
I'd kind of like to know this, too. I've wanted to try to get PyPy to translate to C++. I doubt it would be of any advantage, but I'm just too curious... On Wed, Mar 4, 2015 at 2:58 AM, Joonas Liik <liik.joonas@gmail.com> wrote:
Hey
If i wanted to translate PyPy in to another language..
Where would i start? What would be the absolute minimum i had to do to get it working?
I cant run any C code.. at all (obscure sandboxed platform that only runs an obscure scripting language none of you has probably ever heard of) how much of a problem will this be? how to mitigate?
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
C is C++ right? or what precisely did you want to do? On Wed, Mar 4, 2015 at 8:15 PM, Ryan Gonzalez <rymg19@gmail.com> wrote:
I'd kind of like to know this, too. I've wanted to try to get PyPy to translate to C++. I doubt it would be of any advantage, but I'm just too curious...
On Wed, Mar 4, 2015 at 2:58 AM, Joonas Liik <liik.joonas@gmail.com> wrote:
Hey
If i wanted to translate PyPy in to another language..
Where would i start? What would be the absolute minimum i had to do to get it working?
I cant run any C code.. at all (obscure sandboxed platform that only runs an obscure scripting language none of you has probably ever heard of) how much of a problem will this be? how to mitigate?
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
Not necessarily. I figured that a C++ target might look a tad nicer because it has built-in objects and exception handling. Of course, again, it'd likely have its own set of painful holes and would be largely useless. But I still want to try it. ;) On Wed, Mar 4, 2015 at 12:23 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
C is C++ right? or what precisely did you want to do?
I'd kind of like to know this, too. I've wanted to try to get PyPy to translate to C++. I doubt it would be of any advantage, but I'm just too curious...
On Wed, Mar 4, 2015 at 2:58 AM, Joonas Liik <liik.joonas@gmail.com> wrote:
Hey
If i wanted to translate PyPy in to another language..
Where would i start? What would be the absolute minimum i had to do to get it working?
I cant run any C code.. at all (obscure sandboxed platform that only
runs
an obscure scripting language none of you has probably ever heard of) how much of a problem will this be? how to mitigate?
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence.
On Wed, Mar 4, 2015 at 8:15 PM, Ryan Gonzalez <rymg19@gmail.com> wrote: -
srean Check out my website: http://kirbyfan64.github.io/
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
the host language is called JASS2* JASS2 is the underlying scripting language for game basically,(Blizzards Warcraft 3 from 2002/2003 depending on where you're from) It is -strongly typed, -not very fast, -supports a grand total of 0 bit-wise operations -it has obscure and arcane ways.. / limitations that need to be worked around* -it has a type declaration, C-like.. a bit (type A extends B) -it has no type-casting facilities at all.. (except for some number types and strings)**, -oh and it the end product is larger then 4 Megabytes.. it will have significantly reduced usefulness(thx blizzard, you have awesome ideas..) -FileIO is.. well it IS possible, surprisingly but it is so haxy you really wouldn't want to rely on it too much.. (oh.. u can write ur crap all overs peoples hard drives but if you want to read it back you need to set a registry flag.. just .. charming..) -oh.. if your snippet of code runs for more than 30 000 bytecode ops (internally there's a bytecode interpreter, we can't access it in any meaningful way but some people have hacked away enough to prove it is there)*** - numeric types include "integer" == int32 and "real" == float32 (except some funny NaN behaviour i've heard about but not verified) - it is multithreaded... except it isn't. u can start many threads (using ExecuteFunc, TriggerExecute or.. what was that 3rd one..) but they will run sequentially, this is useful for circumventing the OP limit. - it has arrays**** - the arrays are sized (read: every array is exactly 8192 instances of which the last one you cant really use because it is buggy (an off by 1 some place i guess...)) - classes? who needs em?! not us, no classes for you :P (there's a few custom dialects that mend this and usually do a just good enough solution to be used by everyone and loved by none) - It has a strange standard library that mainly consists of functions that swap its arguments and pass it to an underlying native.. or do a nested loop just to set a value in a table.. it is absolutely awesome! trembling with excitement ;) - it doesn't seem to do any bounds checking ... anywhere (u can tell it to create a unit in a strange location and the whole game crashes) - null is 0 .. almost. well it is when it matters and bites you in the ass. - no introspection (the closest one can come is ExecuteFunc which actually takes a functions name to execute...(sic!) but it is useless unless the function takes no parameters and returns none) - I'm sure i missed a ton of other /great/ features ;) i can't emit assembler. (well i kind of CAN write files but they will emit so much extra garbage that there's very low (0) chance it will really be executable.. well except that the way to read files is basically to execute them("Preload")) So to sum it up.. if i can even compile RPython and have it not implode i would be rather happy. * a simpler compile target might be Galaxy Script (the scripting language for Starcraft 2) tho i probably wouldn't be motivated enough to finish this without the first one. ** theres about 20 built in types.. that are mostly ints in reality.. but you cant use that. *** this can be circumvented in a number of ways but at some cost .. its a real pain tho if u want to calculate something expensive. **** of all types except "code" (meaning function) this can be circumvented by wrapping it in a boolexpr On 4 March 2015 at 20:48, Ryan Gonzalez <rymg19@gmail.com> wrote:
Not necessarily. I figured that a C++ target might look a tad nicer because it has built-in objects and exception handling.
Of course, again, it'd likely have its own set of painful holes and would be largely useless. But I still want to try it. ;)
On Wed, Mar 4, 2015 at 12:23 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
C is C++ right? or what precisely did you want to do?
On Wed, Mar 4, 2015 at 8:15 PM, Ryan Gonzalez <rymg19@gmail.com> wrote:
I'd kind of like to know this, too. I've wanted to try to get PyPy to translate to C++. I doubt it would be of any advantage, but I'm just too curious...
On Wed, Mar 4, 2015 at 2:58 AM, Joonas Liik <liik.joonas@gmail.com> wrote:
Hey
If i wanted to translate PyPy in to another language..
Where would i start? What would be the absolute minimum i had to do to get it working?
I cant run any C code.. at all (obscure sandboxed platform that only
runs
an obscure scripting language none of you has probably ever heard of) how much of a problem will this be? how to mitigate?
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
Oh yeah, forgot to mention there are hashtables (in JASS2) that do have infinite storage so .. not quite hopeless.. i hope. :) On 4 March 2015 at 22:29, Joonas Liik <liik.joonas@gmail.com> wrote:
the host language is called JASS2*
JASS2 is the underlying scripting language for game basically,(Blizzards Warcraft 3 from 2002/2003 depending on where you're from) It is -strongly typed, -not very fast, -supports a grand total of 0 bit-wise operations -it has obscure and arcane ways.. / limitations that need to be worked around* -it has a type declaration, C-like.. a bit (type A extends B) -it has no type-casting facilities at all.. (except for some number types and strings)**, -oh and it the end product is larger then 4 Megabytes.. it will have significantly reduced usefulness(thx blizzard, you have awesome ideas..) -FileIO is.. well it IS possible, surprisingly but it is so haxy you really wouldn't want to rely on it too much.. (oh.. u can write ur crap all overs peoples hard drives but if you want to read it back you need to set a registry flag.. just .. charming..) -oh.. if your snippet of code runs for more than 30 000 bytecode ops (internally there's a bytecode interpreter, we can't access it in any meaningful way but some people have hacked away enough to prove it is there)*** - numeric types include "integer" == int32 and "real" == float32 (except some funny NaN behaviour i've heard about but not verified) - it is multithreaded... except it isn't. u can start many threads (using ExecuteFunc, TriggerExecute or.. what was that 3rd one..) but they will run sequentially, this is useful for circumventing the OP limit. - it has arrays**** - the arrays are sized (read: every array is exactly 8192 instances of which the last one you cant really use because it is buggy (an off by 1 some place i guess...)) - classes? who needs em?! not us, no classes for you :P (there's a few custom dialects that mend this and usually do a just good enough solution to be used by everyone and loved by none) - It has a strange standard library that mainly consists of functions that swap its arguments and pass it to an underlying native.. or do a nested loop just to set a value in a table.. it is absolutely awesome! trembling with excitement ;)
- it doesn't seem to do any bounds checking ... anywhere (u can tell it to create a unit in a strange location and the whole game crashes) - null is 0 .. almost. well it is when it matters and bites you in the ass. - no introspection (the closest one can come is ExecuteFunc which actually takes a functions name to execute...(sic!) but it is useless unless the function takes no parameters and returns none) - I'm sure i missed a ton of other /great/ features ;)
i can't emit assembler. (well i kind of CAN write files but they will emit so much extra garbage that there's very low (0) chance it will really be executable.. well except that the way to read files is basically to execute them("Preload"))
So to sum it up.. if i can even compile RPython and have it not implode i would be rather happy.
* a simpler compile target might be Galaxy Script (the scripting language for Starcraft 2) tho i probably wouldn't be motivated enough to finish this without the first one. ** theres about 20 built in types.. that are mostly ints in reality.. but you cant use that. *** this can be circumvented in a number of ways but at some cost .. its a real pain tho if u want to calculate something expensive. **** of all types except "code" (meaning function) this can be circumvented by wrapping it in a boolexpr
On 4 March 2015 at 20:48, Ryan Gonzalez <rymg19@gmail.com> wrote:
Not necessarily. I figured that a C++ target might look a tad nicer because it has built-in objects and exception handling.
Of course, again, it'd likely have its own set of painful holes and would be largely useless. But I still want to try it. ;)
On Wed, Mar 4, 2015 at 12:23 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
C is C++ right? or what precisely did you want to do?
On Wed, Mar 4, 2015 at 8:15 PM, Ryan Gonzalez <rymg19@gmail.com> wrote:
I'd kind of like to know this, too. I've wanted to try to get PyPy to translate to C++. I doubt it would be of any advantage, but I'm just too curious...
On Wed, Mar 4, 2015 at 2:58 AM, Joonas Liik <liik.joonas@gmail.com> wrote:
Hey
If i wanted to translate PyPy in to another language..
Where would i start? What would be the absolute minimum i had to do to get it working?
I cant run any C code.. at all (obscure sandboxed platform that only
runs
an obscure scripting language none of you has probably ever heard of) how much of a problem will this be? how to mitigate?
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
I seriously doubt PyPy is going to work well at all under JASS2; it'll probably be insanely slow. This <http://www.wc3c.net/showthread.php?t=61352> would probably be better. It's a Python-to-Jass converter. On Wed, Mar 4, 2015 at 2:29 PM, Joonas Liik <liik.joonas@gmail.com> wrote:
the host language is called JASS2*
JASS2 is the underlying scripting language for game basically,(Blizzards Warcraft 3 from 2002/2003 depending on where you're from) It is -strongly typed, -not very fast, -supports a grand total of 0 bit-wise operations -it has obscure and arcane ways.. / limitations that need to be worked around* -it has a type declaration, C-like.. a bit (type A extends B) -it has no type-casting facilities at all.. (except for some number types and strings)**, -oh and it the end product is larger then 4 Megabytes.. it will have significantly reduced usefulness(thx blizzard, you have awesome ideas..) -FileIO is.. well it IS possible, surprisingly but it is so haxy you really wouldn't want to rely on it too much.. (oh.. u can write ur crap all overs peoples hard drives but if you want to read it back you need to set a registry flag.. just .. charming..) -oh.. if your snippet of code runs for more than 30 000 bytecode ops (internally there's a bytecode interpreter, we can't access it in any meaningful way but some people have hacked away enough to prove it is there)*** - numeric types include "integer" == int32 and "real" == float32 (except some funny NaN behaviour i've heard about but not verified) - it is multithreaded... except it isn't. u can start many threads (using ExecuteFunc, TriggerExecute or.. what was that 3rd one..) but they will run sequentially, this is useful for circumventing the OP limit. - it has arrays**** - the arrays are sized (read: every array is exactly 8192 instances of which the last one you cant really use because it is buggy (an off by 1 some place i guess...)) - classes? who needs em?! not us, no classes for you :P (there's a few custom dialects that mend this and usually do a just good enough solution to be used by everyone and loved by none) - It has a strange standard library that mainly consists of functions that swap its arguments and pass it to an underlying native.. or do a nested loop just to set a value in a table.. it is absolutely awesome! trembling with excitement ;)
- it doesn't seem to do any bounds checking ... anywhere (u can tell it to create a unit in a strange location and the whole game crashes) - null is 0 .. almost. well it is when it matters and bites you in the ass. - no introspection (the closest one can come is ExecuteFunc which actually takes a functions name to execute...(sic!) but it is useless unless the function takes no parameters and returns none) - I'm sure i missed a ton of other /great/ features ;)
i can't emit assembler. (well i kind of CAN write files but they will emit so much extra garbage that there's very low (0) chance it will really be executable.. well except that the way to read files is basically to execute them("Preload"))
So to sum it up.. if i can even compile RPython and have it not implode i would be rather happy.
* a simpler compile target might be Galaxy Script (the scripting language for Starcraft 2) tho i probably wouldn't be motivated enough to finish this without the first one. ** theres about 20 built in types.. that are mostly ints in reality.. but you cant use that. *** this can be circumvented in a number of ways but at some cost .. its a real pain tho if u want to calculate something expensive. **** of all types except "code" (meaning function) this can be circumvented by wrapping it in a boolexpr
On 4 March 2015 at 20:48, Ryan Gonzalez <rymg19@gmail.com> wrote:
Not necessarily. I figured that a C++ target might look a tad nicer because it has built-in objects and exception handling.
Of course, again, it'd likely have its own set of painful holes and would be largely useless. But I still want to try it. ;)
On Wed, Mar 4, 2015 at 12:23 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
C is C++ right? or what precisely did you want to do?
On Wed, Mar 4, 2015 at 8:15 PM, Ryan Gonzalez <rymg19@gmail.com> wrote:
I'd kind of like to know this, too. I've wanted to try to get PyPy to translate to C++. I doubt it would be of any advantage, but I'm just too curious...
On Wed, Mar 4, 2015 at 2:58 AM, Joonas Liik <liik.joonas@gmail.com> wrote:
Hey
If i wanted to translate PyPy in to another language..
Where would i start? What would be the absolute minimum i had to do to get it working?
I cant run any C code.. at all (obscure sandboxed platform that only
runs
an obscure scripting language none of you has probably ever heard of) how much of a problem will this be? how to mitigate?
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
Nevermind. The link seems dead. On Wed, Mar 4, 2015 at 3:41 PM, Ryan Gonzalez <rymg19@gmail.com> wrote:
I seriously doubt PyPy is going to work well at all under JASS2; it'll probably be insanely slow.
This <http://www.wc3c.net/showthread.php?t=61352> would probably be better. It's a Python-to-Jass converter.
On Wed, Mar 4, 2015 at 2:29 PM, Joonas Liik <liik.joonas@gmail.com> wrote:
the host language is called JASS2*
JASS2 is the underlying scripting language for game basically,(Blizzards Warcraft 3 from 2002/2003 depending on where you're from) It is -strongly typed, -not very fast, -supports a grand total of 0 bit-wise operations -it has obscure and arcane ways.. / limitations that need to be worked around* -it has a type declaration, C-like.. a bit (type A extends B) -it has no type-casting facilities at all.. (except for some number types and strings)**, -oh and it the end product is larger then 4 Megabytes.. it will have significantly reduced usefulness(thx blizzard, you have awesome ideas..) -FileIO is.. well it IS possible, surprisingly but it is so haxy you really wouldn't want to rely on it too much.. (oh.. u can write ur crap all overs peoples hard drives but if you want to read it back you need to set a registry flag.. just .. charming..) -oh.. if your snippet of code runs for more than 30 000 bytecode ops (internally there's a bytecode interpreter, we can't access it in any meaningful way but some people have hacked away enough to prove it is there)*** - numeric types include "integer" == int32 and "real" == float32 (except some funny NaN behaviour i've heard about but not verified) - it is multithreaded... except it isn't. u can start many threads (using ExecuteFunc, TriggerExecute or.. what was that 3rd one..) but they will run sequentially, this is useful for circumventing the OP limit. - it has arrays**** - the arrays are sized (read: every array is exactly 8192 instances of which the last one you cant really use because it is buggy (an off by 1 some place i guess...)) - classes? who needs em?! not us, no classes for you :P (there's a few custom dialects that mend this and usually do a just good enough solution to be used by everyone and loved by none) - It has a strange standard library that mainly consists of functions that swap its arguments and pass it to an underlying native.. or do a nested loop just to set a value in a table.. it is absolutely awesome! trembling with excitement ;)
- it doesn't seem to do any bounds checking ... anywhere (u can tell it to create a unit in a strange location and the whole game crashes) - null is 0 .. almost. well it is when it matters and bites you in the ass. - no introspection (the closest one can come is ExecuteFunc which actually takes a functions name to execute...(sic!) but it is useless unless the function takes no parameters and returns none) - I'm sure i missed a ton of other /great/ features ;)
i can't emit assembler. (well i kind of CAN write files but they will emit so much extra garbage that there's very low (0) chance it will really be executable.. well except that the way to read files is basically to execute them("Preload"))
So to sum it up.. if i can even compile RPython and have it not implode i would be rather happy.
* a simpler compile target might be Galaxy Script (the scripting language for Starcraft 2) tho i probably wouldn't be motivated enough to finish this without the first one. ** theres about 20 built in types.. that are mostly ints in reality.. but you cant use that. *** this can be circumvented in a number of ways but at some cost .. its a real pain tho if u want to calculate something expensive. **** of all types except "code" (meaning function) this can be circumvented by wrapping it in a boolexpr
On 4 March 2015 at 20:48, Ryan Gonzalez <rymg19@gmail.com> wrote:
Not necessarily. I figured that a C++ target might look a tad nicer because it has built-in objects and exception handling.
Of course, again, it'd likely have its own set of painful holes and would be largely useless. But I still want to try it. ;)
On Wed, Mar 4, 2015 at 12:23 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
C is C++ right? or what precisely did you want to do?
On Wed, Mar 4, 2015 at 8:15 PM, Ryan Gonzalez <rymg19@gmail.com> wrote:
I'd kind of like to know this, too. I've wanted to try to get PyPy to translate to C++. I doubt it would be of any advantage, but I'm just too curious...
On Wed, Mar 4, 2015 at 2:58 AM, Joonas Liik <liik.joonas@gmail.com> wrote:
Hey
If i wanted to translate PyPy in to another language..
Where would i start? What would be the absolute minimum i had to do to get it working?
I cant run any C code.. at all (obscure sandboxed platform that
only runs
an obscure scripting language none of you has probably ever heard of) how much of a problem will this be? how to mitigate?
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
Hi Joonas, To make sense out of it, you would need an "ootype" backend, as opposed to a "lltype" backend which generates C-like code. Google for Antonio's thesis "High performance implementation of Python for CLI/.NET with JIT compiler generation for dynamic languages". But we killed support for ootype backends soon afterward, because (despite the thesis) it was not really going anywhere in practice. Nowadays PyPy is only focusing on its C backend. If you really want you can dig in the Mercurial history. Be warned that a lot of work is needed in any case... A bientôt, Armin.
Hi Ryan, On 4 March 2015 at 19:48, Ryan Gonzalez <rymg19@gmail.com> wrote:
Not necessarily. I figured that a C++ target might look a tad nicer because it has built-in objects and exception handling.
Yes, this might be true for the static backend. However, the JIT integration would be extremely painful. To handle, let's say, the exceptions you get from C++, you'd need to write custom assembler that depends on the C++ compiler you used, full of non-standard binary data like the "eh" sections produced by gcc. Similarly, there is no standard way at all (as far as I know) to learn how to build a new object from scratch (like get its vtable pointer and know where it must be stored). You might start by learning how they manage to do that in other VMs (like the various JVM), but my guess is that although they are using C++ to write the VM, all Java-level objects are implemented by controlling the exact layout of memory, not as C++ objects at all. A bientôt, Armin.
I didn't figure I'd even get that far... It's mostly just for toying with the static backend, without the JIT. On Wed, Mar 4, 2015 at 11:02 PM, Armin Rigo <arigo@tunes.org> wrote:
Hi Ryan,
On 4 March 2015 at 19:48, Ryan Gonzalez <rymg19@gmail.com> wrote:
Not necessarily. I figured that a C++ target might look a tad nicer because it has built-in objects and exception handling.
Yes, this might be true for the static backend. However, the JIT integration would be extremely painful. To handle, let's say, the exceptions you get from C++, you'd need to write custom assembler that depends on the C++ compiler you used, full of non-standard binary data like the "eh" sections produced by gcc. Similarly, there is no standard way at all (as far as I know) to learn how to build a new object from scratch (like get its vtable pointer and know where it must be stored). You might start by learning how they manage to do that in other VMs (like the various JVM), but my guess is that although they are using C++ to write the VM, all Java-level objects are implemented by controlling the exact layout of memory, not as C++ objects at all.
A bientôt,
Armin.
-- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." Personal reality distortion fields are immune to contradictory evidence. - srean Check out my website: http://kirbyfan64.github.io/
you need to write a backend. Backends are in translator/xxx. Historically we used to support C, LLVM (to varying degrees), JS, C# (or it's bytecode). What are you targeting? is it low-level enough to make sense? What about the JIT? can you emit assembler and run it? On Wed, Mar 4, 2015 at 10:58 AM, Joonas Liik <liik.joonas@gmail.com> wrote:
Hey
If i wanted to translate PyPy in to another language..
Where would i start? What would be the absolute minimum i had to do to get it working?
I cant run any C code.. at all (obscure sandboxed platform that only runs an obscure scripting language none of you has probably ever heard of) how much of a problem will this be? how to mitigate?
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
On Wed, Mar 4, 2015 at 9:24 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
you need to write a backend. Backends are in translator/xxx.
There are multiple dirs in rpython/translator: backendopt c goal platform sandbox test tool Which of those are backends? -- anatoly t.
2015-03-06 13:24 GMT+01:00 anatoly techtonik <techtonik@gmail.com>:
On Wed, Mar 4, 2015 at 9:24 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
you need to write a backend. Backends are in translator/xxx.
There are multiple dirs in rpython/translator:
backendopt c goal platform sandbox test tool
Which of those are backends?
Only one: c -- Amaury Forgeot d'Arc
On Fri, Mar 6, 2015 at 4:48 PM, Amaury Forgeot d'Arc <amauryfa@gmail.com> wrote:
2015-03-06 13:24 GMT+01:00 anatoly techtonik <techtonik@gmail.com>:
On Wed, Mar 4, 2015 at 9:24 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
you need to write a backend. Backends are in translator/xxx.
There are multiple dirs in rpython/translator:
backendopt c goal platform sandbox test tool
Which of those are backends?
Only one: c
I c. =) Can I propose to rename the directory to back-c/ ? Kind of compromise between brevity and clarity. -- anatoly t.
That makes no sense, one cannot import packages with '-' in them. Carl Friedrich On March 6, 2015 3:23:49 PM GMT+01:00, anatoly techtonik <techtonik@gmail.com> wrote:
On Fri, Mar 6, 2015 at 4:48 PM, Amaury Forgeot d'Arc <amauryfa@gmail.com> wrote:
2015-03-06 13:24 GMT+01:00 anatoly techtonik <techtonik@gmail.com>:
On Wed, Mar 4, 2015 at 9:24 PM, Maciej Fijalkowski
<fijall@gmail.com>
wrote:
you need to write a backend. Backends are in translator/xxx.
There are multiple dirs in rpython/translator:
backendopt c goal platform sandbox test tool
Which of those are backends?
Only one: c
I c. =) Can I propose to rename the directory to back-c/ ? Kind of compromise between brevity and clarity. -- anatoly t. _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
I used to backends that are kind of service that is plugged into application. Maybe a `backendc` would be a better name, but then what `backendopt` is for? On Sat, Mar 7, 2015 at 3:21 PM, Carl Friedrich Bolz <cfbolz@gmx.de> wrote:
That makes no sense, one cannot import packages with '-' in them.
Carl Friedrich
On March 6, 2015 3:23:49 PM GMT+01:00, anatoly techtonik <techtonik@gmail.com> wrote:
On Fri, Mar 6, 2015 at 4:48 PM, Amaury Forgeot d'Arc <amauryfa@gmail.com> wrote:
2015-03-06 13:24 GMT+01:00 anatoly techtonik <techtonik@gmail.com>:
On Wed, Mar 4, 2015 at 9:24 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
you need to write a backend. Backends are in translator/xxx.
There are multiple dirs in rpython/translator:
backendopt c goal platform sandbox test tool
Which of those are backends?
Only one: c
I c. =) Can I propose to rename the directory to back-c/ ? Kind of compromise between brevity and clarity.
-- anatoly t.
participants (7)
-
Amaury Forgeot d'Arc
-
anatoly techtonik
-
Armin Rigo
-
Carl Friedrich Bolz
-
Joonas Liik
-
Maciej Fijalkowski
-
Ryan Gonzalez