[Haskell-cafe] ANNOUNCE: Start Ajhc project with forking jhc.

2013-03-06 Thread Kiwamu Okabe
Hi all.

I am a user of jhc Haskell compiler.
Jhc can compile Haskell code to micro arch such as Cortex-M3.
I have written LED blinking demo for Cortex-M3 with jhc.
Very fun!

  https://github.com/ajhc/demo-cortex-m3
  http://www.youtube.com/watch?v=3R9sogReVHg

And I created many patches for jhc.
But...I think that the upstream author of jhc, John Meacham,
can't pull the contribution speedy, because he is too busy.
It's difficult that maintain many patches without any repositories,
for me.

Then, I have decided to fork jhc, named Ajhc.
# pain full...

  http://ajhc.github.com/

I will feedback Ajhc's big changes to jhc mailing list.
Or I am so happy if John joins Ajhc project.

Regards,
-- 
Kiwamu Okabe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: Start Ajhc project with forking jhc.

2013-03-06 Thread Kiwamu Okabe
Hi John.

On Thu, Mar 7, 2013 at 7:35 AM, John Meacham  wrote:
> What is the cortex m3 board you are experimenting with? looks like it
> could be a Maple Mini https://www.sparkfun.com/products/11280 ?

Now I am testing STM32 F3 Discovery.

http://www.st.com/web/en/catalog/tools/FM116/SC959/SS1532/PF254044

> if so, getting it in 20k of ram is quite impressive :) I only tested
> against larger ARM processors such as tablets/cell phones.

It's your great product jhc's power. ;)

But that demo does not use Haskell heap.
# Don't call s_alloc function.
Now I am trying fix bug on my custom jhc RTS.

Thank's,
--
Kiwamu Okabe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANNOUNCE: Ajhc 0.8.0.2 Release

2013-03-16 Thread Kiwamu Okabe
We are happy to announce Ajhc 0.8.0.2.

It's first release announce for Ajhc.
Major change on this release is ability to compile Haskell code for tiny CPU.
There is demo on tiny CPU at https://github.com/ajhc/demo-cortex-m3.
And you can watch demo movie at http://www.youtube.com/watch?v=bKp-FC0aeFE.
Perhaps changes on the announce will be merged to jhc.

Ajhc's project web site is found at http://ajhc.masterq.net/.
You can get Ajhc 0.8.0.2 source code from https://github.com/ajhc/ajhc/tags.

## Changes

* Fix warning messages on compiling.
* Ready to compile with GHC 7.6.2.
* New RTS for tiny CPU. How to use:
  https://github.com/ajhc/demo-cortex-m3#porting-the-demo-to-a-new-platform

- - -
Metasepi team

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [jhc] ANNOUNCE: Ajhc 0.8.0.2 Release

2013-03-16 Thread Kiwamu Okabe
Hi,

On Sun, Mar 17, 2013 at 4:45 AM, Joachim Breitner
 wrote:
> Great. Would it be possible for you two to agree on a mode that allows
> Kiwamu to develop in his pace, but still avoid having a proper fork of
> jhc pushed to distros and users? Something like: Kiwamu hacks away
> happily on the ajhc repo and people interested in the very latest state
> can pull from there, but ajhc releases get (if there are no technical
> issues) merged into jhc, and jhc is the version that regular users
> should use (and distributions should package).

I think good, because I maintain jhs as Debian package already.
http://ftp-master.debian.org/new/jhc_0.8.0~darcs20120314-1.html
Maintaining Ajhc Debian package is bad idea, if jhc has the most
functions had by Ajhc.

How about below policy between jhc and Ajhc.

1. Jhc and Ajhc share same command name "jhc".
2. Jhc controls major version number. Example, jhc controls X, Y and Z
in version "X.Y.Z".
3. Ajhc controls minor version number. Example, Ajhc controls only Q
in version "X.Y.Z.Q".
4. Ajhc show below message with --version option.

(A)jhc 0.8.0.1 (80aa12fb9b57622bba2f0e911d7ebc0c04ddb662)
compiled by ghc-7.4 on a x86_64 running linux

The policy is to keep minimum change between jhc and Ajhc.
And I think that Ajhc having own command name confuses jhc user.

Best regards,
--
Kiwamu Okabe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANNOUNCE: Ajhc 0.8.0.3 Release

2013-04-02 Thread Kiwamu Okabe
We are happy to announce Ajhc 0.8.0.3.

Major change on this release is supporting Windows MinGW32 platform.
And you can cabal install ajhc.

http://hackage.haskell.org/package/ajhc

Perhaps changes on the announce will be merged to jhc.

Ajhc's project web site is found at http://ajhc.masterq.net/.
You can get the source code from https://github.com/ajhc/ajhc/tags.

## Changes

* Support Windows MinGW32 platform
* You can cabal install Ajhc.
* Use DrIFT-cabalized command also to generate DrIFT deriving
* Dump Haskell heap with gdb script (utils/gdb_jhc.py)
* Use haskeline package to replace readline or editline
* No more depend on haskell98 package

- - -
Metasepi team

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANNOUNCE: Ajhc 0.8.0.5 Release

2013-06-07 Thread Kiwamu Okabe
We are happy to announce Ajhc 0.8.0.5.

Major change on this release is supporting haddock.
You can see Ajhc's internal using web browser.

Ajhc's project web site is found at http://ajhc.metasepi.org/.
You can get the source code from https://github.com/ajhc/ajhc/tags.

## Changes

* Support haddock. You can read haddock on
http://hackage.haskell.org/package/ajhc, hopefully.
* Split library from Ajhc program.
* Better NAIVEGC.
* Add arity "arena" to all functions compiled by Ajhc. For supporting
reentrant in future.
* Run SelfTest and rtstest on travis-ci.
* Add jahm command to download file from Hackage DB, because sometime
perl script occurs error.

Enjoy. :)
- - -
Metasepi team

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANNOUNCE: Ajhc 0.8.0.6 Release

2013-06-19 Thread Kiwamu Okabe
We are happy to announce Ajhc 0.8.0.6.
Major change on the release is supporting THREAD. Yeah!

You can get Ajhc using "cabal install ajhc" command.
Ajhc's project web site is found at http://ajhc.metasepi.org/.
You find the source code at https://github.com/ajhc/ajhc/tags.
Welcome sending any bugs or your ideas to https://github.com/ajhc/ajhc/issues.

## Good news

* You can use forkOS interface on Ajhc.
* Your program runs on pthread with compiling -fpthread option. See below.

$ cat Main.hs
import Control.Monad
import Control.Concurrent

main :: IO ()
main = do
  l <- putStrLn "Type some string and enter." >> getLine
  forkOS $ (forever $ putChar '*')
  forkOS $ (forever $ putStr l)
  forever $ putChar '.'
$ ajhc -fpthread Main.hs
$ ./hs.out

## Bad news

* Ajhc guards critical section only for the runtime.
* Example: StablePtr isn't guarded with lock.
* Ajhc's thread can't share any objects without Ptr type.
* And you may find funny pthread bugs. Please send us the report!

## Other changes

* No more depend on DrIFT.
* Add _JHC_JGC_LIMITED_NUM_GC_STACK flag to set number of limited
gc_stack entries.
* Add _JHC_JGC_FIXED_MEGABLOCK flag to set number of limited megablock entries.
* Add compile flags -fcustomthread -fpthread -fnothread.
* You can implement your own thread API for Ajhc, if you choose -fcustomthread.

Enjoy! ;)
- - -
Metasepi team

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANNOUNCE: Ajhc Haskell Compiler 0.8.0.7 Release

2013-07-05 Thread Kiwamu Okabe
We are happy to announce Ajhc 0.8.0.7.
You can program interrupt handler with Haskell language on this release.
But not yet collect (big) patch sets, the changes will be merged to jhc.

You can get Ajhc using "cabal install ajhc" command.
The usage is found at Ajhc's project web site http://ajhc.metasepi.org/.
The source code at https://github.com/ajhc/ajhc/tags.

Welcome sending any bugs or your ideas to https://github.com/ajhc/ajhc/issues.

## An example of interrupt handler written with Haskell



The demo for Cortex-M4 has main context and intrrupt context.
The main context waits time expire with polling counter.


The interrupt context is called from clock exception, and decrement counter.


## Other changes

* Guard StablePtr critical section.
* Add _JHC_JGC_SAVING_MALLOC_HEAP option for getting smaller malloc heap.
* Link forkIO to forkOS.

Enjoy! :)
- - -
Metasepi team

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: Ajhc Haskell Compiler 0.8.0.7 Release

2013-07-06 Thread Kiwamu Okabe
Hi Adrian.

On Sat, Jul 6, 2013 at 2:40 PM, Adrian May
 wrote:
> Is this a practical way to write Android and iPhone code? I don't mean
> console programs, I mean realistic smartphone apps.

Umm... Is your question "Is Ajhc's goal that build the compiler for Android"?
If so, the answer is No.
The Ajhc's goal is that find the compiler to rewrite the NetBSD kernel
with Haskell.

But you can do support Android.
I think porting (A)jhc's RTS to Android NDK is as easy as to Cortex-M4.

Thank's.
--
Kiwamu Okabe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: Ajhc Haskell Compiler 0.8.0.7 Release

2013-07-09 Thread Kiwamu Okabe
Hi Jeremy.

On Tue, Jul 9, 2013 at 3:30 AM, Jeremy Shaw  wrote:
> Any plans on supporting the popular Raspberry Pi platform? I poked at the
> source code a bit, but I didn't even know where to begin.

I think you can do it already, if you have cross GCC for Raspberry Pi.

http://ajhc.metasepi.org/manual.html#crosscompilation

Best regards,
--
Kiwamu Okabe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANNOUNCE: Ajhc Haskell Compiler 0.8.0.8 Release

2013-09-02 Thread Kiwamu Okabe
We are happy to announce Ajhc 0.8.0.8.
This version is a point release to fix some BUGs, and support new platforms.

You can get Ajhc using "cabal install ajhc" command.
The usage is found at Ajhc's project web site http://ajhc.metasepi.org/.
The source code at https://github.com/ajhc/ajhc/tags.

Welcome sending any bugs or your ideas to https://github.com/ajhc/ajhc/issues.

## Support new platforms

### mbed http://mbed.org/

The mbed platform is a single-board microcontroller using ARM Cortex-M3 CPU.
It has only 32kB RAM for application.

>From this release, Ajhc support mbed and Text LCD device driver.
You can find the demo source code at https://github.com/ajhc/demo-cortex-m3,
and watch the demo movie at http://www.youtube.com/watch?v=fOsjEfNmTkY.

### ChibiOS/RT http://www.chibios.org/

The ChibiOS/RT is embedded real time OS.

>From this release, Ajhc can compile Haskell application running on ChibiOS/RT.
The application is able to use forkOS API with ChibiOS/RT's thread.
You will find the demo source code at
https://github.com/metasepi/chibios-arafura.

## Other changes

* Use cpphs command for C preprocessor.
* Don't insert (void) cast for function call.
* Add --targetsini option to specify the targets.ini file.
* Data.Bits support CInt.
* Retry download when some error occured on getting tar ball from Hackage DB.
* Fix BUGs
* Don't increment megablock count, when re-use the megablock in free list.
* Fix IORef compile BUG.

Enjoy! :)
- - -
Metasepi team

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe