Re: [9fans] Porting Idris to 9front

2017-01-14 Thread Ramakrishnan Muthukrishnan
On Sun, Jan 15, 2017, at 01:48 AM, Ori Bernstein wrote:
> On Sun, 15 Jan 2017 01:02:11 +0530, Ramakrishnan Muthukrishnan
>  wrote:
> 
> > After reading your message, I tried compiling a simple program using the
> > '-fviaC'. But it looks like, on newer GHC it is deprecated and is going
> > to be removed soon.
> 
> Which may still be sufficient to produce a bootstrap binary for -fasm, if
> you're willing to put in the effort to get a native port.

It seems like -fviaC does not do *anything* at all in the current
version of GHC. I am yet to try my luck with an older version of GHC. 

There has been some effort to bootstrap GHC using hugs and nhc98, which
I am following with interest:

 

-- 
  Ramakrishnan



Re: [9fans] Porting Idris to 9front

2017-01-14 Thread Ori Bernstein
On Sun, 15 Jan 2017 01:02:11 +0530, Ramakrishnan Muthukrishnan 
 wrote:

> After reading your message, I tried compiling a simple program using the
> '-fviaC'. But it looks like, on newer GHC it is deprecated and is going
> to be removed soon.

Which may still be sufficient to produce a bootstrap binary for -fasm, if
you're willing to put in the effort to get a native port.

-- 
Ori Bernstein



Re: [9fans] Porting Idris to 9front

2017-01-14 Thread Ramakrishnan Muthukrishnan


On Fri, Jan 13, 2017, at 07:35 PM, Joe M wrote:
> >
> > Don't you need GHC to compile Idris?
> 
> http://docs.idris-lang.org/en/latest/faq/faq.html#when-will-idris-be-self-hosting
> 
> I have the posix version of the rts working on 9front. The default C
> backend generated code compiled and runs on 9front. I generated the c
> code on linux though.

That's very nice to hear.

> As a next step, I want to take it further and make the rts and backend
> work with the 9front native C compiler/linker. I presume that this
> will help make it easy to FFI with the native C libraries (bio,
> thread, etc.) and stay closer to the plan 9 libraries' behaviour.
> 
> > Afaik, there is no Plan 9 port of GHC. And GHC is self hosted. Perhaps
> > one should approach it by creating a plan 9 binary from another OS and
> > use that to compile GHC?
> 
> That is a good idea. Native GHC on 9front seems to be a daunting task
> as the GHC IO manager's behaviour might not be compatible with the
> 9front syscall behaviour, imho. But, I have no clue of the GHC
> internals, so, it might be an easy task.

After reading your message, I tried compiling a simple program using the
'-fviaC'. But it looks like, on newer GHC it is deprecated and is going
to be removed soon.

> Maybe, ghc can run with the linux-emu package?

I will try that. Thanks.

-- 
  Ramakrishnan



Re: [9fans] Porting Idris to 9front

2017-01-13 Thread Joe M

> > I have the posix version of the rts working on 9front. The default C
> > backend generated code compiled and runs on 9front. I generated the c
> > code on linux though.
> >
>
> Can you detail the process?
>
> I'd like to give it a try on Jehanne (which is built with gcc).

I updated the README with the usage instructions
https://github.com/joe9/idris-9front-backend . Please let me know if
that does not help.

Basically, generate the .c file using Idris on linux (or, another
platform that Idris runs on). Compile the rts and this generated .c
file using ape on 9front.

A caveat, I tested with simple Hello World code. Not sure how well
it works for something more complicated though.

Thanks



Re: [9fans] Porting Idris to 9front

2017-01-13 Thread Giacomo Tesio
2017-01-13 15:05 GMT+01:00 Joe M :

> >
> > Don't you need GHC to compile Idris?
>
> http://docs.idris-lang.org/en/latest/faq/faq.html#when-will-
> idris-be-self-hosting
>
> I have the posix version of the rts working on 9front. The default C
> backend generated code compiled and runs on 9front. I generated the c
> code on linux though.
>

Can you detail the process?

I'd like to give it a try on Jehanne (which is built with gcc).


Giacomo


Re: [9fans] Porting Idris to 9front

2017-01-13 Thread Joe M
>
> Don't you need GHC to compile Idris?

http://docs.idris-lang.org/en/latest/faq/faq.html#when-will-idris-be-self-hosting

I have the posix version of the rts working on 9front. The default C
backend generated code compiled and runs on 9front. I generated the c
code on linux though.

As a next step, I want to take it further and make the rts and backend
work with the 9front native C compiler/linker. I presume that this
will help make it easy to FFI with the native C libraries (bio,
thread, etc.) and stay closer to the plan 9 libraries' behaviour.

> Afaik, there is no Plan 9 port of GHC. And GHC is self hosted. Perhaps
> one should approach it by creating a plan 9 binary from another OS and
> use that to compile GHC?

That is a good idea. Native GHC on 9front seems to be a daunting task
as the GHC IO manager's behaviour might not be compatible with the
9front syscall behaviour, imho. But, I have no clue of the GHC
internals, so, it might be an easy task.

Maybe, ghc can run with the linux-emu package?

Thanks



Re: [9fans] Porting Idris to 9front

2017-01-13 Thread Joe M
Sorry for the confusion. I did not realize that there was an Idris
OS. I am referring to http://www.idris-lang.org/ , Idris Language.

Thanks

Skip Tavakkolian wrote:
> That is a reference to the Idris OS -- by Whitesmiths Ltd. (P.J. Plauger).
>
> For the record, David Stanhope did the port, and created the boot ROMs and
> the cartridge to boot Idris.  He also designed and built an Ethernet card
> for the ST.  I was a novice programmer/sysadm lucky enough to have one the
> best hardware and software engineers I've ever met as a mentor.  My
> contributions to the project can be characterized as logistical support
> (documentation, support, etc.).
>
> -Skip
>
> On Thu, Jan 12, 2017 at 7:29 PM Joe M  wrote:
>
> > Hello,
> >
> > I am looking to build a native (not using ape/posix) port of Idris on
> > 9front.
> >
> > This is the repo that I plan on using for the relevant
> > code. https://github.com/joe9/idris-9front-backend
> >
> > #cat-v mentioned that Skip ported Idris to atari st.
> >
> > Just want to check if there are any experiences or advice or code that
> > I can reuse.
> >
> > Thanks
> > Joe
> >
> >



Re: [9fans] Porting Idris to 9front

2017-01-13 Thread Skip Tavakkolian
That is a reference to the Idris OS -- by Whitesmiths Ltd. (P.J. Plauger).

For the record, David Stanhope did the port, and created the boot ROMs and
the cartridge to boot Idris.  He also designed and built an Ethernet card
for the ST.  I was a novice programmer/sysadm lucky enough to have one the
best hardware and software engineers I've ever met as a mentor.  My
contributions to the project can be characterized as logistical support
(documentation, support, etc.).

-Skip

On Thu, Jan 12, 2017 at 7:29 PM Joe M  wrote:

> Hello,
>
> I am looking to build a native (not using ape/posix) port of Idris on
> 9front.
>
> This is the repo that I plan on using for the relevant
> code. https://github.com/joe9/idris-9front-backend
>
> #cat-v mentioned that Skip ported Idris to atari st.
>
> Just want to check if there are any experiences or advice or code that
> I can reuse.
>
> Thanks
> Joe
>
>


Re: [9fans] Porting Idris to 9front

2017-01-12 Thread Sean Callanan
I think you may be confusing Idris the language and Idris the OS.

http://www.dadhacker.com/blog/?p=1383
(See Mike Spooner's post on Skip Tavakkolian.)

Sean

iPadから送信

2017/01/12 19:29、Joe M  のメッセージ:

> Hello,
> 
> I am looking to build a native (not using ape/posix) port of Idris on
> 9front.
> 
> This is the repo that I plan on using for the relevant
> code. https://github.com/joe9/idris-9front-backend
> 
> #cat-v mentioned that Skip ported Idris to atari st.
> 
> Just want to check if there are any experiences or advice or code that
> I can reuse.
> 
> Thanks
> Joe
> 


Re: [9fans] Porting Idris to 9front

2017-01-12 Thread Ramakrishnan Muthukrishnan
On Fri, Jan 13, 2017, at 08:59 AM, Joe M wrote:
> 
> I am looking to build a native (not using ape/posix) port of Idris on
> 9front.
> 
> This is the repo that I plan on using for the relevant
> code. https://github.com/joe9/idris-9front-backend
> 
> #cat-v mentioned that Skip ported Idris to atari st.
> 
> Just want to check if there are any experiences or advice or code that
> I can reuse.

Don't you need GHC to compile Idris? 

Afaik, there is no Plan 9 port of GHC. And GHC is self hosted. Perhaps
one should approach it by creating a plan 9 binary from another OS and
use that to compile GHC?

-- 
  Ramakrishnan