9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Porting Idris to 9front
@ 2017-01-13  3:29 Joe M
  2017-01-13  5:55 ` Ramakrishnan Muthukrishnan
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Joe M @ 2017-01-13  3:29 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Porting Idris to 9front
  2017-01-13  3:29 [9fans] Porting Idris to 9front Joe M
@ 2017-01-13  5:55 ` Ramakrishnan Muthukrishnan
  2017-01-13 14:05   ` Joe M
  2017-01-13  6:19 ` Sean Callanan
  2017-01-13  8:50 ` Skip Tavakkolian
  2 siblings, 1 reply; 11+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2017-01-13  5:55 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Porting Idris to 9front
  2017-01-13  3:29 [9fans] Porting Idris to 9front Joe M
  2017-01-13  5:55 ` Ramakrishnan Muthukrishnan
@ 2017-01-13  6:19 ` Sean Callanan
  2017-01-13  8:50 ` Skip Tavakkolian
  2 siblings, 0 replies; 11+ messages in thread
From: Sean Callanan @ 2017-01-13  6:19 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

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 <joe9mail@gmail.com> のメッセージ:

> 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
>

[-- Attachment #2: Type: text/html, Size: 1279 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Porting Idris to 9front
  2017-01-13  3:29 [9fans] Porting Idris to 9front Joe M
  2017-01-13  5:55 ` Ramakrishnan Muthukrishnan
  2017-01-13  6:19 ` Sean Callanan
@ 2017-01-13  8:50 ` Skip Tavakkolian
  2017-01-13 13:47   ` Joe M
  2 siblings, 1 reply; 11+ messages in thread
From: Skip Tavakkolian @ 2017-01-13  8:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 950 bytes --]

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 <joe9mail@gmail.com> 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
>
>

[-- Attachment #2: Type: text/html, Size: 1698 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Porting Idris to 9front
  2017-01-13  8:50 ` Skip Tavakkolian
@ 2017-01-13 13:47   ` Joe M
  0 siblings, 0 replies; 11+ messages in thread
From: Joe M @ 2017-01-13 13:47 UTC (permalink / raw)
  To: 9fans

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 <joe9mail@gmail.com> 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
> >
> >



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Porting Idris to 9front
  2017-01-13  5:55 ` Ramakrishnan Muthukrishnan
@ 2017-01-13 14:05   ` Joe M
  2017-01-13 14:56     ` Giacomo Tesio
  2017-01-14 19:32     ` Ramakrishnan Muthukrishnan
  0 siblings, 2 replies; 11+ messages in thread
From: Joe M @ 2017-01-13 14:05 UTC (permalink / raw)
  To: 9fans

>
> 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



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Porting Idris to 9front
  2017-01-13 14:05   ` Joe M
@ 2017-01-13 14:56     ` Giacomo Tesio
  2017-01-13 16:54       ` Joe M
  2017-01-14 19:32     ` Ramakrishnan Muthukrishnan
  1 sibling, 1 reply; 11+ messages in thread
From: Giacomo Tesio @ 2017-01-13 14:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

2017-01-13 15:05 GMT+01:00 Joe M <joe9mail@gmail.com>:

> >
> > 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

[-- Attachment #2: Type: text/html, Size: 1017 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Porting Idris to 9front
  2017-01-13 14:56     ` Giacomo Tesio
@ 2017-01-13 16:54       ` Joe M
  0 siblings, 0 replies; 11+ messages in thread
From: Joe M @ 2017-01-13 16:54 UTC (permalink / raw)
  To: 9fans


> > 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



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Porting Idris to 9front
  2017-01-13 14:05   ` Joe M
  2017-01-13 14:56     ` Giacomo Tesio
@ 2017-01-14 19:32     ` Ramakrishnan Muthukrishnan
  2017-01-14 20:18       ` Ori Bernstein
  1 sibling, 1 reply; 11+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2017-01-14 19:32 UTC (permalink / raw)
  To: 9fans



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



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Porting Idris to 9front
  2017-01-14 19:32     ` Ramakrishnan Muthukrishnan
@ 2017-01-14 20:18       ` Ori Bernstein
  2017-01-15  2:12         ` Ramakrishnan Muthukrishnan
  0 siblings, 1 reply; 11+ messages in thread
From: Ori Bernstein @ 2017-01-14 20:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Sun, 15 Jan 2017 01:02:11 +0530, Ramakrishnan Muthukrishnan <ram@rkrishnan.org> 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



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Porting Idris to 9front
  2017-01-14 20:18       ` Ori Bernstein
@ 2017-01-15  2:12         ` Ramakrishnan Muthukrishnan
  0 siblings, 0 replies; 11+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2017-01-15  2:12 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Sun, Jan 15, 2017, at 01:48 AM, Ori Bernstein wrote:
> On Sun, 15 Jan 2017 01:02:11 +0530, Ramakrishnan Muthukrishnan
> <ram@rkrishnan.org> 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:

 <https://elephly.net/posts/2017-01-09-bootstrapping-haskell-part-1.html>

--
  Ramakrishnan



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-01-15  2:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13  3:29 [9fans] Porting Idris to 9front Joe M
2017-01-13  5:55 ` Ramakrishnan Muthukrishnan
2017-01-13 14:05   ` Joe M
2017-01-13 14:56     ` Giacomo Tesio
2017-01-13 16:54       ` Joe M
2017-01-14 19:32     ` Ramakrishnan Muthukrishnan
2017-01-14 20:18       ` Ori Bernstein
2017-01-15  2:12         ` Ramakrishnan Muthukrishnan
2017-01-13  6:19 ` Sean Callanan
2017-01-13  8:50 ` Skip Tavakkolian
2017-01-13 13:47   ` Joe M

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).