The lambda calculus. A highly theoretical programming language. Well its more of a calculus. See [[Haskell]].
Touched up the OutsourcingReport with a few minor changes.\n\nWritten / expanded a couple more tests for the view model. Need to attach them with avengance tommorrow / weekend. (Which is looking like I may have 2 1/2 fully free days at this rate. Boo). Also experimenting with [[Ruby]]'s faked keyword arguments. May need to write a lil lib to do this more graciously using meta-programming. Something for a spare moment perhaps.
Happy New Year! \n\nSlowly recovering from sleep deprivation from last night.\n\nGot a bit miffed on the [[ruby newsgroups|]] with people mixing up StaticTyping with StrongTyping and NominalTyping (and more worryingly Generics with Overloading)! IBlameJava. Will need to put something in the OutsourcingReport about these things, at least definining what I mean by them, since lots of people seem to have lots of different interpretations. Ho hum.\n\nI have got to find some motivation and start for this final week. Lets start with some ProjectMotivation.
6 Pages a day, or 2 pages before lunch, 2 pages after lunch, 2 pages after 5 o clock.\n\nSo start of day: 20 pages.\n\nRsub in, 26 pages. Guess I can go home now ;)\nHave made Rsub executable (ish - need to add some utility libraries really).
Had a good second meeting with my second marker r.e. the RSub operational semantics. It was decided to make a few changes to make the distinction between stack/variable references and addresses more clear, and possibly re-structure how closures are represented.\n\nAlso should investigate {{{\stabular}}} in latex as opposed to {{{\salign}}}.
Sneaking a quick 30mins of work on the code in...have just realised that my notion of complete? for ast nodes was waaay too generous and doesn't really make sense 'in the real world'. Need to make it more stringent.
!!Plan of action: \n*Write up specification and evaluation as best I can.\n*Work back from that for the relevant theory.\n*See Susan at 4.\n*Finish Outsourcing report\n*Realise I have an impossible project to program and not enough time to do it in because I've wasted all my time writting stupid stuff on this wiki.\n*Fail\n\nEugh, there's 1^^st^^, 2^^nd^^ and 3^^rd^^ years in this room, all talking and making noise. Its enough to drive me mad!! \n\nWritten up very rough specifications. Torn between elaborating on them and planning out next sections of reseasrch.\n\nBeen reading a bit of Abadi/Cardelli's "A Theory Of Objects". Suddenly now wondering if the word Imperative should be in my project title somewhere, since Object-Oriented (or dynamic) does not really imply that it is imperative. Oh boy.\n\nStarted writing up varsigma (Abadi/Cardelii's simplest untyped object calculus) - going to use it (plust other languages) as a running example for program code.\n\nPut up some *very* rough notes for the Evaluation. Have soo much to do, and so little time to do it in. Also very sleepy.
:( I've just spent the last 36-40 hours in bed with flu. Things are going a bit awry.
Curtosy of matt, trying to build highlight at DoC...might be useful for this report.\n\nAlso curtosy of Matt, am wondering if my generated report really is A4 size. I may worry about this mroe later, but right now it does print ok and looks fine.
Illness is a pain. Mostly better now, and have (inbetween a fluctuating temperature and a headache) have managed to set up my laptop for project development. I have got irritatingly nothing done so far over the last 2 1/2 days, but feel well enough to start now. So lets see what I can get done today!\nTarget is to get pretty much finished with the GUI today.\n\n\n16:20 - Tests finally written for creating and removing nodes in the edit model. Now to tie up to the gui, somehow. \n\nTied some events up to the gui, and setting the structure (and learning enough gtk) for the editing. Still disgustingly far behind where I want to be right now.
Spent the day at home, working on Outsourcing report, since the labs at uni were shut across the middle of the day for a driving test.\n\nWritten a little ruby utility to automatically find all the dependencies (images, inputted latex and inputted code to be generated from highlight) and build them correctly.\n\nEven extended it to automatically generate output from ruby files in a verbatim latex environment.\n\nJotting down notes for how I'm going to write up object oriented languages etc. Will blitz a lot tommorrow methinks.
Its 6.40am. Its dark outside.\nIts now 7.40am. Its light outside! There are also buttons appearing in the GUI to let you quick jump to children, and buttons representing the available node types you could add to a child.
The OutsourcingReport deadline approaches. Time to blitz!\n\nDone a fair bit on Object Oriented languages, including dropping elephants on the floor. Its quite fun what you can do with code samples. Thinking some matrix excerpts would be quite good chapter introductions, just need to look up the scripts.\n\nRight - time to go out and shoot some pool!
Done some work this morning speccing out the well-formdness for programs and classes and stacks and heaps etc. for Rsub. Need to consult the AIOOPL notes tonight and formalize that correctly.\n\nDoing a small quantity of work today on the actual code-base in an effort to get labels up and in.\nPlanning a bit of a refactor/change in the ast layer to get labels in nicely. The plan is:\n*AST layouts now contain either:\n**children, layouts, labels. \n***These all have appropriate callbacks.\n***No symbols kept in the layouts any more (have to be accessored).\n*Refactor to split ASTNodeFactory and ASTNodeFactoryBuilder.\n\nCurrently a WIP, codebase very mucked up at the moment, nothing works! Do have a nice little TODO finding task that dumps the found TODO's in the code base in a vim-friendly format :). {{{:make todo}}} and then {{{:cn}}} to jump to the next one. ''Know thy editor''.
...\nYay exams are finished.\n\n2 1/2 weeks till the end of the month, 2 weeks after that till the report is due.\n\nLets go go go!
The afternoon after the night before...I can't help it if sleep deprived me of the morning...\n\nOutsourcingTODOList for the next two days...\n\nDammit why does abc have to show 8 simple rules all day? Harming productivity!!!
Continuing the work on the refactor and allowing labels in. Got a lot less errors now, and a lot nicer code :)
2 Tasks for today. \n\n* Making the editor totally usable as an editor.\n** Select / edit multiple text items\n** Insert before / after node / text items\n** Delete nodes from the node (not just the child)\n\nYay, so editing, adding, removing etc. all seems to be working ok :)\n\nAt some point I need to make a 'promote' option, so you can convert nodes to other types (or possibly cut/copy/paste or something). But for the moment it is all just about usable.\n\n* Finishing off the RSub Operational Semantics\n\nand then re-evaluating where I am in terms of time.
View things to do:\n\n*==Camera==\n**Very simple, crappy, jumpy camera is in\n*==Y axis done correctly==\n**Ok, so I now happen to rescale the y axis by -1 and then have to do voodoo with text to get it to draw correctly, but at least now the top-left corner is 0,0 :)\n*==Child/node variable x depth done correctly==\n*==Colour nodes==\n**[[rgb-hsv conversion|]]\n**[[and here|]]\n*Solid nodes\n*Make it an editor\n*Decent camera!\n\n^hmm, looks like I'll have more things to do tommorrow and this weekend.\n\nI keep using random (prime) numbers in my unit tests to check things. Its about time I scripted it so I actually had really random prime numbers...ala:\n{{{\nirb(main):030:0> ps = []\n=> []\nirb(main):031:0> (2..500).each { |n| ps << n if ps.find_all { |f| n%f == 0 }.empty? }\n=> 2..500\nirb(main):032:0> 10.times { puts ps[rand(ps.size)] } \n311\n131\n19\n43\n31\n233\n461\n443\n5\n439\n=> 10\nirb(main):033:0> \n}}}\n\nOr in one line:\n{{{ irb(main):029:0>ps = [] ; (2..500).each { |n| ps << n if ps.find_all { |f| n%f == 0 }.empty? }; 10.times { puts ps[rand(ps.size)] } }}}
Working through the OutsourcingTODOList, need to finish today.\n\nJust transferred everything from the laptop to the main machine. SVN can be a real bitch if you confuse it by deleting, moving, forcing of locking files without having live access to the server all the time. Randomly hacking .svn/ files seems to work though :s\n\nAnd now I'm being told my itemizes are too deeply nested. Ho hum\n\nOk, so whats left to do. All the typo's, spelling mistakes, citations and a few little bits that are missing.\nGoing to print out now with a red pen and work out what I have time to do, given I need to be awake at 6 2moro to get this printed properly.\n\nGone through with pen, time to make the changes. Don't have time to add stuff now, lets just hope its ok and I've not missed anything, essential.\n\nWow, I really can't spell. Thats it, I've had enough, its nearly midnight. I declare it finished. No more!
Hopefully should finish the labels on the ast work by the afternoon - only 3 failures and 1 error to go ;) [and then some new code hooking in for rendering the labels].\n\nYay only 1 real failure left to go - and that is rendering the label text correctly :)\n\n13:14 - yay labels are in and working. The while language suddenly looks a lot more like code. Really need to get in configuration options for changing other stuff (e.g. label texts colours, font sizes, box sizes etc). But yay :)\n\nOk just had a break for lunch and some mandatory star-trek watching. Going to get on and finish the last bits of Rsub for an hour or two.\n\nCool, most of the non-operational semantics well-formdness is in.\nNext target is the well-formed-stacks-and-heaps judgements. And then some extensions to add ifTrue, ifFalse and a root Object etc.\n\n[[blender raw triangle export notes]]
Rough PlanOfAction\n\nSo annotations for nodes. Managed via the ast model.\n\nSimple code in, need to hook to the GUI.
So yesterday I was in from roughly 10 - 4:50 and worked for (roughly) most of that time. Current task is to pluggably load annotators for languages and then write at least one for RSub (and do testing etc etc.)
!!On the train\nWell this will be an adventure if nothing else! Using a laptop for my project on a cramp train. Well anyways, a todo list to work through, may aswell finish yesterdays...\n\n!!On the coach to Oxford\nI've been cheeky and have nabbed a table, this is just like working in a mobile office, but with a window! (Queue my sheltered life!)\nAnyways, back to reading the OpenGL red book...\n\nArgh, so my genius plan of working on the coach has been foiled...reading from a laptop screen isn't that good an idea when in a moving vehicle. stupid car sickness! bleugh...\n\n!!Oxford\n\nA spare 10 minutes, lets put to good use...\n\nAt least I've managed to make my model look slightly interesting from an opengl point of view...think I have the normal vectors mixed up somewhat...but oh well\nNormal vectors now appear fine (possibly because I have 2-sided drawing turned on ;) Wireframe outline on the boxes and solid colour with correct offsets to all work happily. Now time for a formal dinner here in Oxford :) yum.\n\n\n*==Solid nodes==\n**Need to research a bit of openGL colouring methinks - looks like I may need to use normal vectors! Arrrgh.\n**Solid colour\n***Well we have solid coloured nodes, but the text is not displaying correctly, and the colours arn't quite, vibrant, enough for my tastes. Need to read, learn and understand materials better!\n**Black outlines\n**Possibly lighting?\n*Make it an editor\n*Decent camera!\n*Massively neaten up the rendering code (at some point!)
So the report was handed in on time. There's about a million extra things I could have put in it, but they can wait for the FinalReport I guess.\n\nTook the rest of monday off to relax and think about what I'm going to implement.\n\nSo today, in theory have the whole day off from uni to work on this project. In practice: I decide that I want to upgrade my kernel and nvidia drivers. Well its a way to waste half an afternoon I suppose.\n{{{\n>uname -a\nLinux Eustacia #1 PREEMPT Tue Jan 17 14:35:08 GMT 2006 i686 GNU/Linux\n}}}\n\nBack on the project track, I need to write a GUI application for building and editing these AST's and showing type information on. I can't get away from the idea of having a 3d environment (since there could be a lot of type information the extra dimension could be helpful!). Since I want to be using ruby for this I guess I'm limited to straight opengl or gtk+ with opengl extensions. Actually the latter could be quite fun, since there will be a quantity of 2d input required aswell which normal wigets could help with.\n\nDitch the code template, but use the xml gui description.\n\nI guess I should start with a prototype something to see if i can get the opengl and gtk interaction to work from ruby. Thats today's mission.\n\nYay, opengl black window and a button that prints "hello world" in just 84 lines.\n\nHehe, just discovered glade (i know nothing about gtk land) design your gui, then save to an xml file, then generate a ruby code template from xml file. Score. Demo available [[here|]]. The code template generated is just to set up the application and handle events, the gui is loaded still from the xml file. Nice.\n\nCouple more lines of code, and probably a ton of xml, and we have a blue background, a white triangle a split pane and a text label. GUI development is soo cool! Why havn't I done this before???\n\nOk, time to calm down. Need some sleep and an early morning - need to plan out how exactly I want this to look. And probably how its all going to hang together.
Fixed a minor bug where ruby 1.8 (home development) allows you to pass arguments to a block not expecting them, but ruby 1.9 (my setup @ uni) doesn't.\nAlso managed to run my project remotely over x from uni to home, which was quite nice, given how responsive it was :)\n\nSpeaking of responsivness, it is getting a little sluggish with the larger example. May have to start optimising rendering when I get up to bigger examples.\n\nRight, re-structuring a chunk of the code to allow the choice of which language you develop with at start-up (and hopefuly in the future load saved programs). Need to have some way of "managing" languages in the tool - [[LanguageDirStructure]].\nWoo can now choose which language you use at startup, and they can have icons too :)\n\nAlso have finally broken the 3k boundry in the source area.\n{{{\n>rake status\n(in /home/tora/project/fleece/code/simple)\n120 tests, 4434 assertions, 1 failures, 0 errors\n5828 LOC, 2703 tests, 3125 source.\n}}}\n\nNext up, saving and loading...
!!Oxford II\nH is out rowing, leaving me to do some work.\n\n*Make an editor\n**Simple editing of some stuff is in. Really need some kind of mode-callback. The notion of only having add and remove in the model is actually a bit weak at the moment.\n**Going to add a callback depending on if available actions are:\n***add_single_item\n***add_multiple_item\n***multiple items\n***Editing progress\n*Decent camera\n\nArgh, forgot to install glade and gtk docs etc. on the laptop. (or set up irb for that matter). Ho hum, will have to do that at another time. Editing loosly works in some cases though, which is nice :)\n\nSooo hungry:\n{{{\n>rake status\n(in /home/tora/project/fleece/code/simple)\n86 tests, 4107 assertions, 1 failures, 0 errors\n4679 LOC, 2146 tests, 2533 source.\n}}}
Ah wednesday,\n\nthe plan for today:\n\nNeed a decent representation of an AST, so need an AST class and an ASTBuilder class that takes an ast description and builds an appropriate factory for it. So, FeaturesAnASTDescriptionNeeds ?\n\nAh meta-programming and it makes you tired\n\nchild children child_map child children child_map child children child_map child_test child child_test_ct \nafter a while child stops being an english word.\n\nAST parser and model generator achieved. Next challenge is to make sure the children double check what is attempted to be added to them, and things like complete?\n8 tests, 109 assertions, ~900 loc
IC DoC games day yesterday.\n\nWorking on the theory of how my annotation strategies will work today. Will write something up when I have it formalized / straight in my head.
Home now
Got gtk+, gtkglext etc. with ruby bindings all working at doc, so my lovely triangle screen works here :)\n\nLiteral test (forgot about literals in the factories) in.\n\nTODO:\n*Testing the instances!\n** guess I need to write an ast and check all the features are correct.\n** what could i use?? Well I've just typed up the while language ast, but it doesn't have all the features i want to test out...\n**Guess I need a simple OO language, classes, methods, etc? Ah I'm tired, I'll work it out tommorrow morning.\n\n* Also more tests for the AST definitions:\n**Description nodes (necessary or not?)
Equality for nodes done. Saving and loading should be simple as it follows suit FLW.
@ DoC - got a couple of hours before meetings n things.\n14:11 -> 15:40\nWorking through writing the ast view model tests. - Realising that there are a lot of corner cases I need to consider :S Could make writing these tests all the more fun! (With a lot of distraction)
To work.\n\nDiscovering as I'm working on this OutsourcingReport I keep getting distracted by things I will need to put in later; so better start keeping some notes to refer to:\n* SpecificationNotes\n\nBibtex is terribly annoying, as are citations in general. What is the correct way to cite a programming language? Its home website, its design manual, its mailing list?\n\nYay have finished my Project Roots section of my background of the report. Yay! Small milestones.\nNext? Think I'll write up the TypingTerminology that I'll be using, since its bugging me so much.\n\nGrr, how do you get latex to include an svg in a DVI eh? Answer, you don't. You use sodipodi to convert said svg into a ps, then ps2epsi to get that into an epsi (the raw ps doesn't have a bounding box). Then you use rake to automate the process should you decide to change the first svg. Well thats wasted an hour and a half figuring out how to do that. At least I have the logo on the title page now.
6 pages a day.\n\nStart of day - 26 pages. Target is 32 by end of day. Need to rejg some execution stuff though (which will save me a job later).\n\nGoing to put in the Rsub examples and then start something on the implementation of Fleece. If things get despearate I can always copy in more from the outsourcing...\n\n6 pages done, though a few are a little bit blank...
In doc labs working on the latex for Rsub
So, Bracha's paper got mentioned on LTU again ([[here|]]), reading the comments attached is interesting; appears there is already a programming language with the optional type system stuff [[Nickle|]]\n\nBeen tidying up / finishing up the core of the editor today. Adding and deleting single nodes and editing text nodes work, am currently doing camera before a meeting with Susan. Need to add a selection model for multiple nodes.\n\nGave a short demo of the system as it currently stands to Susan and a few other people. General comments/possible improvements/requests to the interface include:\n\n*Get rid of the noise from all the child placeholders if possible\n*Have some form of legend or key to allow seeing what kinds of nodes have what colour\n*Allow some textual presentation of the types of nodes (so a LambdaAbstraction would have .\s on it or something)\n**Maybe allow an icon to be put on the nodes? [more work, more work!]\n*Allow a config file to override the default colours for node types\n*Visual indication when the OpenGL space has keyboard focus as opposed to the other space\n\nGuess I still have a long way to go on the gui. (there is whole shedloads of functionality missing and I want to re-write the redrawing code again!)\n\nHave started thinking about the actual language and types (ho ho) of type systems I'll be doing analysises of. I can see the gui development being driven by what I need for my actual language, including representation of type systems.
Targets for today.\n#== Serialization of ast instances ==\n##== Rename saving and loading / persisting of ast instances to serialization (or maybe even marshalling ... should really look those two up and see which it is...) ==\n# Saving and loading options from within the GUI\n# Execution mechanism for while language\n## Which will probably necessitate a bit of a framework being written\n## Including the specific-ast-walker class\n\nTargets for tommorrow.\n# Rsub\n# Rsub ext\n## That is, the version of Rsub with Object and nil having ifTrue, ifFalse methods\n## Local variable type system (in theory)\n\nMmm so I didn't quite get my targets for today done. But I do have an about dialog :) Will need to get up extra early tommorrow. Getting an early night now so I am able to do just that.
bleugh, bunged up with a cold. not what I need right now. Ah well, must soldier on.
[[lazy.rb|]] - looks like it could be useful for background processing maybe. Looks neat if nothing else :)\n\nAdded a [[Screenshots]] section to this site as it looks pretty enough to make screenshots of it now...\n\nSpent a while working out what to do next with the GUI, decided its a good idea to add a toggle to turn on/off the black outlines round child placeholders. Thats the next job to do properly.\n\nBuilding a new GUITODOList of all the things I want/need to do to the GUI that I should work through at random spare points of time...\n\nStarted writing up / formalising my language R_sub (its name has changed from R* or mini-ruby). Its heavily stripped down, has no control flow, but some funky voodoo to allow first-class-scope-capturing blocks. Should be interesting to see if its deemed appropriate, if I ever get the presentation to a decent state...
Carrying on with the targets from yesterday and today.\n\nMmm, noticed my unit tests are now taking about 8 seconds to run. Why? Well most of it is caused by the now passing ast serialization tests...a bit of profiling shows that the offending method is my ast dumping routine:\n\n{{{\nserialize 0.45 0.02 0.47 0.41518\ndser 0.47 0.02 0.49 0.594387\ndump 4.51 0.07 4.58 4.726406\nload 1.79 0.08 1.87 1.845379\n}}}\n\nAnd what does dump consist of:\n\n{{{\n[ast/serializer.rb]\n do |x|\n"serialize:") { nd = serialize_node root_node }\n" dump:") { str_data = YAML.dump(nd) }\n end\n}}}\n\nLets try swapping to use just Marshal instead...\n{{{\n>ruby abc.rb \nserialize 0.4 0.02 0.42 0.403531\ndser 0.78 0.02 0.8 0.837731\ndump 0.26 0.01 0.27 0.260817\nload 0.14 0.0 0.14 0.12236\n}}}\n\nA lot more reasonable :) Well, at least now its about 3 seconds for that test to run, but I think that serialize and deserialize are getting called *a lot* during that time, so they can be forgiven.\n\nRight, these targets for today:\n\n# == Saving and loading options from within the GUI ==\n## == Need to put in error recovery ==\n# Execution mechanism for while language\n## Which will probably necessitate a bit of a framework being written\n## Including the specific-ast-walker class\n# Rsub\n# Rsub ext\n## That is, the version of Rsub with Object and nil having ifTrue, ifFalse methods\n## Local variable type system (in theory)\n\n\nDAMMIT! Bloody memory leaking with current strategy. Need to refactor a bit so only 1 of each gtk window is ever made and they are show/hidden instead of recreated. Argh. Do have a pretty execution panel, although it doesn't currently do anything.
Target for today: Knock out the TODO list from [[19 January 2006]] and start on something to build and display on the editor.\n\nBy the end of the week I want to have a very simple type checker / inferencer building up a representation somewhere for simply typed lambda. This may be a bit ambitious.\n\nGot rdoc documentation of project building.\n\nRuby for Java users 101: you {{{raise}}} exceptions and then {{{rescue}}} them. You {{{throw}}} symbols and then {{{catch}}} them later. Java throw != Ruby throw!\n\nTest cases written for building up an AST and (loosly) type-checking you don't try and add a string node to a node node.\n\nNext mission, some way of computing a 2D layout. I want to keep this fairly abstract, so I can use the same algorithm to lay out the 3d variant (using height as nesting depth or something) as-well as other 2d variants (fall back painting if 3d is too complex, and maybe a html / css representation too - although actually that could be done without needing numbers as the css engine can control that).\n\nMmm, got 90% of the way through some scary mutually recursive methods. Need to finish them up monday night and get AST's being displayed tues morning. (Well thats the plan anyways). Weds is then day of handling input and then I can start type-checking thursday/friday/saturday - hopefully.
LVar annotor written, and a partial framework that will annotate a system once is in. Need to do the framework for (correctly) partially detecting changes and updating annotations (re-running annotators as necessary) etc.\n\nCallbacks in ast edit model when nodes updated / edited / deleted\n\nTheoryNotes - something that just came to me that should probably be in the report somewhere.
Hmm, mainly been revising for the last fortnight. Well kinda.\n\nTime to put in an hour's work so I don't forget how this project works. Only 6 weeks to go till I really need to start the FinalReport.\n\nComplete? check seems to work ok...lets finish hooking up that stupid execute code thats taken soooo long to actually getting round to doing...\ a bit further, will do another hour or so tommorrow
Bit of hacking away in the labs to remove a potential memory leak that I'd forgotten (eek) about.
[[Rob|]] suggested looking at mock objects for TDD, and suggested a ruby library that could be helpful. [[test-unit-mock|]]. It was a bit of a pain to set it up / finding the correct version of the diff dependencey that it has, but it works now and is proving useful to unit test my walkers that make callbacks for rendering ast's.\n\nHopefully by the end of today I'll have something very simple drawing on screen.\n\nDecided that it was a mistake to try and implement a layout algorithm without working out what the layout should be first ;) \nRender using current algorithm to see if that ast->gui->ogl loop works, then design a new layout, write tests for that layout, restructure layout algorithm for that structure.\n\nMaybe should make the layout structure more pluggable - since the gui's could want to collapse / expand nodes and render / not render them. Ah - requirements elicitation / brainstorming required.\n\nOk, so I have some wireframe boxes one-on-top-of the other. This OpenGL lark should be doable. TODO tommorrow, requirements brainstorm for what I really from the layouts.
The end of development time is approaching \so/\n\n2 jobs for today:\n 1 - hook the annotation engine into the GUI and get the callbacks from the ast editing events to fire into it. Display the correct annotations on the annotation panel for the currently selected node.\n\n 2 - Get the partial updating algorithm to work so the tree stays in sync (roughly).\n\nThis puts be about 2 days behind schedule, but thats ok. The last 2 days of implementation were 'make something up', can always do that bit during (after) the report is finished...\n\nWahay, first ever inferred annotation visible from the GUI :) Now give me a couple more man-years and I might be able to rival eclipse ;) (see [[Screenshots]])\n\nYay, vim 7 has (weak) intellisense [[as you can see here|screenshots/vim-intellisense.png]]!
Wee, very simple execution hooked into the gui. Now to multi-thread it. Yuk. Somehow I get the feeling I'm concentrating on everything but what this proejct is about. Meh, something to worry about later...\n\nWoo coloured text and repeatable execution :)\n\nNext up, kill button to get working, and passing in stdin.
Working on Rsub.
mmm, gradually falling way behind where I want to / need to be. Have to catch up.\n\n..Just keep swimming swimming swimming...What do we do we swim, swim, swim...\n
[[Intertia]] mmm.\n\nTouch more work on execution front-end in the GUI. Really don't want to ==waste== spend much more time on this are there are so many other more pressing matters to attend to...
More working on Rsub.\nHave written a bit of code to turn an op-sem dsl into latex. Its a horrible mess of regex's and a lil bit of parsing, but it means that a rule looks like:\n{{{\n!r Local Variable\nj = u|1( l )\n--\nlvar l, u , X ~> j, u, X\n}}}\nand gets turned into:\n{{{\n\sbegin{prooftree}\n\sAxiomC{$ \s: \siota = \s: \ssigma\s!\sdownarrow_1\s!( \s: \smathit{l} ) $}\n\sRightLabel{ Local Variable }\n\sUnaryInfC{$ \s: \smathrm{lvar} \s: \smathit{l}, \s: \ssigma, \s: \schi \sleadsto_P \s: \siota, \s: \ssigma, \s: \schi $}\n\send{prooftree}\n}}}\n\n(note, that example of a local variable isn't actually the rule for a local variable in my semantics - but its a good illustration).
Realised yesterday that the GUI walker needed abstracting a bit, so need to write generic and specific AST walkers, and then make the gui walker an implementation of that. Should help separate the walking from the laying out.\n\nDiscovered that I have glut avaialable to me in ruby/opengl, so I can use that to make a simple camera system fairly easily (hopefully).\n\nBeen working through my WalkerGuiTODOList that needs to be finished done soon!!!
Am now miles behind where I should be.\n\nOn the other hand the annotation-checking-re-running algorithm seems to be working ok. Type checking can happen (see the [[Screenshots]]), and I have a few broken unit tests.\n\nMaybe possibly need to add a way of justifying the type errors...perhaps..\n\nTommorrow is designing / writing interesting interacting type systems and testing them somehow(!)
Boxing day. Time to start this project with avengence.\n\nHaving written up Bracha's "Pluggable Type Systems" paper for the outsourcing; I've decided I need to set up this web space. So am doing that now; experimenting with [[TiddlyWiki|]] for the web presence. Lets see how it turns out :)\n\nGot a fair bit to do tommorrow, need to write up enough of the OutsourcingReport so it is in a state for me to put up on here somewhere - probably means I need to write an intro explaining what my project is about. That requires me to figure that out! Currently thinking along the lines of //Hybrid Dependant Pluggable Type Inference Systems for Extensible, Dynamic Programming Languages//. Well at least its a well-defined niche of theory if nothing else ;)\nAlso have read HybridTypeChecking so I can write that up tommorrow.
Have written up the op-sem rules of Rsub, including the error cases, and have a structured document with a lot of TODO's in it and informal stuff to actually do.\n\nNot done quite as much as I'd dreamed/hoped this 3-day weekend, somehow simple things like writing PhD statements and sleeping made this weekend a lot shorter than it really should have been.\n\nA new resolution has been formed for the month of march so that I have a chance of handing in a decent project; be in uni 9-6 mon-sat; work (and occassionally go to the gym/pool) at uni, rest at home. Take sunday off. Lucky me, I get two days of feb to practice this resolution before it becomes "real".
So I didn't quite get as far through the WalkerGuiTODOList as I wanted yesterday, need to go-go-go! today :)\n\nAlso have a supervisor meeting today at 4 (which I will write up!!!!).\n\nSo, back to the todo list...(at least everything is working happily at DoC and I have some nice large dual-screen monitors to play with).
The problem with having a project that doesn't work is that it doesn't really motivate you to **want** to work on it. Hum... spose I should though.\nAnd, as always, I'm crap at estimating stuff. \so/ It works now. (or at least, seems to ;))
another TODOList of things I will implement but hav'nt yet.
\nStarted keeping a list of DynamicLanguageTools.\n\nWritten up HybridTypeChecking for the OutsourcingReport (not written quite as much as I would like, but its a case of 1 1/2 pages, or 20).\n\nWorked out a tentative ProjectAim (should have done this months ago!) - although I have just been told it looks more like a PHD proposal :) It may become simpler after Christmas when I see how much I manage to do before term starts...\n\nHave put the [[Outsourcing|Outsourcing.pdf]] up online...its a WIP at the moment though\n\nWritten up about half of towards type inference for javascript (Anderson). Suddenly remember why I like TypeInference and StructuralTyping - although my current (big!) ideas extend far beyond just StructuralTyping.
Generic ast visitor written, so I have the proper visitor pattern for any ast description :)\n\nDoing execution system / tests for the while language.\n\nAs part of the execution system I'm writing a little process manager thing...nice thing with Ruby (as opposed is you are actually allowed to call Thread.kill :) \so/ Right, well the process manager tests are written, time to actually implement the damn thing itself.\n\nAnd at 11:15 the thing is implemented. Jobs for tommorrow include writing an execution system for the While language, fixing the todo below, hooking said execution system into the gui and making it so the editor really is usable in the multiple child cases that I have so-far ignored.\n\nTODO:\non_save_as button in GUI
[[Software visualization|]]
Mmm, so the success rate of getting in at 9 during my two practice days was 0%. As the old New Labour slogan went "Things can only get better"!\n\nHave discussed some of my Rsub op-sem details with my second marker...and there are quite a few issues / suggestions that need fully sorting out before I can continue with avengence. The notion of blocks is quickly becoming the most important feature, and their interaction with local variables. I have a further meeting on wednesday (tommorrow), and need to provide by then some examples showing the behaviour I want...\n...Hopefully I'll put up on here soon some doc version of the Rsub stuff...\n\nEuugh, just written some unit tests for behaviour i was assuming in ruby and matching in my op-sems, and...\n{{{\n # This fails under ruby 1.9\n def testBlockArgumentShadowing\n x = 3\n b = lambda { |x| x = 4 }\n\n assert_equal(3,x)\n end\n\n # This fails under ruby 1.9\n def testBlockArgumentShadowing2\n x = 3\n b = lambda { |x| x = 4 }\n\n assert_equal(3,x)\n end\n\n # This fails under ruby 1.9\n def testBlockArgumentShadowing3\n x = 3\n b = lambda { |x| }\n\n assert_equal(3, x)\n end\n}}}\n\nthere are some noises on newsgroups about this behaviour changing under new versions of ruby...but...eugh. I can see some voodoo happening in any translation of Rsub->ruby that goes on. I really need block-local-variables.
Supervisor meeting re-scheduled to monday. Still working through the WalkerGuiTODOList yesterday and today.\n\nDiscoverd in vim that {{{:set noea}}} will turn off {{{equal-always}}} and make splitting behave like ratpoison splitting. Which is a good thing.\n\n17:12 -> 17:52 (40mins) \n Working on the size walker, next task; to take into account the layout_spacing\n\n18:22 -> 19:22 (1hr)\n Got in the layout spacing, chased around a bug to do with pointer equality :s\n One or two of the layout tests now pass...only half a dozen to go :)
Wee, a very poor ast-walking interpreter for the simple while language exists. Need to hook it into the GUI, but its simple tests pass at least. Actually trying to write the 'code' for these tests in the editor make it very clear how painful entry currently is. Have lots of ideas on how to improve it though, also have some other things to consider.\n\nRandom notes accumulating on my white-board:\n\n*Complete ast issues?\n**Nodes that accept multiple children are currently complete if they have 0/at least 1 complete child... should probably fix that\n*Need to be able to select arbitary nodes and insert and delete arbitarily, not just at the end of a list\n*Cmd line run\n*Cmd line load\n*Quick expression entry / parsing\n\nOh yeah, and of course not forgetting what this project is really about:\nRSub!!!\n\nYay! Have broken the 7k mark\n{{{\n>rake status\n(in /home/tora/project/fleece/code/simple)\n142 tests, 5152 assertions, 0 failures, 0 errors\n7002 LOC, 3192 tests, 3810 source.\n}}}
:| After 2 days of somehow avoiding doing any work and burying me a lot further behind than I want to be, I probably should make some effort to keep head near water.\n\nWorking through the unit tests for the GUI walker. Thought I may aswell keep track of how much work I am doing (motivation to make sure I am working). And for interest, what I'm listening to. Maybe I'll notice what music that makes me work well :).\n\n15:15 -> 15:26 (literal test now passes) (11 mins) [Dido - No Angel]\n15:26 -> 16:02 (n_children_test now passes) (36 mins) [Dido - No Angel]\n16:11 -> 17:03 staring at my 2-level-children layout test, wondering why it doesn't pass (52mins) [KT Tunstell]\n17:10 -> 17:21 2-level-children layout test passes.. (11 mins) [No music]\n17:45 -> 17:54 fixed hoz/vertical test, but broke the test_two_levels one. Gah. (9 mins) [Lion King]\n17:54 -> 17:59 fixed two_levels test. (5 mins). [Lion King]\n18:00 -> 18:09 the last of the ast-gui walker tests done. (9 mins) [Lion King]\n\nSo this big horrible section I've been dreading to do has taken a total of: 1hr 21 mins.\nWTF didn't I do this yesterday? Or the day before!?!?!\nRight next job. Unit tests for rendering from gui walker.\n\n18:15 -> 18:57 unit test for rendering module. (42 mins) [No Music]\n19:06 -> 19:21 unit test for rendering module passes (15mins) [Anastacia]\n19:21 -> 19:31 minimal integration of new rendering into the GUI. Looks promising (10 mins) [Anastacia]\n\n19:53 -> 20:07 GLUT now renders a single character in loosly the right area. Next up, get all text rendering correctly. (14mins) [No music]\n20:10 -> 20:26 A bit of magic and text now renders correctly at a decent scale. (16mins) [No music]\n\nWell stuff displays correctly, this is good, its progress, I'm happy. Next job? Well on the todo list I said camera, but to do that will require some notion of 'selected node/child'. (Which in turn will require some way of colour highlighting -> but I have that in the design of the callbacks). I also need a way of getting out of the guiastwalker a map of nodes/children -> locations. Also need some way to navigate around this mess programatically. Design phase next methinks\n\n{{{2,844 loc, 27 tests, 215 assertions, 1 failure.}}}
Bleugh, latex is a pain. At least we have spellchecking in vim nowadays :)
14:00 -> 14:19 (couple more tests written up for the view model).\n\nVim users, you must, must must get this plugin if you use tags. \n[[Tag list|]] I've had it installed for 2 seconds and it is sooo useful already. :)\n\n5 tests left to write for view model then to implement it. Lunch.\n\n/focus/\n15:28 -> 15:33 1 down, 5 to go [yes i just invented a new test]\n15:33 -> 15:34 2 down, 4 to go\n15:34 -> 15:44 3 down, 3 to go, and refactored out some common code.\n15:44 -> 15:46 4 down, 2 to go\n15:46 -> 15:51 all tests written. Time to start implementing.\n\n15:55 -> 16:20 Implemented a very simple keyword-arguments library for my project. I abuse ruby-meta programming way too much. At least I'm not using an eval keyword anywhere tho ;)\n\n16:25 -> 16:40\ncouple of tests pass\n{{{46 tests, 2784 assertions, 3 failures, 12 errors}}}\n\n
Lost this morning due to security alarms being fitted at home. Intermittent power cuts and loud ringing noises are not conducive to work.\n\nWorked out roughly which papers I'm going to include in my Background for the OutsourcingReport. Have 12 to write up in the coming days. 1/2 page to page each, so should be ok. A lot are background or inspiration, since most of what I'm wanting to do is fairly novel (well at least, I hope it is!). Plus I got an excuse to write a script to generate the skeletons of all these papers for me from the Bibtex. Yay.\n\nPlus will likely write up a section of theory from Pierce's books on DependantTypes. \n\nThen its just the requirements and evaluation to do. Joy.\n\nSat and watched the [[Subtextual]] demos. Updated since the last time I saw them. Very interesting.
Added the code to toggle child placeholders, started writing infrastructure to support arbitary config options.\n\nGot distracted by snow :(
Took the last 2 days off from actually doing project stuff. \n\nHave realised I probably should have some sections on relevant theory (DependantTypes and the difference between NominalTyping and StructuralTyping maybe? plus why StrongTyping is not StaticTyping etc.) in the OutsourcingReport.\n\nHave *got* to focus down and do some more work soon. Nearly got to the end of the type inference paper. Must must get on with work starting new years day. Not that long left before term starts up again!
In DoC.\n\n9:49 -> 10:01 ASTModelNotes\n\n@ Home\n17:28 -> 17:44 more ASTModelNotes - now have enough to start writing some tests.\n\nBeen thinking a little about some horrible passivly generated code sitting in my unit tests that could be re-done dynamically...if only I could get the name of method arguments dynamically to change these mock objects. A little like [[this|]]. Something to investigate next time I need a mock object.\n\nAlso set up the breakpoint library so I can use breakpoints to aid debugging in future if necessary.
PythonTypeInference could be important!
10:40 -> 12:15\nWriting a generic mock object class/utility, just because its going to like a splinter in the back of my mind driving me mad until I do. Yay for metaprogramming.\nPut it in and replaced what was a load of passive code generation, unit tests now accurately reflect the number of assertions made. Current standing:\n\n{{{2,793 loc, 36 tests, 2766 assertions, 1 failures, 9 errors}}}\n(yes the loc has gone down!)\n\nSpent a loose 10 mins @ DoC expanding the gui view tests a bit.
Mmmm, wasted a bit of this morning hacking around in vim. At least now if I type in a {{{ } }}} it will just skip over it if there is one to the right of it. Makes {{{ #{ } }}} interpolation easier in ruby strings.\n\n14:30 -> 15:57\nWorking on implementing the ast view model. Managing maps of nodes to their parents, and writing the goto_parent method.\n\n16:30 -> 17:30\nBit of refactoring, going to put a callback-helper method in {{{ASTNodeFactory}}}, but it needs some tests.\nNow have {{{goto_parent}}} working.\n{{{47 tests, 2847 assertions, 3 failures, 9 errors}}}\n\n17:30 - 17:31 {{{goto_node}}} passes.\n18:11 {{{47 tests, 3049 assertions, 2 failures, 5 errors}}}\n\n18:58 - Woohoo\n{{{49 tests, 3100 assertions, 1 failures, 0 errors}}}\n\nWasted 10 mins adding a status task to rake, since I seem to be printing them here so much,\n{{{\n>rake status\n(in /home/tora/project/fleece/code/simple)\n49 tests, 3100 assertions, 1 failures, 0 errors\n3417 LOC, 1625 tests, 1792 source.\n}}}\nMaybe there should be a unit test for that? ;)\n\nHooking in the view part of the model with the OpenGL world. Need some manner of key bindings\n\n21:38 Very simple key-bindings hooked up and I can see the opengl window changing colours in the right places. They key bindings are a bit sucky though, need to make them context sensitive (so I can keep hammering enter and it do the right thing!). Also should make them pluggable. Additionally, whats the GTK keybinding symbol for the enter key??? Can't find that yet, which is a bit of a pain. Lots to do tommorrow if I want an editable system.
Woo, I have a new computer chair! Possibly not something I can present to get marks for my project, but it may help getting work done...\n\nSo, back on with the configuration stuff I was doing in the GUI yesterday.\n\nMmm, interesting, there doesn't seem to be a notion of a sorted array in odd.\n\nSo I've done roughly 1 1/2 hours work and have config infrastructure in, time to hook into the gui.\nWoohoo, child-placeholders has a toggle. Its a lil hackey, but I'll prolly refactor as I add more visual config options.\n\nRight, onto the next thing on the GUITODOList -> node colour legend\nNode colour legend in (and now its ~ 8ish). Interestingly I've just discovered that I was generating twice as many colours as necessary in my colour wheel :S. Something the unit tests didn't quite pick up on, but should be fixed now. Ho hum.\n\nNext up, evening meal and then maybe labels on nodes.\n\nEugh, haven't finished writing all the additional tests, but adding test-side labels before implementing it gives you some fun with the error numbers. The two tests are written now, but a lot of stuff currently fails...\n{{{\n>rake status\n(in /home/tora/project/fleece/code/simple)\n111 tests, 291 assertions, 1 failures, 67 errors\n5485 LOC, 2560 tests, 2925 source.\n}}}
15:45 -> 16:00 Lil bit of faffing with the keyboard input for the view. Works tolerably now.\n\nNext task, observer pattern on the ast model.\n16:30 Observer pattern in.\n\nSpent some time adding the ability to get the list of viable factories out of the model and started some tests for creating new nodes on the model. Really having focusing/concentration problems. Think its due to a really messed up sleep cycle. Am crashing out now in the hopes of doing some work tommorrow morning.
Another day, another $ or so the saying goes.\n\nRight, time to update/fix up Rsub with the new style/notion of operational semantics...
@Doc managed to write up a few more tests for adding nodes to the ast via the ast model. Will implement the code for them soon and hook into the GUI.\n\nSpent some time writing parts of the ExecutiveSummary for my SecondMarkerMeeting on Wednesday. However am suffering coldy/flu symptoms, so will desist now and restart (early) tommorrow morning when I can think straight and am hopefully in less pain...
Time to crack on with this project, having spent a wonderful relaxing 2 days break with my girlfriend.\n\nOh on a side note, my code was used as the example on [[RubyQuiz|]], yay!\n\nGrr, made the mistake of accidentally denying rights for tiddlywiki to save itself, lost ages trying to dig out how to re-enable security privaleges that you press 'do not ask me about again' on. There is no gui for it!!! (look for prefs.js in your mozilla / firefox profile directory and hack that!)\n\nWritten up the 'end the cold war between dynamic and static typists' paper, though there's a few latex symbols I need to work out. \n\n(Discovered that productivity is massively boosted when on a laptop without an internet connection).\n\nWritten up 'On Dynamic Languages'. 2 down, 12 to go...and 2 other sections.\n\nAh, looks like the OutsourcingReport has just had an extension put on it. Yay.
So, unsurprisingly I've changed my mind on the example use case for this project. Here we go:\n\nannotator1) Expressions ending in new(c) or a closure can be given annotation\nof the class name or 'closure'\n\nann2) Local variables that are only assigned to once in a method can be\ninferred to be 'final'.\n\nann3) Final local variable assignments mean the local variable can take the\ntype of the expression assigned to it (if given)\n\nchecker1) Method calls that are made on a final local variable access where\nthe class is definatly known can be checked to ensure the method name\nexists for that class/closure\n\nann4) Method calls (outside of closures) made on a final argument to a\nmethod are definatly executed and therefore can be recorded as methods\nthe argument should support\n\nann5) If a final local variable has type closure, and it has a method\ncall of .call placed on it (i.e. that the closure is definately\nexecuted), then we can infer an annotation for the closure definately\nbeing executed\n\nann6) If a closure that is annotated definatley executed has inside calls made on a\nfinal method argument, then we know that those calls should be supported\nby the method argument as they will take place\n\nch2) If a method call is made passing an expression with known\nclass/closure annotation (from ann1 or ann3) to a reciever of known\nclass/closure annotation then if there are constraints on the argument\nto that method (from ann4/6) they can be checked\n\nThe user can always provide more information here, e.g If I know a closure\nwill always be executed, I can manually place the annotation on instead\nof ann5, and ann6 will use it regardless.\n\nAlso, some work-places may have a rule that all method arguments should\nbe final. So we can add a checker ch3) Check all method arguments have final on them\n\nThe contra to ann3) can also be given, allow the user to place final\nannotations on the tree and add another checker that checks there are no\nmore than 1 assignments to final variables.
Hmmm, just noticed I'd svn ignored the bibliography for my online Executive Summary...should put that back at some point really (hope there is a copy at home somewhere :s)\n\nSo, more work on Rsub. Have got the utility functions done. Think I have a lot of \sequiv where I mean ='s though, will need to sort that out. Next is the definition of well formed programs, stack and heaps. Then that may be the formalization done (and I could then actually move onto a type system! Finally!)
I hate illness. It makes me get up late.\n\nAt least a scratch ExecutiveSummary has now been written and sent off (and hopefully should be on here)!
Fixed a latex bug - a squiggly right arrow is \sleadsto (ams packages).\n\nStarted work on writing up [[Strongtalk]].\nGot bored, didn't make much progress.\n\nFound an interesting thread of stuff that should probably be read, though it looks mainly dynamically-typed rhetoric [[here|]]. Something to do when procrastinating perhaps :)\n\nJust discovered something cool, Matz for the next version of ruby is considering the vm to support optional type systems. Also ruby 2 will have keyword arguments (maybe) yay yay yay! More details [[here|]].\n\nStarted implementing a lambda-calculus interpreter in ruby. Just for tonight. I'm too tired to concentrate on anything really hard. Got it reducing a few things, though need to sort out bracketing precedence, and what it is I am and am not going to reduce... something for another lazy saturday methinks.
Loose hour in the lab...more work on Rsub.\n\nFixed up a few minor cosmetic things, as-well as a bug in which you could call any method on a closure and it would result on the closure's code being executed. I now have it s.t. the method 'call' will execute the closure, and everything else gives a NME. It does (however) break my notion of 'everything being an object'. While loops can still be done via a helper class, however:\n{{{\nclass While\n\n whileTrue |-> |b|\n ivar cond = b\n\n do |-> |b|\n (ivar cond).call(nil).ifTrue({ |r| \n; \n \n })\n\nend\n\n(new While).whileTrue( //condition// ).do( //code// )\n}}}\n\nBut now closures do not respond to ifTrue and ifFalse etc.\n\nI also am wondering how on earth you can write a meaningful conditional test...I don't have an equality comparison or anything like that in the semantics. How do you test if x != y..I suppose you have to build it into some form of class heirarcy or something...but eugh, its getting further and further removed from "the real world" :s...I guess this is why we have encapsulation etc.\n\nYay, so I have a definition for church numerals and zero? tests and can even do simple for loops in ruby style:\n{{{\nnew Succ.ctor(new Succ.ctor(new Succ.ctor(new Zero))).times { // do some code // }\n}}}\n(i.e.)\n{{{\n3.times { // do some code // }\n}}}
Right, well this is it. Realistically there is a touch over 3 weeks left to implement something, then 2 weeks to write up the little of whatever that I actually have implemented.\nThen I just need to talk about it for 30 minutes...\n\nApply pressure and sweat.\n\n\nRSub ast description and rather pretty icon in. Just discovered its very easy to pop-up menus in Gtk, so will probably re-write a bit of interface code to allow ast construction using the pop-up menus. Just need to establish first the whole interaction process.\n\nThe right hand bar will (instead of showing buttons) display what keys do what now. There will be popup menus for inputting values into a child, and promoting / converting a node to another node type (if compatible etc).
SecondMarkerMeeting today. It was useful, productive and helpful. It was also a kick to actually get on with this project.\n\nAnd thus a few more unit tests are written and made to pass for editing the AST. Do need to get onto bigger and more important things tho...soon.
Hint for latex/xdvi users, xdvi will take the option +xxx to show page xxx when it starts up. Saves a few seconds flicking through the whole document to find the bit thats just been added.\n\nStrongtalk done. Yipee.\n\nDiscovered I have more space (since I'll otherewise massively overflow) if I drop the latex font size to 10. Have sooo much to do this week. Hopefully the plan of being in uni with no(?) distractions should encourage the work out of me...\n\nRead through adding wildcards to java languages paper again. There's a lot of interesting stuff in it, just not sure how to make it, relevant?\n\nAlso been thinking up some ideas for my lambda calculus interpreter, more at [[SheepLambda]].
Revision is now the priority...some stuff may happen on this project while that is going on, but lets not hold breath.\n\nApparantly VB9 is integrating static and dynamic checking of assertions...\n[[VBasic|]]\n[[Linq|]]\n\nHmmm, just worked out there are 67 days till the report is due. According to the weblog so far, there have been 50 days where I've made entries into the system. Kinda interesting. Given that I feel like I'm less than half way through what I want to do on this project, I guess I need to kick the project up a gear...while also doing revision. Guess I should make a plan...\n\nMay be useful background for the final report:\n[[Nassi-Shneiderman Diagrams|]]\n\nFigured out how to use the Gtk::ComboBox class in ruby. This whole model-view-controller concept is quite interesting. Well now at least we can select the while language executor, next up, to actually run the thing :)
In university, well it is a new term after all.\nThe idea is I focus and concentrate in a quiet environment, and therefore get this very very boring OutsourcingReport finished. Lets see how this plan works, if at all. Its very lonley in here at the moment.\n\nGrr, no sodipodi installed @ DoC. Admitadly its a bit of a stupid dependency for my project, but still its necessary for that lovely sheep graphic to be used by latex.\nGrief, come into uni and discover that nothing works. The DoC install of ps2epsi has a couple of bugs, easily fixed though. At least I can now start focusing on some work...\n\nPretty much typed up wildcards. \n\nAm now wondering how much type-theoretic theory I should be including in my report...the wildcard paper references ExistentiallyQuantifiedTypes, VirtualTypes, DeclarationSiteVariance and UseSiteVariance. They're all pretty cool things, but am I going to use them? Should I describe them? Arrrgh!?\n\nHave decided to reshuffle my Outsourcing approach. At the moment I'm discussing a lot of random features, cool ideas etc. in my general sphere but should really be concentrating on the languages I want to focus on in the project and the relevant typing theory for them. Need some notes on [[AppropriateObjectOrientedTypeTheory]]\n\nFor Dan:
Church numerals? What was I thinking -> peano numbers.\n
So I need some way to build up a model of the current AST and manage possible future things like type -annotations and inserted casts on the tree as-well.\n\nSo features the model needs,\n*A navigation strategy\n**Currently selected Node\n**Currently selected Child\n*A Way of accessing current x,y (z)? co-ordinates for the currently selected item (and probably other nodes too) -> perhaps dice up the render walker into component parts for this. (Yay refactoring).\n**Way of extracting a description of the legal actions for the current node and applying that internally to the model\n**Some callback(s) for when the model has changed [to update rendering / node selection]\n**Reverse - give it x,y,(z) locate the appropriate node (for 'clicking on things'). [ Very optional ].\n\nNode selection / child selection should also hook into the colour section code(s). \n\nCamera\n*Current x,y,z target\n*Current x,y,z location\n*Zoom in/out using keyboard\n\nast_model \n*view_model (or navigation_model or something)\n**goto_parent\n**next_sibling\n**previous_sibling\n**select_children\n**next_child\n**previous_child\n**select_this_node\n**select_child_node\n**select_child_text\n\n*alteration_model\n**set_text etc. [todo]
<<option chkOpenInNewWindow>> Open links in new window\n<<option chkSaveEmptyTemplate>> Save empty template\n<<option chkToggleLinks>> Clicking on links to tiddlers that are already open causes them to close\n^^(override with Control or other modifier key)^^\n<<option chkHttpReadOnly>> Hide editing features when viewed over HTTP\n<<option chkForceMinorUpdate>> Treat edits as Minor changes by preserving date and time\n^^(override with Shift key when clicking 'done' or by pressing Ctrl-Shift-Enter^^
Important points to this project.\n\nPluggable. Undecidable. Highly precise if possible.\n\nTyping variables. (its a type system!) and what that does\n\nPrecise contracts. <- some reference to JML and other contract systems in there.\nDetermining side-effect free code?\n\nGenerics and variance. Strongtalk had it.\n\nExistential types <?>, recursive types, virtual types.\n\nCode reuse via inheritence? Subtype vs subclass. \n\nTyping asserting properties.
From Pierce's [[Types And Programming Languages|]] book (pg 462), dependant types systems are where you have //families of types indexed by terms//.\n\nThe most interesting bit is the //Dependant function types//, which take the form (|| is a pi until I sort out some greek on this wiki, T's are terms in the .\s sense) ||x:T~~1~~.T~~2~~\nThe term T~~2~~ can reference the x as standing for the parameter to the function this type is describing, and so you can express a dependency between the input and the output of a function.
See DependantType :)
The [[Department of Computing|]] at [[Imperial College|]], where I am currently a 4th year student.
A (bad) alternative name for StructuralTyping.
One of the original ideas for my project was to look at the ability to provide code completions in an IDE for dynamic, extensible languages like Ruby. None of the IDE's for Ruby I've seen can do such things well, though there appears to be tools that do similir things for more established languages (read Smalltalk). More links here as I find them...\n\n (from Rob via SLURP) - a rather nice looking smalltalk IDE.
Dynamic type checking of a program is where the type checking (or type enforcement) occurs as the program is running. Its dual is StaticTyping.\n\nAn example of a dynamically typed language would be [[Ruby]].
An ast node could be / have:\n\n(Also features of the ast node at the end)\n\n*whether it is the root / first node\n\n*A 'name' - the (unique) name of this node for this ast description. E.g 'ClassNode', 'MethodNode' 'StringLiteralNode'\n*A display name\n*An 'abstract' property, if this is a placeholder for something else (e.g. 'ExpressionNode')\n*A (set of) 'is a' properties. E.g 'MethodCallNode' is a 'ExpressionNode'\n*What contained nodes link off this one. E.g. a MethodCallNode would have receiver, methodname, arguments and a block\n**The links off this node can have some layout information associated with them to aid the presentation. \n***left-to-right (reciever then methodname then arguments )\n***top-to-bottom (the above then below that goes the block if specified) \n***arbitary nesting of the above\n**They can also have constraints on how many are available and how they are laid out\n***set (e.g. the ClassNodes in a Program are a set). Arbitary number, any layout\n***set+(minumum 1)\n***row (arbitary number, layout to the right)\n***row+ (as above, minimum 1)\n***column (as above, top-to-bottom)\n***column+ (ditto)\n***optional (1 or 0)\n***required (1, just 1, exactly 1 required)\n*String nodes for inputted information\n*Literal nodes?\n*A string 'title' property, that is displayed even if the node is collapsed (e.g. methodName or className)\n*Accessor to its parent node\n\nTODO\n*Whether the AST node is 'complete' (all its required children are there and all its children are complete).
Its too soon to be thinking about this yet, isn't it?
Welcome to my wiki/webpage for my Fleece Project.\n\nYou can read my ProjectAim here.\n\nThese pages should be updated as I work on my project and make notes and other brainstorms / ideas that cross my mind.\n\nIt will likely be a large mess, but something may be thought-provoking for someone.\n\nOh, and I'll likely also post my reports, software etc as links off here - so keep eyes peeled!\n\nEnjoy!\n\nTris
A never ending list of improvements to make to the GUI to do in spare moments, between //everything else// that I need to do...\n\nI'm now starting to prioritise this list, roughly-ish.\n\n*Save/load of ast instances\n*Allow a config file to override the default colours for node types\n**Put that into the legend so the user can select the colours for certain nodes\n*Config panel to alter lots of configuration options, with save/load ability...\n**All the visual parameters (padding, depth etc.)\n*Indexes for currently selected child in ast model\n*Expand all button on the legend\n*Multiple views on the same ast model\n*Possibly some kind of optimisation to allow display-lists being created for untouched parts of the tree\n*Cut/copy/pase\n**or even syntactic structures / shortcuts\n***macro expansion! :)\n*Make use of the collapse node functionality!\n\n*==Get rid of the noise from all the child placeholders if possible==\n**==add a toggle to turn the placeholders on and off==\n==*Have some form of legend or key to allow seeing what kinds of nodes have what colour==\n*==Allow some textual presentation of the types of nodes (so a LambdaAbstraction would have .\s on it or something)==\n**==Add to the ast description a "label" that is text that is rendered as part of the node's layout.==\n*==Visual indication when the OpenGL space has keyboard focus as opposed to the other space==\n**==Put something on the status bar perhaps? [not doing]== \n**==Or change the background colour?==\n*==After pressing enter on the text panel, focus goes back to the opengl gui==\n==*Try and figure out why the colour spread is so awful==\n==**It was a bug ;)==\n==*Choose which language you want to develop with==\n==**As part of this I should probably refactor a bit==
A paper by [[Cormac Flanagan|]] outlining / advocating a synthesis of dynamic and static type checking. In it types are precisely specified as boolean predicates, and SubtypingIsImplication.\n \nThe type checker / proof mechanism can either return (statically) yes, no or maybe? to a type check, and if maybe is returned then a 'cast' is insterted into the code. Of course, this cast isn't like a Java cast since we are checking predicates.\nAs a side thought, if casts are insterted the developer could be told where the casts have needed to be put, and then can make doubly-sure that that code path has adequate (unit) tests covering it.\n\nOne thing that is maintained in the paper is a phase difference, so that type checking is not performed at runtime; the successful execution of the casts succeeding is enough to witness the program was well-typed. \n\nHowever, for the precisely typed (DependantType ?) .\s-calculus (squint and it looks like a lambda ;)) variant shown they do need to retain in the code the 'type' of some of the terms for casting to take place. For straight expression casting ( a > b )c [grr, I need latex symbols in here!] you only need at runtime to check that c is of type b. \n\nFor application casting however, ( ( a -> b ) > ( c -> d ) )t the resulting code ends up with casts relating ( c > a ) and ( b > d ). By the above this means the code for a and d need keeping - i.e. the input argument and the output return type. Notice how you also get covariant returns and contravariant arguments...\n
Java (and its friends, C++, C# etc) have confused many people, which is annoying. Mainly because people accept now that a class is a type unilaterally.
[[Here|]] looks like a nice idea ;)
The languages the tool supports need to have several plug-in extensions available (eventually to include type systems). So things that will need to be detected could be:\n*The AST definition\n*An icon (would be nice ;))\n*Custom plug-ins for the language\n*Custom emitters \n**ways of turning the ast definition into something executable\n**and possibly running it aswell\n*Custom completion strategies for the text-editor box\n\nSo\n\n{{{\nASTDefinitions/\n while/\n while.rast <- language definition\n while.png <- icon\n emitters/\n ... TODO\n completions/\n .... TODO
!!Wiki Links\n[[Fleece Home|index.html]]\n[[ProjectAim]]\n[[ProjectMotivation]]\n\n[[TypingTerminology]]\n[[Screenshots]]\n\n!!Reports\n[[Outsourcing|Outsourcing.pdf]]\n[[Executive Summary|ExecSummary.pdf]]\n[[Final Report|Report.pdf]]\n\n!!Misc\n©[[Tristan Allwood|]] 2005, 2006\n\n[[IC DoC|]]\n\n[[RSS|index.xml]]\n\n<<newTiddler>>\n<<newJournal "DD MMM YYYY">>
The type system must be used and encountered.\n\nMost languages have mandatory typing, e.g. [[Java]], [[Ruby]], [[Haskell]].
In a manifest / (declarative?) type system, all the types must be explicitly declared (written by the programmer) for the type checker to validate them.\n\nFor example in [[Java]] you must declare the types of method parameters and variables. (There are some cases where TypeInference happens in [[Java]] for you).
There is no type system.\n\nThe untyped [[.\s-calculus]] is a no-typing system.
Each type is a name. In [[Java]] these would be the class or interface names. There is a subtyping relationship between names (in Java this is defined by the class heirarchy). While this is a good way of explicitly managing semantic and contractual 'types' and properties, it can become tiresome as all types must be named.
With an optional type system, using it is, ahem, optional. \n\nE.g using the generics extensions of [[Java]] 5 are optional.
One of the first reports that need to be done for this project. There's a link to the current version of mine on the left. Or if you don't want to move the mouse there, go [[here|Outsourcing.pdf]].\n\nThe basic premise is to tell someone else how to do your project should you not want to. Or to say what you think you may do maybe for your project.\n\nSpec can be found [[here|]].\n\nSubmission date was/is Monday, Jan 16th, 12:00.
TODO List for the report before its due:\n*==Finish up the Object Oriented section==\n**Add a diagram explaining classes and metaclasses [if time]\n**Add notes about the class library, using it, typing it?\n*==Do some evaluation==\n*==Put in a acknowledgments section==\n*==Do some more evaluation==\n*==Add more to Related work==\n**JavaCop and citations needed\n*==Do some more evaluation==\n*==Pad out specification a bit==\n*==Finish evaluation==\n*==Sort out the discussion section==\n*If time, discuss some typing ideas e.g. parametric polymorphism, dependant types etc.\n*Finish up, read through, spellcheck etc.\n**Make sure everything that should be in small caps is\n\nThings to make sure are mentioned early on:\n*Local code analysis only - ramifications\n**The ability to type libraries without them being present
Susan Eisenbach wrote:\n> tell me your plan of action\nIts mainly things I've said I should/would do a long time ago...but\nprioritiesd [and my hypothetical running order for a presentation]:\n\nSo far I have an application that lets you develop AST instances for\nlanguages, and the Rsub AST description in it.\n(pretty picture here:\n\n\nHowever I havn't (yet) done anything with types.\n\nRSub has 2 types of error it can throw, NoLocalVariableError (which is\nstatically decidable), and noMethodError (which is probably undecidable).\n\nTarget 1: Each AST node is to be associated with (type) attributes.\nAnnotations can be placed by the user, or by annotation inferencers.\n\nTarget 2: A local variable inferencer. Formally and code it in.\n\nTarget 3: A local variable type checker (which walks the AST and uses\n(possibly) just annotations to check if things are "valid" or not).\nWhich means a user could say that a local variable is on a node where it\nreally isn't.\n\nThen I want to look at creating separate type systems and\nbridging/enhancing them as more information becomes available.\n\nThe example case I'm aiming for is this:\n\nInstance variables are not pre-declared in this language, but you can\n(again statically) work out which methods assign (and maybe assign if\ninside a closure) and therefore declare instance variables.\n\nYou can (also statically) work out which methods use (and maybe use via\nclosures) instance variables.\n\nTarget 4: Infer the annotations for declaration and usages of instance\nvariables.\n\nWith this information, you can (to some degree) track a locally created\nvariable to see if all its method calls observe the ordering [assuming\nthere is one] for the assignments / usages.\n\nClosures are what gives the 'maybe' cases above, so if we can track to\nsee if a closure is definatly called we can add an annotation to say\n'Definatly Executed in this scope'\n\nFinally a bridging annotater can be made that looks for definatly\nassigned instance variables inside definatly called closures and\npropogates the annotation up to the method level. The type checker\nlooking for assignments before usages should then transparantly work.\n\n\nIf there is any time left over (assuming this is an acceptable plan), I\nwould spend it between souping up the type system, making the tool\nslightly more usable, and actually making the code execute.\n
The aim of this project is to explore pluggable type systems (ala Bracha) for dynamic programming languages. More specifically I want to focus on pluggable type inference algorithms for undecidable type systems, using ideas based on Flanagan's HybridTypeChecking to place casts in the code for unprovable type coercions.\n\nThe end deliverable for this project would be an application that allows the construction of the AST of a program, and then the application of (pluggable) type checking algorithms to the AST that can annote any node with any type information they require. These algorithms (some will be for type checking, others inferencing - although the user can manually place type annotations on the tree also so we are not limited to inferencing) will be to type check "specific" (DependantType ?) contracts in the program.\n\nThere will be a great number of different types of programs and type systems that could be explored with such a program; the focus would be a dynamic Object-Oriented language in a similar vein to Smalltalk / Ruby. Since the type systems would be pluggable, they can be worked up from simpe beginnings to (hopefully) supporting boolean predicates from the source language.
Software may need to be deployed in many different environments and may need to be provable to conform to different requirements. For example, a company may only want to deploy software that it can show has a certain property (perhaps doesn't use disk access).\n\nThe APIs that developers have to work against are often large and complicated with imprecise documentation or convention dictating their use. There is little help within existing tools for statically telling a developer they are incorrectly using a method.\n\nDevelopers spend much of their time thinking when working, during which time the computer is (generally) idle. These spare CPU cycles could be going to good use.\n\nProgramming languages develop, change and evolve and are now specified by their implementation as opposed to formal models or precise specification. This can cause problems or discrepencies for porting the language (as the [[JRuby]] and [[Jython]] developers have found). As such any type systems which may be used with the language may evolve making programs that once typed not type any more. Also problems in the type system require the 'whole language' to be redeployed, coupling the two together.\n
[[Python type inference general|]]\n\n[[Type inference thesis|]]
\nPicture of Rsub with {{{ifTrue ifFalse while}}} and number definitions in it. [[Click here | screenshots/14-05-06-rsub-1.png]]\n\nOk, so it isn't exactly user friendly at the moment, or particularly any good. But its a base that I can work on...\n\nFirst every inferred annotation: its that a method with a variable declared as 'x' has a local variable called 'x'. What a complicated science! [[Click here | screenshots/23-05-06-first-inferred-annotation.png]]\n\nAnd now we can typecheck and see that a local variable isn't declared: [[Click here| screenshots/25-05-06-first-type-error.png]]
[[Homepage|]]\n\nPossibly for the next version / vm Matz is considering allowing the vm (called Rite) to support optional type systems. More details [[here|]].
I'll occassionally update this 'tiddler' with links to screenshots of my program in progress.\n\n*SimpleWhileLanguageExamples\n\n*RediculousRsubExamples
Mandatory review of project progress with the second marker. Took place 8th Feb '06.
So, for the first milestone of my project I want to do a couple of (hopefully fairly trivial) pluggable type systems for a [[.\s-calculus]] variant I'm calling SheepLambda.\n\nI don't want it to be too complicated, but I want to support (in the runtime) aliasing terms to names (think ML let x = y in z ), and also have 'builtin' functions that can do more interesting things to the runtime ast. (E.g. print it out, store/return variables).\n\nIf I make the runtime so only the left most .\s-abstraction can ever be reduced I make things simpler; expression chaining can still be done as described by Pierce (will need to re-read that and write it up) and I can use built-in functions to create side effects etc.\n\nWhen I have an implementation that works reliably and does most of what I want, I'll put it up with code test results as example programs etc.
My first screenshot of the application: [[click here|screenshots/21-02-06-simple_while_example.png]]. The entire ast was built from scratch in the tool.\n\nIts 'code' equivalent would be: (its not supposed to do anything intelligent as I don't have a while language interpreter, though I suppose I could dump it to ruby...)\n{{{\nif not true\n then\n while true\n skip\n else\n x = 45\ny = 33\nskip\nz = 22 * y\n}}}\n\n\nSecond screenshot of the application, I've added a legend, and the background changes colour when it doesn't have focus - [[click here|screenshots/17-03-06-bigger_while_example.png]]. Again ast built from scratch in the tool. Code isn't meant to make sense, but would translate to:\n{{{\nif true\n then\n x = 33\n while x < 50\n x = x + 1\n y = x + 20\n if y < x\n while y < x\n y = y + x\n else\n skip\n else\n while false\n skip\n skip\n skip\n skip\n}}}\n\n\nPretty eh?
Tristan Allwood's 4th year individual project
Random thoughts that should be in my specificaton for the OutsourcingReport\n\n!!Easy\n* Ability to type check simply typed lambda-calculus with some form of dependant type-predicate type system ala Flanagan's HybridTypeChecking\n\n\n!!Hard\n* Ability to type check full ruby syntax with all the extension features available\n\n!!Interesting\n*Type checking eval strings\n*Type checking strings (or string concats) that actually build up another language.\n**XML in Ruby\n**HTML in XSLT (//perhaps a bit of a sidetrack?//)
Static type checking of a program is where the type checking (or type enforcement) occurs in a phase that is before the actual runtime of the program (usually compile time). Its dual is DynamicTyping.\n\nAn example of a totally statically typed language would be [[Haskell]]\n\n[[Java]] is often (mis)cited as a statically typed language. It has some static typing, and some dynamic typing. For example variable assignment is statically type checked. However you can dynamically coerce types using casts. The generics features in [[Java]] 5, although are checked statically leave the dynamic casts in so they are checked at runtime also.
Strongly typed languages cannot have the type system subverted or broken out of with unpredictable behaviour. Its dual is WeakTyping.\n\nThere are many examples of strongly typed languages, [[Java]] is one, as is [[Ruby]] and [[Haskell]]. \n[[C]] and [[C++]] are not.
Optional type system retrofitted onto [[Smalltalk]]. Eventually ended up being the inspiration for the jvm at some level. More from [[here|]].
Structure, as in the structure of objects or instances. Not to be confused with NominalTyping.\n\nFor dynamic languages, if you want to check that method-calls are appropriate, structural typing is a lot better than nominal typing. With structural typing you 'just' check that a method with the correct signature exists on the object. Sometimes called DuckTyping, though I'm being convinced this is a bad name for it.\n\nIf you assume a structural type is a set of method declarations, and a method declaration is a set of names with associated arguments types and return type given. (Remove overloading so the names are all unique). Then a subtype is another set of method declarations where all the methods declared in the first set have an appropriate equivalences in the second. By appropriate I allow covariant returns and contravariant arguments.\n\nThere is a slight problem in that semantically different objects can be interchanged if they (co-incidentally) have the same methods with the same signatures. Though how often in reality does this cause a problem? :)
/*\n{{{\n*/\n\nbody {\n background: white;\n font-size: 9pt;\n font-family: verdana,arial,helvetica;\n padding: 0em 0em 0em 0em;\nmargin: 0em 0em 0em 0em;\n z-index: 0;\nposition: relative;\ntext-align: center;\n}\n\na:link, a:visited {\n text-decoration: none;\n}\n\na:hover, a:active {\n text-decoration: none;\n}\n\n#contentFooter {\nbackground-color: #FFF;\nposition: float;\n}\n\n#contentWrapper {\nwidth: 920px;\nmargin: auto;\ntext-align: left;\nbackground-color: #FFFFFF;\npadding: 10px;\n}\n\n\n#header {\nbackground-color: #C9DCB2;\npadding: 0px;\n}\n\n#titleLine {\n background-color: #C9DCB2;\nbackground: url('sheep.png') no-repeat left;\n padding: 5em 1em 1em 1em;\n height: 100px;\ntext-align:right;\nvertical-align:bottom;\n}\n\n#titleLine a {\n color: #CCFF66;\n}\n\n#siteTitle {\n font-size: 26pt;\n}\n\n#siteSubtitle {\n padding-left: 1em;\n font-size: 10pt;\n}\n\n#mainMenu {\n position: absolute;\n left: 10px;\n float: left;\n width: 10em;\n line-height: 166%;\n background:white;\n padding: 1.5em 0.5em 0.5em 0.5em;\n font-size: 10pt;\n color: black;\n text-align: right;\n}\n\n#mainMenu .tiddlyLink {\n color: #aec650;\n}\n\n#mainMenu .tiddlyLink:hover {\n background-color: #B1DCEF;\n}\n\n#mainMenu .externalLink {\n color: #996633;\n text-decoration: underline;\n}\n\n#mainMenu .externalLink:hover {\n background-color: #B1DCEF;\n}\n\n#mainMenu .button {\n color: #C1D399;\n margin: 0em 0.25em 0em 0.25em;\n padding: 0em 0.25em 0em 0.25em;\n background-color: #FFF;\n border-right: 1px solid #999;\n border-bottom: 1px solid #999;\n}\n\n#mainMenu .button:hover {\n color: #FFFFFF;\n background-color: #C1D399;\n}\n\n\n#displayArea {\n margin: 1em 17em 0em 14em;\n}\n\n#tiddlerDisplay {\n}\n\n#messageArea {\n background-color: #EC7230;\n color: #ffffff;\n padding: 0.5em 0.5em 0.5em 0.5em;\n display: none;\n}\n\n#messageArea a:link, #messageArea a:visited {\n display: inline;\n text-decoration: underline;\n color: #FFF;\n}\n\n#messageArea a:hover {\n color: #333;\n}\n\n#messageArea a:active {\n color: #ffffff;\n}\n\n#popup {\n display: none;\n position: absolute;\n font-size: 8pt;\n color: #999;\n background-color: #EEE;\n padding: 0.25em 0.25em 0.25em 0.25em;\n border-right: 1px solid #330000;\n border-bottom: 1px solid #330000;\n z-index: 10;\nfilter:alpha(opacity=50);\n-moz-opacity:0.5;\nopacity: 0.5;\n}\n\n#popup a {\n display: block;\n color: #333;\n line-height: 100%;\n}\n\n#popup a:hover {\n background-color: #FFF;\n color: #330000;\n}\n\n#popup hr {\n border-top: solid 1px #666;\n border-left: none;\n border-right: none;\n border-bottom: none;\n height: 1px;\n color: #666;\n}\n\n.tabset {\n padding: 1em 0em 0em 0.5em;\n}\n\ {\n margin: 0em 0em 0em 0.25em;\n padding: 2px 2px 2px 2px;\n} \n\n.tabSelected {\n background-color: #333333;\n}\n\n.tabUnselected {\n background-color: #999999;\n}\n\ {\n}\n\ {\n}\n\n.tabContents {\n padding: 2px;\n background-color: #333333;\n}\n\n.tiddler {\n padding: 1em 1em 0em 1em;\n font-size: 9pt;\n}\n\n.selectedTiddler {\nborder: 1px solid #EEE;\nmargin: 5px;\n}\n\n.unselectedTiddler {\nborder: 1px solid #EEE;\nmargin: 5px;\n}\n\n.tiddler .tiddlyLinkExisting {\n font-weight: bold;\n}\n\n.tiddler .tiddlyLinkNonExisting {\n font-style: italic;\n}\n\n.tiddler .externalLink {\n text-decoration: underline;\n}\n\n.tiddler .button {\n padding: 0.2em 0.4em 0.2em 0.4em;\n color: #AAAAAA;\n}\n\n.tiddler .button:hover {\n text-decoration: none;\n color: #999999;\n background-color: #DAEEF7;\n}\n\n.tiddler .button:active {\n color: #ffffff;\n background-color: #C1D399;\n}\n\n.title {\n font-size: 10pt;\n color: #666;\n font-weight: bold;\npadding-left:5px;\n}\n\n.selectedTiddler .title {\n font-size: 10pt;\n color: #333;\n font-weight: bold;\n}\n\n.toolbar {\n text-align: right;\n font-weight: normal;\n font-size: 8pt;\n padding: 0em 0em 0em 2em;\n color: #aaaaaa;\n visibility: hidden;\n}\n\n.toolbar #popup {\n text-align: left;\n}\n\n.selectedTiddler .toolbar {\n visibility: visible;\n}\n\n.footer {\n font-weight: normal;\n font-size: 8pt;\n margin: 0.5em 0em 0em 0em;\n padding: 0em 0em 0em 0em;\n color: #dddddd;\n}\n\n.selectedTiddler .footer {\n color: #888888;\n}\n\n.body {\n padding-top: 0.5em;\n}\n\n.viewer {\n color: #000000;\n line-height: 15px;\n padding: 8px 8px 8px 8px;\n}\n\n.viewer a:link, .body a:visited {\n text-decoration: none;\n color: #C1D399;\n}\n\n.viewer a:hover {\n color: #ffffff;\n background-color: #B1DCEF;\n text-decoration: none;\n}\n\n.viewer .button {\n margin: 0em 0.25em 0em 0.25em;\n padding: 0em 0.25em 0em 0.25em;\n color: #999;\n background-color: #FFF;\n border-right: 1px solid #999;\n border-bottom: 1px solid #999;\n}\n\n.viewer .button:hover {\n background-color: #C1D399;\n color: #FFF;\n}\n\n.viewer blockquote {\n font-size: 8pt;\n line-height: 150%;\n border-left: 3px solid #666666;\n padding-left: 0.8em;\n margin-left: 2.5em;\n}\n\n.viewer ul {\n margin-left: 0.5em;\n padding-left: 1.5em;\n}\n\n.viewer ol {\n margin-left: 0.5em;\n padding-left: 1.5em;\n}\n\n.viewer h1,h2,h3,h4,h5 {\n font-weight: bold;\n text-decoration: none;\nborder-bottom: dashed 1px #d6d6d6;\nbackground-color: #FFF;\n}\n\n.viewer h1 {\n font-size: 12pt;\n}\n\n.viewer h2 {\n font-size: 10pt;\n}\n\n.viewer h3 {\n font-size: 10pt;\n}\n\n.viewer h4 {\n font-size: 9pt;\n}\n\n.viewer h5 {\n font-size: 8pt;\n}\n\n.viewer table {\n border-collapse: collapse;\n border: 2px solid #303030;\n margin-left: 1.0em;\n margin-right: 1.0em;\n margin-top: 0.8em;\n margin-bottom: 0.8em;\n font-size: 100%;\n}\n\n.viewer th {\n background-color: #999966;\n border: 1px solid #606060;\n color: #ffffff;\n padding: 3px;\n}\n\n.viewer td, tr {\n border: 1px solid #606060;\n padding: 3px;\n}\n\n.viewer caption {\n padding: 3px;\n}\n\n.viewer pre, .viewer code {\n font-size: 100%;\n line-height: 1.4em;\n color: #660000;\n}\n\n.viewer hr {\n border-top: dashed 1px #606060;\n border-left: none;\n border-right: none;\n border-bottom: none;\n height: 1px;\n color: #666666;\n}\n\n.highlight, .marked {\n color: #000000;\n background-color: #ffe72f;\n}\n\n.editor {\n font-size: 8pt;\n color: #402C74;\n font-weight: normal;\n}\n\n.editor input {\n display: block;\n border: 1px solid black;\n width: 100%;\n}\n\n.editor textarea {\n display: block;\n font: inherit;\n border: 1px solid black;\n width: 100%;\n}\n\n.editorFooter {\n padding: 0.25em 0em 0.25em 0em;\n font-size: 8pt;\n color: #aaaaaa;\n}\n\n.editorFooter A {\n padding: 0.2em 0.4em 0.2em 0.4em;\n color: #993300;\n}\n\n.editorFooter A:hover {\n text-decoration: none;\n color: #ccff66;\n background-color: #993300;\n}\n\n.editorFooter A:active {\n color: #ffffff;\n background-color: #cc9900;\n}\n\n#sidebar {\n float: right;\n width: 16em;\n color: #000000;\n font-size: 8pt;\npostion: absolute;\n}\n\n#sidebarOptions {\n padding-top: 0.5em;\nmargin-top:10px;\nmargin-right: 10px;\n background-color: #F1EFEB;\n}\n\n#sidebarOptions .button {\n color: #999;\n padding: 0.3em 0.2em 0.3em 1em;\n display: block;\n}\n\n#sidebarOptions .button:hover {\n color: #999;\n background-color: #B1DCEF;\n}\n\n#sidebarOptions .button:active {\n color: #CFC9BC;\n background-color: #EEE;\n}\n\n#sidebarOptions input {\n margin: 0.4em 0em 0.3em 1em;\n}\n\n#sidebarOptions .sliderPanel {\n padding: 0.5em 0.5em 0.5em 0.5em;\n font-size: 7pt;\n background-color: #FFF;\n}\n\n#sidebarOptions .sliderPanel A {\n color: #6999C9;\n font-weight: bold;\n}\n\n#sidebarOptions .sliderPanel A:hover {\n color: #C1D399;\n background-color: #FFF;\n}\n\n#sidebarOptions .sliderPanel A:active {\n color: #333;\n background-color: #FFF;\n}\n\n#sidebarOptions .sliderPanel input {\n margin: 0em 0em 0.3em 0em;\n}\n\n.sidebarSubHeading {\n font-size: 7pt;\n color: #330000;\n}\n\n#sidebarTabs {\n background-color: #fff;\nmargin-right:2px;\n}\n\n#sidebarTabs .tabSelected {\n color: #999;\n background-color: #ECF8FD;\n position: relative;\n top: -1px;\n}\n\n#sidebarTabs .tabUnselected {\n color: #999;\n background-color: #F5F5F5;\n}\n\n#sidebarTabs .tabContents {\n background-color: #ECF8FD;\nmargin-right: 10px;\n}\n\n#sidebarTabs .txtMoreTab .tabSelected {\n background-color: #F5F5F5;\n}\n\n#sidebarTabs .txtMoreTab .tabUnselected {\n background-color: #ECF8FD;\n}\n\n#sidebarTabs .txtMoreTab .tabContents {\n background-color: #F5F5F5;\n}\n\n#sidebarTabs .tabContents .tiddlyLink {\n color: #6999C9;\n}\n\n#sidebarTabs .tabContents .tiddlyLink:hover {\n background-color: #ECF8FD;\n color: #330000;\n}\n\n#sidebarTabs .tabContents .button {\n color: #6999C9;\n padding: 0em 0em 0em 0em;\n display: inline;\n}\n\n#sidebarTabs .tabContents .button:hover {\n color: #999;\n background-color: #ECF8FD;\n}\n\n#licensePanel {\n padding: 0.5em 0em 0.5em 0em;\n}\n\n#licensePanel A {\n display: block;\n padding: 0.2em 0.2em 0.2em 0.2em;\n color: #993300;\n}\n\n#licensePanel A:hover {\n text-decoration: none;\n color: #ccff66;\n background-color: #993300;\n}\n\n#licensePanel A:active {\n color: #993300;\n background-color: #ccff66;\n}\n\n#storeArea, #copyright {\n display: none;\n}\n\n.sparkline {\n background-color: #eeeeaa;\n border: none;\n line-height: 100%;\n}\n\n.sparktick {\n background-color: #993300;\n outline: 0;\n}\n\n.errorNoSuchMacro {\n color: #ffff00;\n background-color: #ff0000;\n}\n\n.zoomer {\n font-size: 10pt;\n display: none;\n color: #000000;\n position: absolute;\n padding: 1em 1em 1em 1em;\n border: 1px solid #000000;\n}\n\n#saveTest {\n display: none;\n}\n\n@media print {\n\n#mainMenu, #sidebar, #messageArea {\n display: none ! important;\n}\n\n#displayArea {\n margin: 1em 1em 0em 1em;\n}\n\n}10px\n\n}}}
I've just re-read HybridTypeChecking (before I write it up tommorrow for the OutsourcingReport), and have started thinking about random directions I could take this project in. It would be nice to actually get an implementation going of the DependantType system (or a variation thereof) that is presented in the paper as part of the project.\n\nOne of the things that most interests me is how types become boolean predicates, and then subtyping becomes (essentially) implication between predicates. \n\nFor some reason I keep drifting into a logic train of thought where is a predicate could be thought of a conjunction of n predicates p1 & ... & pn, then a subtype would be a be a conjunction of p~~1~~ & ... & p~~n~~ & p~~n+1~~. (Or alternatively you could think in terms of disjunction where the sub-type would be p~~1~~ V ... V p~~n-1~~). I suppose this is just one optimisation / pattern amongst many that a theorm prover could/would use when doing the static type checking.
Enable / disable annotators\nThe TODO's in the code r.e. what nodes get re-annotated and checked after a deletion.\n\nOperator annotors (persisting them across changes?) Saving them generally!\n\nDo I need to wipe all annotations from parents of an updated node? *What is my semantic???*
Extend the Rsub syntax with an _ or bullet or something symbol that stands for "unknown" or not present perhaps, then slightly altered typing rules can take into account a total absence of ast?\n\nAnnotations can only be added by annotators, never taken away, so annotations must specify a property that certainly holds. The lack of an annotation does not mean that the property does not hold.
Instead of you telling the computer what you mean, get the computer to work out during all those spare cycles when you're thinking of other things - or at least work out what it can.\n\nThere are lots of different extremes to type inference. In Haskell you don't have to specify the types and they can be inferred for you (though you can specify more specific types if you want). In Java there is (some) type inference for parameterised types on methods. In ruby you don't really have type inference as you don't have a static type system.
Since I've seen so much confusion / argument about this on mailing lists and generally on the internet, I need for my project to explicitly state what I mean when I say:\n\n*StaticTyping\n*DynamicTyping\n - These refer to //when// the type checking happens\n\n*StrongTyping\n*WeakTyping\n - These refer to //if// the type system guarantees things\n\n*StructuralTyping\n*NominalTyping\n - These (and possibly others) refer to //what// determines the subtype relationship\n\n*ManifestTyping\n*TypeInference\n - These (and possibly others) refer to //how// the types are declared\n\n*OptionalTyping\n*MandatoryTyping\n*NoTyping\n - These refer to //whether// there even is a type system\n\nHope thats cleared that up now!
!!TODO priority\n*Generic AST Walker\n**==Test== (16:29 25/01)\n**==Implement== (17:54 25/01)\n*Layout AST Walker (2-walk phase design, one for sizes, one for render callbacks)\n**==Test== (13:58 26/01)\n**==Implement==\n*Hook walker into GUI\n**==Unit test render in GUI==\n**==Implement==\n*Camera for GUI\n**Test (somehow)\n**Implement\n*Add a way of creating new nodes in the GUI.\n*Put a screenshot up on this site\n\n!!Secondary TODO list\n*Saving / loading of trees\n*Write an emitter walker to turn a general ast into html/xhtml\n*Write the specific ast walker test / ast walker\n*Write an emitter to turn sheep-lambda ast into sheep-lambda, or something similar
Weakly typed languages allow the type system to be subverted or broken out of with undefined behaviour being the result.\n\nAn example of a weakly typed language would be [[C]] (or [[C++]]). Any arbitary integer can be treated as a pointer to a function, and dereferencing then calling it will result in undefined behaviour (depending on compiler, architecture example).\n\nE.g. this c code:\n\n{{{\nint main(char ** s)\n{\n int num = 0;\n int (*fun)() = (int(*)()) ((&num)-8);\n (fun)();\n return 0;\n}\n}}}\n\nWill give a {{{Segmentation fault}}} on some machines, or an {{{IllegalInstruction}}} or may just work. Its totally undefined.\nThe weak typing is shown in the cast not being checked or verified, the static type system has just assumed it will be ok and doesn't validate it at runtime.
1 triangle per line, co-ords are\nx1 z1 y1 x2 z2 y2 x3 z3 y3\n\nWonder if I can script blender -> raw output?