Ganymede 0.0.0.4 → 0.0.0.5
raw patch · 3 files changed
+285/−22 lines, 3 files
Files
- Ganymede.cabal +3/−2
- Ganymede.hs +18/−20
- vague's - amalthea.html +264/−0
Ganymede.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented. -Version: 0.0.0.4 +Version: 0.0.0.5 -- A short (one-line) description of the package. Synopsis: An Io interpreter in Haskell. @@ -44,7 +44,8 @@ -- Extra files to be distributed with the package, such as examples or -- a README. -Extra-source-files: AmalObs.txt, IoGrammar.txt, LICENSE, README +Extra-source-files: AmalObs.txt, IoGrammar.txt, LICENSE, README, + "vague's - amalthea.html" -- Constraint on the version of Cabal needed to build this package. Cabal-version: >=1.6
Ganymede.hs view
@@ -20,7 +20,7 @@ import Io.Util (ganyOptErr, ganyRunErr) import Prelude hiding (catch, error) -import Control.Exception (Exception(..), Handler(..), catches) +import Control.Exception (Handler(..), catches) import Data.Data (Data) import Data.List (foldl') import Data.Maybe (fromMaybe, fromJust, listToMaybe) @@ -29,12 +29,11 @@ import System.Environment (getArgs) import System.Exit (exitSuccess) import System.IO (hFlush, stdout) -import System.IO.Error (annotateIOError) ganyOpts :: Options getOpts :: [String] -> IO (Options, [String]) -speclist :: [OptDescr (Options -> IO Options)] -usage_msg :: String +specList :: [OptDescr (Options -> IO Options)] +usageMsg :: String version :: String data Options = Options @@ -47,9 +46,9 @@ , varSuptOpt :: Bool } deriving (Show, Data, Typeable) -- Informative program values: -version = "0.0.0.3" +version = "0.0.0.5" -usage_msg = +usageMsg = "Usage: ganymede [options] <sourcefile>\n\ \Runs the Io source file.\n\ \Options are:" @@ -65,9 +64,9 @@ } -- (* Argument handling *) -speclist = +specList = [ Option ['h','?'] ["help"] - (NoArg (\_ -> putStrLn (usageInfo usage_msg speclist) + (NoArg (\_ -> putStrLn (usageInfo usageMsg specList) >> exitSuccess)) " Show this help text" , Option ['d','t'] ["debug","trace"] @@ -77,24 +76,24 @@ (NoArg (\_ -> putStrLn ("Ganymede, version "++ version) >> exitSuccess)) " print the Ganymede version number" - , Option ['c' ] ["clean","noprelude"] + , Option ['c','n'] ["clean","noprelude"] (NoArg (\opts -> return$ opts { pLoadOpt = [] })) " prevent the prelude from being loaded" - , Option ['P' ] ["Prelude"] + , Option ['P' ] ["Prelude"] (OptArg ((\f opts -> return$ opts { pLoadOpt = [(f, Nothing)] }) . - fromMaybe "prelude") + fromMaybe "prelude") "FILE") " load FILE as prelude" - , Option ['p' ] ["pretty"] + , Option ['p' ] ["pretty"] (NoArg (\opts -> return$ opts { ppOpt = True })) " pretty-print the source file" - , Option ['m' ] ["mutable","vars"] + , Option ['m' ] ["mutable","vars"] (NoArg (\ opts -> return$ opts { varSuptOpt = True })) " enable mutable module variables (unpure)" ] -getOpts args = let gErr = ganyOptErr usage_msg speclist in - case getOpt Permute speclist args of +getOpts args = let gErr = ganyOptErr usageMsg specList in + case getOpt Permute specList args of (o,n, [] ) -> do { opts <- foldl' (>>=) (return ganyOpts) $ (\opts -> return$ opts { inputOpt = listToMaybe n }) : o; @@ -109,7 +108,7 @@ -- the pair of Bools denote mutables and program tracing, respectively. build_n_run p@(_, (_, _, _, ex)) (varStatus, traceStatus) = do { (_,env,_) <- Module.catch_module_errors -- Modules - (Module.load_world_of_ast traceStatus) p ; + Module.load_world_of_ast traceStatus p ; Interp.catch_interpreter_errors -- Interp Interp.interpret_expr_in_env (env, ex, (varStatus, traceStatus)) } {--} @@ -120,7 +119,7 @@ (opts,_) <- getOpts =<< getArgs -- print opts let filename = fromJust (inputOpt opts) - ast <- Module.catch_module_errors Module.loadAST filename + ast <- Module.catch_module_errors Module.loadAST (pLoadOpt opts) filename if ppOpt opts then putStrLn (Pretty.prettyPrint ast "\n") else (do @@ -129,9 +128,8 @@ `catches` [ Handler (\(IoError err) -> ioError (userError err)) -- if all else fails... , Handler ganyRunErr - ]) -- where --- ganyRunErr e = ioError (annotateIOError e "Ganymede: " Nothing Nothing) - + ]) + {- (************************************************************ Amalthea main
+ vague's - amalthea.html view
@@ -0,0 +1,264 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">+<!-- saved from url=(0068)file:///C:/Users/BMeph/Documents/Ganymede/vague's%20-%20amalthea.htm -->+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>vague's - amalthea</title>+<link rel="stylesheet" type="text/css" href="./vague's - amalthea_files/main.css">+<meta name="GENERATOR" content="MSHTML 8.00.6001.19019"></head>+<body leftmargin="0" topmargin="0" bgcolor="#f7f7f9" marginheight="0" marginwidth="0"><div style="z-index: 9000; position: relative; min-width: 800px; padding-bottom: 0px; min-height: 70px; padding-left: 5px; padding-right: 5px; padding-top: 0px; display: block; " id="wm-ipp">+<div style="BACKGROUND-IMAGE: url(http://static.waybackmachine.org/images/toolbar/wm_tb_bk_trns.png); BORDER-BOTTOM: #000 5px solid; POSITION: fixed; MIN-WIDTH: 780px; TEXT-ALIGN: center; BORDER-LEFT: #000 5px solid; PADDING-BOTTOM: 0px !important; MARGIN: 0px; PADDING-LEFT: 0px !important; WIDTH: 97%; PADDING-RIGHT: 0px !important; FONT-FAMILY: 'Lucida Grande','Arial',sans-serif !important; FONT-SIZE: 11px !important; BORDER-TOP: medium none; BORDER-RIGHT: #000 5px solid; PADDING-TOP: 0px !important; -moz-box-shadow: 1px 1px 3px #333; -webkit-box-shadow: 1px 1px 3px #333; box-shadow: 1px 1px 3px #333" id="wm-ipp-inside">+<table style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; BORDER-COLLAPSE: collapse; PADDING-TOP: 0px">+ <tbody>+ <tr>+ <td style="MIN-WIDTH: 110px; PADDING-BOTTOM: 10px; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; VERTICAL-ALIGN: top; PADDING-TOP: 10px"><a style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BACKGROUND-COLOR: transparent; BORDER-TOP: medium none; BORDER-RIGHT: medium none" title="Wayback Machine home page" href="http://waybackmachine.org/"><img border="0" alt="Wayback Machine" src="./vague's - amalthea_files/wayback-toolbar-logo.png" width="110" height="39"></a> </td>+ <td style="TEXT-ALIGN: center; PADDING-BOTTOM: 0px !important; PADDING-LEFT: 0px !important; WIDTH: 100%; PADDING-RIGHT: 0px !important; VERTICAL-ALIGN: top; PADDING-TOP: 0px !important">+ <table style="PADDING-BOTTOM: 0px; MARGIN: 0px auto; PADDING-LEFT: 0px; WIDTH: 570px; PADDING-RIGHT: 0px; BORDER-COLLAPSE: collapse; PADDING-TOP: 0px">+ <tbody>+ <tr>+ <td style="PADDING-BOTTOM: 3px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 3px" colspan="2">+ <form style="PADDING-BOTTOM: 0px !important; MARGIN: 0px; PADDING-LEFT: 0px !important; PADDING-RIGHT: 0px !important; PADDING-TOP: 0px !important" id="wmtb" method="get" name="wmtb" action="http://waybackmachine.org/form-submit.jsp" target="_top"><input style="WIDTH: 400px; FONT-FAMILY: 'Lucida Grande','Arial',sans-serif; FONT-SIZE: 11px" id="wmtbURL" onfocus="javascript:this.focus();this.select();" value="http://www.guldheden.com/~sandin/amalthea.html" name="url"><input value="replay" type="hidden" name="type"><input value="20081118165414" type="hidden" name="date"><input style="FONT-FAMILY: 'Lucida Grande','Arial',sans-serif; MARGIN-LEFT: 5px; FONT-SIZE: 11px" value="Go" type="submit"><span style="DISPLAY: block" id="wm_tb_options"></span></form></td>+ <td style="PADDING-BOTTOM: 0px !important; PADDING-LEFT: 0px !important; PADDING-RIGHT: 0px !important; VERTICAL-ALIGN: bottom; PADDING-TOP: 5px !important" rowspan="2">+ <table style="WIDTH: 110px; BORDER-COLLAPSE: collapse; FONT-FAMILY: 'Helvetica','Lucida Grande','Arial',sans-serif; COLOR: #99a">+ <tbody><!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->+ <tr style="WIDTH: 110px; HEIGHT: 16px; FONT-SIZE: 10px !important">+ <td style="TEXT-ALIGN: right; TEXT-TRANSFORM: uppercase; PADDING-RIGHT: 9px; WHITE-SPACE: nowrap; FONT-SIZE: 11px !important; OVERFLOW: visible; FONT-WEIGHT: bold" nowrap=""><a style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BACKGROUND-COLOR: transparent; COLOR: #33f; BORDER-TOP: medium none; FONT-WEIGHT: bold; BORDER-RIGHT: medium none; TEXT-DECORATION: none" title="6 Jan 2008" href="http://replay.waybackmachine.org/20080106165637/http://www.guldheden.com/~sandin/amalthea.html"><strong>JAN</strong></a> + </td>+ <td style="text-align: center; text-transform: uppercase; width: 34px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(0, 0, 0); height: 15px; font-size: 11px !important; font-weight: bold; padding-top: 1px; color: rgb(255, 255, 0); background-position: initial initial; background-repeat: initial initial; " id="displayMonthEl" title="You are here: 16:54:14 Nov 18, 2008">Nov</td>+ <td style="TEXT-TRANSFORM: uppercase; PADDING-LEFT: 9px; WHITE-SPACE: nowrap; FONT-SIZE: 11px !important; OVERFLOW: visible; FONT-WEIGHT: bold" nowrap="">Dec </td></tr><!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->+ <tr>+ <td style="TEXT-ALIGN: right !important; PADDING-RIGHT: 9px; WHITE-SPACE: nowrap; VERTICAL-ALIGN: middle !important; OVERFLOW: visible" nowrap=""><a style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BACKGROUND-COLOR: transparent; BORDER-TOP: medium none; BORDER-RIGHT: medium none" title="16:56:37 Jan 6, 2008" href="http://replay.waybackmachine.org/20080106165637/http://www.guldheden.com/~sandin/amalthea.html"><img border="0" alt="Previous capture" src="./vague's - amalthea_files/wm_tb_prv_on.png" width="14" height="16"></a> </td>+ <td style="text-align: center; padding-bottom: 0px; padding-left: 0px; width: 34px; padding-right: 0px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(0, 0, 0); height: 24px; font-size: 24px; font-weight: bold; padding-top: 2px; color: rgb(255, 255, 0); background-position: initial initial; background-repeat: initial initial; " id="displayDayEl" title="You are here: 16:54:14 Nov 18, 2008">18</td>+ <td style="TEXT-ALIGN: left !important; PADDING-LEFT: 9px; WHITE-SPACE: nowrap; VERTICAL-ALIGN: middle !important; OVERFLOW: visible" nowrap=""><img border="0" alt="Next capture" src="./vague's - amalthea_files/wm_tb_nxt_off.png" width="14" height="16"> </td></tr><!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->+ <tr style="WIDTH: 110px; HEIGHT: 13px; FONT-SIZE: 9px !important"><td style="TEXT-ALIGN: right; PADDING-RIGHT: 9px; WHITE-SPACE: nowrap; FONT-SIZE: 11px !important; OVERFLOW: visible; FONT-WEIGHT: bold" nowrap=""><a style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BACKGROUND-COLOR: transparent; COLOR: #33f; BORDER-TOP: medium none; FONT-WEIGHT: bold; BORDER-RIGHT: medium none; TEXT-DECORATION: none" title="28 Oct 2007" href="http://replay.waybackmachine.org/20071028200108/http://www.guldheden.com/~sandin/amalthea.html"><strong>2007</strong></a> + </td>+ <td style="text-align: center; width: 34px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(0, 0, 0); height: 13px; font-size: 11px !important; font-weight: bold; padding-top: 1px; color: rgb(255, 255, 0); background-position: initial initial; background-repeat: initial initial; " id="displayYearEl" title="You are here: 16:54:14 Nov 18, 2008">2008</td>+ <td style="PADDING-LEFT: 9px; WHITE-SPACE: nowrap; FONT-SIZE: 11px !important; OVERFLOW: visible; FONT-WEIGHT: bold" nowrap="">2009 </td></tr></tbody></table></td></tr>+ <tr>+ <td style="PADDING-BOTTOM: 0px !important; PADDING-LEFT: 0px !important; PADDING-RIGHT: 0px !important; VERTICAL-ALIGN: middle; PADDING-TOP: 0px !important"><a style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BACKGROUND-COLOR: transparent; COLOR: #33f; FONT-SIZE: 11px; BORDER-TOP: medium none; FONT-WEIGHT: bold; BORDER-RIGHT: medium none" title="See a list of every capture for this URL" href="http://waybackmachine.org/20081118165414*/http://www.guldheden.com/~sandin/amalthea.html"><strong>50 + captures</strong></a> + <div style="PADDING-BOTTOM: 0px !important; MARGIN: 0px; PADDING-LEFT: 0px !important; PADDING-RIGHT: 0px !important; WHITE-SPACE: nowrap; COLOR: #666; FONT-SIZE: 9px; PADDING-TOP: 2px !important" title="Timespan for captures of this URL">15 Dec 02 - 18 Nov + 08</div></td>+ <td style="PADDING-BOTTOM: 0px !important; PADDING-LEFT: 0px !important; PADDING-RIGHT: 0px !important; PADDING-TOP: 0px !important"><a style="POSITION: relative; WIDTH: 400px; WHITE-SPACE: nowrap; HEIGHT: 27px" id="wm-graph-anchor" href="http://replay.waybackmachine.org/20010815000000/http://www.guldheden.com/~sandin/amalthea.html">+ <div style="POSITION: relative; BACKGROUND-COLOR: #fff; WIDTH: 400px; WHITE-SPACE: nowrap; HEIGHT: 27px; CURSOR: pointer; BORDER-RIGHT: #ccc 1px solid" id="wm-ipp-sparkline" title="Explore captures for this URL"><img style="Z-INDEX: 9012; POSITION: absolute; TOP: 0px; LEFT: 0px" id="sparklineImgId" onmouseover="showTrackers('inline');" onmousemove="trackMouseMove(event,this)" onmouseout="showTrackers('none');" border="0" alt="sparklines" src="./vague's - amalthea_files/graph.png" width="400" height="27"> <img style="z-index: 9010; position: absolute; left: 125px; display: none; " id="wbMouseTrackYearImg" border="0" src="./vague's - amalthea_files/transp-yellow-pixel.png" width="25" height="27"> <img style="z-index: 9011; position: absolute; left: 140px; display: none; " id="wbMouseTrackMonthImg" border="0" src="./vague's - amalthea_files/transp-red-pixel.png" width="2" height="27"> </div></a></td></tr></tbody></table></td>+ <td style="TEXT-ALIGN: right; PADDING-BOTTOM: 5px; PADDING-LEFT: 5px; WIDTH: 65px; PADDING-RIGHT: 5px; FONT-SIZE: 11px !important; PADDING-TOP: 5px"><a style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-RIGHT: 18px; DISPLAY: block; FONT-FAMILY: 'Lucida Grande','Arial',sans-serif; MARGIN-BOTTOM: 23px; BACKGROUND: url(http://static.waybackmachine.org/images/toolbar/wm_tb_close.png) no-repeat 100% 0px; COLOR: #33f; BORDER-TOP: medium none; BORDER-RIGHT: medium none" title="Close the toolbar" onclick="document.getElementById('wm-ipp').style.display='none';" href="javascript:;">Close</a> <a style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-RIGHT: 18px; DISPLAY: block; FONT-FAMILY: 'Lucida Grande','Arial',sans-serif; BACKGROUND: url(http://static.waybackmachine.org/images/toolbar/wm_tb_help.png) no-repeat 100% 0px; COLOR: #33f; BORDER-TOP: medium none; BORDER-RIGHT: medium none" title="Get some help using the Wayback Machine" href="http://faq.waybackmachine.org/">Help</a> +</td></tr></tbody></table></div></div><!-- BEGIN WAYBACK TOOLBAR INSERT -->+<script type="text/javascript" src="./vague's - amalthea_files/disclaim-element.js"></script>++<script type="text/javascript" src="./vague's - amalthea_files/graph-calc.js"></script>++<script type="text/javascript" src="./vague's - amalthea_files/jquery.min.js"></script>++<script type="text/javascript">+var firstDate = 820454400000;+var lastDate = 1325375999999;+var wbPrefix = "http://replay.waybackmachine.org/";+var wbCurrentUrl = "http://www.guldheden.com/~sandin/amalthea.html";++var curYear = -1;+var curMonth = -1;+var yearCount = 16;+var firstYear = 1996;+var imgWidth=400;+var yearImgWidth = 25;+var monthImgWidth = 2;+var trackerVal = "none";+var displayDay = "18";+var displayMonth = "Nov";+var displayYear = "2008";+var prettyMonths = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];++function showTrackers(val) {+ if(val == trackerVal) {+ return;+ }+ if(val == "inline") {+ document.getElementById("displayYearEl").style.color = "#ec008c";+ document.getElementById("displayMonthEl").style.color = "#ec008c";+ document.getElementById("displayDayEl").style.color = "#ec008c"; + } else {+ document.getElementById("displayYearEl").innerHTML = displayYear;+ document.getElementById("displayYearEl").style.color = "#ff0";+ document.getElementById("displayMonthEl").innerHTML = displayMonth;+ document.getElementById("displayMonthEl").style.color = "#ff0";+ document.getElementById("displayDayEl").innerHTML = displayDay;+ document.getElementById("displayDayEl").style.color = "#ff0";+ }+ document.getElementById("wbMouseTrackYearImg").style.display = val;+ document.getElementById("wbMouseTrackMonthImg").style.display = val;+ trackerVal = val;+}+function getElementX2(obj) {+ var thing = jQuery(obj);+ if((thing == undefined) + || (typeof thing == "undefined") + || (typeof thing.offset == "undefined")) {+ return getElementX(obj);+ }+ return Math.round(thing.offset().left);+}+function trackMouseMove(event,element) {++ var eventX = getEventX(event);+ var elementX = getElementX2(element);+ var xOff = eventX - elementX;+ if(xOff < 0) {+ xOff = 0;+ } else if(xOff > imgWidth) {+ xOff = imgWidth;+ }+ var monthOff = xOff % yearImgWidth;++ var year = Math.floor(xOff / yearImgWidth);+ var yearStart = year * yearImgWidth;+ var monthOfYear = Math.floor(monthOff / monthImgWidth);+ if(monthOfYear > 11) {+ monthOfYear = 11;+ }+ // 1 extra border pixel at the left edge of the year:+ var month = (year * 12) + monthOfYear;+ var day = 1;+ if(monthOff % 2 == 1) {+ day = 15;+ }+ var dateString = + zeroPad(year + firstYear) + + zeroPad(monthOfYear+1,2) ++ zeroPad(day,2) + "000000";++ var monthString = prettyMonths[monthOfYear];+ document.getElementById("displayYearEl").innerHTML = year + 1996;+ document.getElementById("displayMonthEl").innerHTML = monthString;+ // looks too jarring when it changes..+ //document.getElementById("displayDayEl").innerHTML = zeroPad(day,2);++ var url = wbPrefix + dateString + '/' + wbCurrentUrl;+ document.getElementById('wm-graph-anchor').href = url;++ //document.getElementById("wmtbURL").value="evX("+eventX+") elX("+elementX+") xO("+xOff+") y("+year+") m("+month+") monthOff("+monthOff+") DS("+dateString+") Moy("+monthOfYear+") ms("+monthString+")";+ if(curYear != year) {+ var yrOff = year * yearImgWidth;+ document.getElementById("wbMouseTrackYearImg").style.left = yrOff + "px";+ curYear = year;+ }+ if(curMonth != month) {+ var mtOff = year + (month * monthImgWidth) + 1;+ document.getElementById("wbMouseTrackMonthImg").style.left = mtOff + "px";+ curMonth = month;+ }+}+</script>++<style type="text/css">BODY {+ MIN-WIDTH: 800px !important; MARGIN-TOP: 0px !important; PADDING-TOP: 0px !important+}+#wm-ipp A:hover {+ TEXT-DECORATION: underline !important+}+</style>+++<script type="text/javascript">+ var wmDisclaimBanner = document.getElementById("wm-ipp");+ if(wmDisclaimBanner != null) {+ disclaimElement(wmDisclaimBanner);+ }+</script>+<!-- END WAYBACK TOOLBAR INSERT -->+<center>+<table cellspacing="0" cellpadding="0" width="100%">+ <tbody>+ <tr>+ <td class="content" width="50%" align="middle"><img src="./vague's - amalthea_files/solid.gif" width="1" height="1"></td>+ <td class="content" width="1" align="left"><img src="./vague's - amalthea_files/solid.gif" width="1" height="1"></td>+ <td class="content" width="480" align="middle"><img src="./vague's - amalthea_files/solid.gif" width="480" height="15"></td>+ <td class="content" valign="top" width="1" align="left"><img src="./vague's - amalthea_files/solid.gif" width="1" height="1"></td>+ <td class="content" width="50%" align="middle"><img src="./vague's - amalthea_files/solid.gif" width="1" height="1"></td></tr>+ <tr>+ <td class="hordiv" colspan="5"><img src="./vague's - amalthea_files/solid.gif" width="1" height="1"></td></tr>+ <tr>+ <td class="menucontainer" width="50%" align="middle"><img src="./vague's - amalthea_files/solid.gif" width="1" height="1"></td>+ <td class="menucontainer" valign="bottom" width="1" align="left"><img src="./vague's - amalthea_files/menudivline.gif" width="19" height="10"></td>+ <td class="menucontainer" width="480" align="left">+ <table cellspacing="2" cellpadding="1">+ <tbody>+ <tr>+ <td valign="top" align="left"><img alt="vague" src="./vague's - amalthea_files/logo_bleak3.gif" width="130" height="38"></td>+ <td> </td>+ <td><span class="menu">1 </span><a class="menu" href="http://replay.waybackmachine.org/20081118165414/http://www.guldheden.com/~sandin/index.html">Home</a><br><span class="menu">2 </span><a class="menu" href="http://replay.waybackmachine.org/20081118165414/http://www.guldheden.com/~sandin/links.html"></a><br>+ </td><td> </td>+ <td><span class="menu">3 </span><a class="menu2" href="http://replay.waybackmachine.org/20081118165414/http://www.guldheden.com/~sandin/lang.html">Languages</a><br><span class="menu">4 </span><a class="menu2" href="http://replay.waybackmachine.org/20081118165414/http://www.guldheden.com/~sandin/amalthea.html">Amalthea</a><br>+ </td><td> </td>+ <td><span class="menu">5 </span><a class="menu3" href="http://replay.waybackmachine.org/20081118165414/http://www.guldheden.com/~sandin/textpad.html">TextPad</a><br><span class="menu">6 </span><a class="menu3" href="http://replay.waybackmachine.org/20081118165414/http://www.guldheden.com/~sandin/archive.html">Archive</a></td></tr></tbody></table></td>+ <td class="menucontainer2" valign="top" width="1" align="left"><img src="./vague's - amalthea_files/solid.gif" width="1" height="1"></td>+ <td class="menucontainer2" valign="top" width="50%" align="middle"><img src="./vague's - amalthea_files/solid.gif" width="1" height="1"></td></tr>+ <tr>+ <td class="hordiv" colspan="5"><img src="./vague's - amalthea_files/solid.gif" width="1" height="1"></td></tr>+ <tr>+ <td class="content" valign="top" width="50%" align="right"><span class="section">4</span></td>+ <td class="content" valign="top" width="1" align="left"><img src="./vague's - amalthea_files/divline.gif" width="19" height="200"></td>+ <td class="content" valign="top" width="480" align="left"><!-- Content --><!-- Intro --> <br><span class="headline">io + & amalthea</span><span class="date"> 021126</span><br>A couple of + years back I was reading through Raphael Finkel's book <i>Advanced + Programming Language Design</i>. I thought the book an excellent and fun + introduction to various programming language concepts and constructs, but + the part that intrigued me the most was a section on <i>continuations</i>, + a fundamental and powerful construct which can be used to express many + more common language constructs. I was somewhat familiar with the concept + prior to reading about them in APLD but the author used a programming + language called Io to introduce the concept and this language struck me as + both confounding and beautiful. The language is absolutely tiny, both in + syntax and in the ammount of concepts supported. It really has nothing but + continuations, both for flow control and data. Continuations are used for + expressing conditional statements, functions, and even structured data + types. List, tuples, trees, and so on can all be expressed using first + class continuations. + <p>Since the language so tickled my language nerve I wanted to try it out, + play around a bit. Scouring the net with Google turned up very little, no + implementations and no other references to the language than the one found + in the aforementioned book. I asked around, still nothing. And so I + concluded that there was no implementation available for this tiny + language. I then let the subject be until I had to chose a project for a + class, topics in computer languages. I decided my project should be an Io + interpreter and I decided it should go by the name Amalthea (Amalthea is + one of the smaller moons of Jupiter while Io is a large one). + </p><p><span class="headline">amalthea</span><span class="date"> + 021126</span><br>Amalthea was made using <a class="content" href="http://replay.waybackmachine.org/20081118165414/http://www.ocaml.org/">OCaml</a>, + which I learned to make Amalthea. I was a mostly pleasurable experience + even though OCaml's syntax is nowhere near as nice as <a class="content" href="http://replay.waybackmachine.org/20081118165414/http://www.haskell.org/">Haskell</a>'s. + I also didn't really exploit (or need) any of OCaml's OO or module + features in making Amalthea, so a lot remains to be learned. + </p><p>Amalthea is, as always with this kind of projects, heavily under + development, whenever I get the urge to. I mean Amalthea to come with a + small standard library, some detailed examples, and good documentation. + What's here for you to download is a snapshot of the progress in each + area. Most notable is the lack of any documentation on how to program Io. + For now I'll have to refer anyone who downloads Amalthea with the + intention of trying it out to Advanced Programming Language Design, + available <a class="content" href="http://replay.waybackmachine.org/20081118165414/http://www.nondot.org/sabre/Mirrored/AdvProgLangDesign/">on + the web</a>. + </p><p><span class="headline">download</span><span class="date"> + 030128</span><br>A new version, 0.874. It's added a bunch of stuff, + including mutable variables and selective imports. Version 0.875 is merely + a new distribution with a filename change to compile under *nix. The error + reporting is a bit flakey in this release but improvements are comming + along as I have the time and inclination. A Windows(tm) binary is included + along with the sources, users of other OSs will have to compile it + themselves using a recent version of OCaml. If anyone wants to make + distributions for Linux, please do so and I'll put them up here. + </p><p><a class="content" href="http://replay.waybackmachine.org/20081118165414/http://www.guldheden.com/~sandin/files/amalthea0875.tar.gz">Download + Amalthea v0.875</a> + </p><p> <!-- /Content --></p></td>+ <td class="content" valign="top" width="1" align="left"><img src="./vague's - amalthea_files/solid.gif" width="19" height="200"></td>+ <td class="content" width="50%" align="middle"></td></tr>+ <tr>+ <td class="content" width="50%" align="middle"></td>+ <td class="content" width="1" align="left"></td>+ <td class="content" width="480" align="middle"><img src="./vague's - amalthea_files/solid.gif" width="480" height="1"></td>+ <td class="content" valign="top" width="1" align="left"></td>+ <td class="content" width="50%" align="middle"></td></tr></tbody></table></center><!--+ FILE ARCHIVED ON 16:54:14 Nov 18, 2008 AND RETRIEVED FROM THE+ INTERNET ARCHIVE ON 15:59:24 Mar 4, 2011.+ JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.++ ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.+ SECTION 108(a)(3)).+-->+</body></html>