-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
252 lines (206 loc) · 15.4 KB
/
index.html
File metadata and controls
252 lines (206 loc) · 15.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>Ajhc - Haskell everywhere</title>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-158383-9']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/ja_JP/all.js#xfbml=1&appId=310889061205";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<header>
<div class="inner">
<h1>Ajhc</h1>
<h2>Haskell everywhere</h2>
<a href="https://github.com/ajhc" class="button"><small>Follow me on</small>GitHub</a>
</div>
</header>
<div id="content-wrapper">
<div class="inner clearfix">
<section id="main-content">
<h3>*** We are closing Ajhc project. ***</h3>
<p><a href="http://metasepi.org/en/posts/2013-01-09-design_arafura.html">Metasepi Arafura</a> iteration is closed.
We decided to use <a href="http://www.ats-lang.org/">ATS Programming Language</a> for our next iteration.
After merging Ajhc's <a href="http://metasepi.org/doc/metasepi-icfp2014.pdf">Context Local Heap</a> into jhc,
this project will be shutdown.</p>
<p>Please use <a href="http://repetae.net/computer/jhc/">jhc</a> instead of Ajhc.
The <a href="https://github.com/csabahruska/jhc-components">jhc-components</a> may be useful, if you can't build original jhc.</p>
<h3>History of Ajhc Haskell compiler</h3>
<p>Please read <a href="http://metasepi.org/doc/c84-metasepi-foundation-ja.pdf">Metasepi Foundation report in Japanese</a>,
that includes detail of technical information around Ajhc's runtime and GC.
However you may hardly read it, because written by Japanese language. If you would like to automatically translate it
by Google translate, <a href="https://gist.github.com/master-q/733dfa2cf008261a3849564c38a7933b">this source code of the document</a>
may be useful.
</p>
<p>
We always appreciate your contribution to translate our document into English. This document is a technical report as fiction novel style.
This document has many "tentacles" words, because the novel part is parody of <a href="https://en.wikipedia.org/wiki/Squid_Girl">Squid Girl</a>.
Please relax to read it like reading some fiction novel.
</p>
<h3>What is Ajhc?</h3>
<p>Ajhc is a Haskell compiler, and acronym for the following:</p>
<ul>
<li>A fork of <a href="http://repetae.net/computer/jhc/">jhc</a></li>
<li>An accelerator to develop jhc</li>
<li><a href="http://metasepi.org/en/posts/2013-01-09-design_arafura.html">Metasepi Arafura</a> designed jhc</li>
</ul>
<h3>Why need Ajhc?</h3>
<p><a href="http://repetae.net/computer/jhc/">Jhc</a> converts Haskell code into pure C language code running with jhc's runtime.
And the runtime is written with 3000 line (include comments) pure C code.
It's a magic!</p>
<p><img src="draw/2012-12-22-jhc_compile.png" alt="Jhc compiler pipeline"></p>
<p>Ajhc's mission is to keep contribution to jhc in the repository.
Because the upstream author of jhc, <a href="http://repetae.net/">John Meacham</a>,
can't pull the contribution speedy. (I think he is too busy to do it.)
We should <a href="https://github.com/ajhc/ajhc#for-developing">feedback jhc</a> any changes.
And also Ajhc aims to provide
<a href="http://metasepi.org/">Metasepi project</a>
with a method to rewrite <a href="http://netbsd.org/">NetBSD kernel</a> using Haskell.
The method is called <a href="http://www.slideshare.net/master_q/20131020-osc-tokyoajhc">Snatch-driven development</a>.</p>
<p><img src="draw/arafura_design.png" alt="Snatch-driven development"></p>
<p>Ajhc is, so to speak, an accelerator to develop jhc.</p>
<p><img src="draw/engine_for_jhc.png" alt="Engine for jhc"></p>
<p>Photo: <a href="http://www.flickr.com/photos/silkebaron/931381358/">Copyright (C) 2007 Silke Baron All Rights Reserved.</a></p>
<h3>Demo: Rewrite NetBSD kernel driver with Haskell</h3>
<iframe width="420" height="315" src="http://www.youtube.com/embed/XEYcR5RG5cA" frameborder="0" allowfullscreen></iframe>
<p>NetBSD kernel's HD Audio sound driver has interrupt handler.
The interrupt handler of the demo is re-written by Haskell language.
At the demo, run following operations.
First, set breakpoint at the interrupt of finding headphone,
and see Haskell function names on backtrace.
Second, set breakpoint s_alloc() function, that allocate area
in Haskell heap. Make sure of calling the function while anytime
running kernel.
Nevertheless, playing wav file does not break up.<br>
The source code is found at <a href="https://github.com/metasepi/netbsd-arafura-s1">https://github.com/metasepi/netbsd-arafura-s1</a>.
And a picture of the architecture is also at
<a href="http://www.flickr.com/photos/masterq/12616929055/">http://www.flickr.com/photos/masterq/12616929055/</a>.</p>
<h3>Demo: Haskell code running on Cortex-M3 board</h3>
<iframe width="420" height="315" src="http://www.youtube.com/embed/C9JsJXWyajQ" frameborder="0" allowfullscreen></iframe>
<p>The demo is running code that compiled with Ajhc on Cortex-M3 board,
<a href="http://mbed.org/">mbed</a>.
It's a simple RSS reader for <a href="http://www.reddit.com/">reddit.com</a>,
show the RSS titles on Text LCD panel.
You could read the demo detail and source code at
<a href="https://github.com/ajhc/demo-cortex-m3">https://github.com/ajhc/demo-cortex-m3</a>.</p>
<h3>Demo: Android NDK application written with Haskell</h3>
<iframe width="420" height="315" src="http://www.youtube.com/embed/n6cepTfnFoo" frameborder="0" allowfullscreen></iframe>
<p>The touchable cube application is written with Haskell and compiled by Ajhc.
The application is available at <a href="https://play.google.com/store/apps/details?id=org.metasepi.ajhc.android.cube">Google Play</a>.
In the demo, the application is breaked by ndk-gdb debugger when running GC.
You could read the demo source code at
<a href="https://github.com/ajhc/demo-android-ndk">https://github.com/ajhc/demo-android-ndk</a>.
Also read slide about the detail at <a href="http://www.slideshare.net/master_q/20131020-osc-tokyoajhc">http://www.slideshare.net/master_q/20131020-osc-tokyoajhc</a>.</p>
<h3>How to install Ajhc</h3>
<p>Easy to install Ajhc with Cabal.</p>
<pre><code>$ sudo apt-get install haskell-platform gcc m4 patch libncurses5-dev
$ cabal install drift
$ export PATH=$PATH:$HOME/.cabal/bin
$ cabal install ajhc
$ ajhc --version
ajhc 0.8.0.10 (66a602abc10dec74e2c0bb9289819a015bf21e4f)
compiled by ghc-7.4 on a x86_64 running linux
$ echo 'main = print "hoge"' > Hoge.hs
$ ajhc Hoge.hs
$ ./hs.out
"hoge"
</code></pre>
<h3>Usage</h3>
<p>Please read <a href="manual.html">Ajhc User's Manual</a>
(<a href="manual_ja.html">in Japanese</a>).</p>
<h3>License</h3>
<p><ul>
<li>Runtime: <a href="https://github.com/ajhc/ajhc/blob/master/rts/LICENSE">MIT License</a></li>
<li>Haskell libraries: <a href="https://github.com/ajhc/ajhc/blob/master/lib/LICENSE">MIT License</a></li>
<li>The others: <a href="https://github.com/ajhc/ajhc/blob/arafura/COPYING">GPLv2 or Later</a>.</li>
</ul></p>
<h3>Contact</h3>
<p>Ajhc is developed by <a href="https://github.com/ajhc?tab=members">Metasepi team</a>.
Dive into <a href="https://github.com/ajhc">https://github.com/ajhc</a> to join us!</p>
</section>
<aside id="sidebar">
<p>Donate to Ajhc:</p>
<p><a href="https://www.patreon.com/bePatron?u=14024680" data-patreon-widget-type="become-patron-button">Become a Patron!</a><script async src="https://c6.patreon.com/becomePatronButton.bundle.js"></script></p>
<p><img src="images/donate_bitcoin_200x200.png" /><br><a href="bitcoin:1NhMmmrAkhsNJn6pva8Z5ryJHggiN6pH5g?label=DonateAjhc"><font size="1"><i>1NhMmmrAkhsNJn6pva8Z5ryJHggiN6pH5g</i><br><a href="https://blockchain.info/address/1NhMmmrAkhsNJn6pva8Z5ryJHggiN6pH5g">Who donated on Bitcoin?</a></font></p>
<p>Projects:</p>
<p><a href="https://travis-ci.org/ajhc/ajhc"><img src="https://travis-ci.org/ajhc/ajhc.png" alt="Build Status" style="max-width:100%;vertical-align:middle;"></a>
<a href="http://hackage.haskell.org/package/ajhc">Ajhc</a> / <a href="https://github.com/ajhc/ajhc">source</a><br>
<a href="https://travis-ci.org/ajhc/drift"><img src="https://travis-ci.org/ajhc/drift.png" alt="Build Status" style="max-width:100%;vertical-align:middle;"></a>
<a href="http://hackage.haskell.org/package/DrIFT">DrIFT</a> / <a href="https://github.com/ajhc/drift">source</a><br>
<a href="https://travis-ci.org/metasepi/netbsd-arafura-s1"><img src="https://travis-ci.org/metasepi/netbsd-arafura-s1.png?branch=arafura-s1" alt="Build Status" style="max-width:100%;vertical-align:middle;"></a>
netbsd-arafura-s1 / <a href="https://github.com/metasepi/netbsd-arafura-s1">source</a><br>
<a href="https://travis-ci.org/metasepi/chibios-arafura"><img src="https://travis-ci.org/metasepi/chibios-arafura.png?branch=metasepi-arafura" alt="Build Status" style="max-width:100%;vertical-align:middle;"></a>
chibios-arafura / <a href="https://github.com/metasepi/chibios-arafura">source</a><br>
<a href="https://travis-ci.org/ajhc/demo-cortex-m3"><img src="https://travis-ci.org/ajhc/demo-cortex-m3.png" alt="Build Status" style="max-width:100%;vertical-align:middle;"></a>
demo-cortex-m3 / <a href="https://github.com/ajhc/demo-cortex-m3">source</a><br>
<a href="https://travis-ci.org/ajhc/demo-android-ndk"><img src="https://travis-ci.org/ajhc/demo-android-ndk.png" alt="Build Status" style="max-width:100%;vertical-align:middle;"></a>
demo-android-ndk / <a href="https://github.com/ajhc/demo-android-ndk">source</a><br>
<a href="https://travis-ci.org/ajhc/snatch-idiom"><img src="https://travis-ci.org/ajhc/snatch-idiom.png" alt="Build Status" style="max-width:100%;vertical-align:middle;"></a>
<a href="https://github.com/ajhc/snatch-idiom/blob/master/markdown/index.md">snatch-idiom</a> / <a href="https://github.com/ajhc/snatch-idiom">source</a></p>
<p>Links:</p>
<ul>
<li><a href="manual.html">User's Manual</a>
(<a href="manual_ja.html">in Japanese</a>)</li>
<li>Hacking Guide (<a href="http://files.metasepi.org/ajhc/ajhc-hg-ja.pdf">in Japanese</a>) / <a href="https://github.com/ajhc/ajhc-hacking-guide">source</a></li>
<li><a href="https://github.com/ajhc/ajhc/wiki">Wiki</a></li>
<li><a href="http://www.youtube.com/user/Metasepi/videos">Demo movies</a></li>
<li><a href="http://www.flickr.com/groups/metasepi/">Photos</a></li>
<li><a href="http://groups.google.com/group/metasepi">Mailing list</a></li>
<li><a href="https://github.com/ajhc/ajhc/issues">Bug tracker</a></li>
</ul>
<p>Donate to support us:</p>
<ul>
<li><a href="https://play.google.com/store/apps/developer?id=Metasepi+Design">Buy Metasepi products at Google Play</a></li>
</ul>
<p>This project is founded by <a href="http://metasepi.org/">Metasepi Project</a>.</p>
<p><a href="http://metasepi.org/"><img src="images/metasepi_logo_v1_200x200.png" alt="Metasepi logo" style="max-width:100%;vertical-align:middle;"></a></p>
<p><a href="http://ajhc.metasepi.org/"><img src="images/ajhc_logo_beta1.png" alt="Ajhc logo" style="max-width:100%;vertical-align:middle;"></a></p>
<p><div class="fb-like-box" data-href="https://www.facebook.com/arafura.jhc" data-width="250" data-show-faces="true" data-stream="true" data-show-border="true" data-header="true"></div></p>
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/QA/Tools/I_heart_validator_lg" alt="Valid HTML"></a></p>
</aside>
</div>
</div>
<script type='text/javascript'>
<!--
(function() {
var login = '',
fpf = true,
fpn = '__ulfpc';
// DO NOT ALTER BELOW THIS LINE
var id = 6008443, h = '62c3';
var rand = rand || Math.floor(Math.random() * 9000000) + 1000000;
if('http:'==document.location.protocol){var params={id:id,lt:3,h:h,url:document.URL,ref:document.referrer,lg:login,rand:rand,bw:(window.innerWidth?window.innerWidth:(document.documentElement && document.documentElement.clientWidth!=0?document.documentElement.clientWidth:(document.body?document.body.clientWidth:0 ))),bh:(window.innerHeight?window.innerHeight:(document.documentElement && document.documentElement.clientHeight!=0?document.documentElement.clientHeight:(document.body?document.body.clientHeight:0 ))),dpr:(window.devicePixelRatio!=undefined?window.devicePixelRatio:0),sw:screen.width,sh:screen.height,dpr:(window.devicePixelRatio!=undefined?window.devicePixelRatio:0),sb:document.title,guid:'ON'};if(fpf){params.fp=getuid(fpn);}params.eflg=1;var a=document.createElement('a');var lg=document.createElement('img');lg.setAttribute('id','_ullogimgltr');lg.setAttribute('width',1);lg.setAttribute('height',1);lg.setAttribute('alt','');var src='http://le.nakanohito.jp/le/1/?';for(var key in params ) src=src.concat(key+'='+encodeURIComponent(params[key] )+'&');lg.src=src.slice(0,-1);a.setAttribute('href','http://smartphone.userlocal.jp/');a.setAttribute('target','_blank');a.appendChild(lg);var s=document.getElementsByTagName('body')[0];s.appendChild(a);}
function getuid(key){var arr=[],date=new Date(),exp=new Date();exp.setFullYear(exp.getFullYear()+7);if(document.cookie){arr=document.cookie.split(";");for(var i=0; i<arr.length; i++ ){var str=arr[i].replace(/^\s+|\s+$/g,"");var len=str.indexOf('=');if(str.substring(0,len)==key)return unescape(str.slice(len+1));}}var r=randobet(4);var m=date.getMonth()+1,d=date.getDate(),h=date.getHours(),i=date.getMinutes(),s=date.getSeconds();var num=String(date.getFullYear())+(String(m).length==1?'0':'' )+String(m)+(String(d).length==1?'0':'' )+String(d)+(String(h).length==1?'0':'' )+String(h)+(String(i).length==1?'0':'' )+String(i)+(String(s).length==1?'0':'' )+String(s)+String(r);document.cookie=key+'='+num+'_f; expires='+(new Date(exp).toUTCString())+'; domain='+location.hostname;return num+'_f';}
function randobet(n){var a='123456789'.split(''),s='';for(var i=0;i<n;i++) s+=a[Math.floor(Math.random() * a.length)];return s;};
})();
//-->
</script>
<noscript>
<a href='http://smartphone.userlocal.jp/' target='_blank'><img src='http://le.nakanohito.jp/le/1/?id=6008443&h=62c3<=3&guid=ON&eflg=1' alt='nakanohito.jp' height='1' width='1' border='0' /></a>
</noscript>
</body>
</html>