Re: [pypy-dev] OS

2011-12-11 Thread Da_Blitz
On Mon, Dec 12, 2011 at 09:11:02AM +1100, William ML Leslie wrote: > Well, you don't spend much time writing a kernel anyway - use an > existing kernel and then run python in userspace. It's pretty unusual > to need your code colocated with the kernel, but it would be easier to > do with a runtime

Re: [pypy-dev] OS

2011-12-11 Thread William ML Leslie
On 11/12/2011, Rinu Boney wrote: > which are the languages suited for it other than c/c++ ? Of the safe languages that I know have been used for operating systems, there have been C# (Singularity, Windows 8?), Java (JNode), and Haskell (fillet-o-fish); but there are languages that are perhaps bet

[pypy-dev] ctypes rawffi and ffi

2011-12-11 Thread Elefterios Stamatogiannakis
I'm exploring pypy's code so as to speed up callbacks from C code, so as to speed up sqlite module's UDF. I have some questions: - What are the differences between ctypes, rawffi and ffi. Where should each one of them be used? - I see that ctypes is build on top of rawffi and ffi. If one wi

Re: [pypy-dev] .py -> .pyc -> (.pyc2 + .so) ?

2011-12-11 Thread Armin Rigo
Hi Bengt, On Sun, Dec 11, 2011 at 18:13, Bengt Richter wrote: >> Basically, no. JIT compiled functions have lots of their runtime >> context (like memory addresses) hardcoded into thme. > > How many address spaces are used, (...) The JIT generates machine code containing a large number of consta

Re: [pypy-dev] .py -> .pyc -> (.pyc2 + .so) ?

2011-12-11 Thread Bengt Richter
On 12/11/2011 05:38 PM Benjamin Peterson wrote: 2011/12/11 Bengt Richter: Just musing -- if pypy can discover pure functions (or functions with simple static global side effects) and the jit transforms them into machine code in a runtime memory-resident image somewhere, could this image be trans

Re: [pypy-dev] .py -> .pyc -> (.pyc2 + .so) ?

2011-12-11 Thread Benjamin Peterson
2011/12/11 Bengt Richter : > Just musing -- if pypy can discover pure functions (or functions with simple > static > global side effects) and the jit transforms them into machine code in a > runtime memory-resident > image somewhere, could this image be transformed with some .so boilerplate > and m

[pypy-dev] .py -> .pyc -> (.pyc2 + .so) ?

2011-12-11 Thread Bengt Richter
Just musing -- if pypy can discover pure functions (or functions with simple static global side effects) and the jit transforms them into machine code in a runtime memory-resident image somewhere, could this image be transformed with some .so boilerplate and metadata into a loadable module whic

Re: [pypy-dev] OS

2011-12-11 Thread Laura Creighton
I worked on the Tunis OS at the University of Toronto, which was an OS written in Concurrent Euclid. I think -- especially if Software Transactional Memory works out, there will be interest in writing an OS, not in RPython, but in Python. So then, well, maybe you will want a JIT ... I think we

Re: [pypy-dev] OS

2011-12-11 Thread Armin Rigo
Hi Maciej, On Sun, Dec 11, 2011 at 16:04, Maciej Fijalkowski wrote: > There was an experimental operating system written in C# (singularity > I think), so it really does depend on what you're after. I know; there are experimental OSes in various languages, including also high-level languages dev

Re: [pypy-dev] OS

2011-12-11 Thread Maciej Fijalkowski
On Sun, Dec 11, 2011 at 12:50 PM, Armin Rigo wrote: > Hi Fijal, > > On Sun, Dec 11, 2011 at 10:59, Maciej Fijalkowski wrote: >> William - what languages are better suited C? > > I agree with William's point of view.  Yes, I would imagine that C is > a good and well-supported language to do this k

Re: [pypy-dev] OS

2011-12-11 Thread Armin Rigo
Hi Fijal, On Sun, Dec 11, 2011 at 10:59, Maciej Fijalkowski wrote: > William - what languages are better suited C? I agree with William's point of view. Yes, I would imagine that C is a good and well-supported language to do this kind of things. If your goals include "I don't really want a gar

Re: [pypy-dev] OS

2011-12-11 Thread Maciej Fijalkowski
On Sun, Dec 11, 2011 at 8:34 AM, William ML Leslie wrote: > With a little work it would be possible to target ring0 with rpython, but > the real question is why you would want to. There are many other languages > better suited to the task. > > On 11/12/2011 1:01 PM, "Rinu Boney" wrote: > > can RP