Showing posts with label compiler. Show all posts
Showing posts with label compiler. Show all posts

Tuesday, November 13, 2012

Conversations About Direct recombination

I was talking to Simon today about direct combination. I said i had had a great idea and adventure game with direct combinations as the user interface. This was a relief as I already thought of one for doing statistics program . The conversation drifted onto How to rethink the object paradigm.

I think I might succinctly put it all together in one diagram.
Where two types have some overlap (in methods or instance variables) then this is when we have a super class. 

Friday, December 9, 2011

more thoughts about programming

I've come across the programming lanauge for text based adventure games at 
http://inform7.com/learn/man/doc61.html


Basically they wanted a language which was english like and able to handle cool amounts of inferanceing. I described it to a college as vernacular programming. Look the kinds of constructs they give. 


A dead end is either secret or ordinary.


This creates just one new property, not two. The names are taken as the two states of a single either/or property: secret means not ordinary, ordinary means not secret


A dead end is usually secret. A room is usually indoors.


A property can be used by several kinds at once. For example, the built-in either/or property "open" is used by both doors and containers, even though door isn't a kind of container and container isn't a kind of door.


Wow imagine if you had this in a typical programming languages or 



The lightest and easiest way to change behavior is with an Instead rule:


Instead of eating the apple: 
    say "It turns out to be made of beeswax, so that's a non-starter."
Instead of tasting an edible thing: 
    say "It's delicious!" 
    rule succeeds.

So basically this is like intercepting a message and redefining it ( but outside the comfort of a class). 

I'm not sure how much good software engineering there is here but that doesn't matter. What matters is how provocative this is in programming terms and I'm very provoked. 


Monday, November 16, 2009

Curiosu new language of the day

It's called Go from google.

Compiled, odd notion of classes but most intreastingly of all appears to have multiple returns. I'm glad to see the return of truely compiled languages.

Thursday, December 13, 2007

Flock

had an idea of a new programming language over lunch.

Flock

In flock everything is a graph.
So
A = 5 ;

assigns a graph with one node ( with value 5 ) to the Flock called A.

A graph consists of nodes + (weighted)edges.

A node can be an atom ( int,float,string,char..) or another graph as a 'value' or label.

A flock can have a disjoint (unconnected) graph.

Naturally everything can be represented with a graph of one sort or another. For example
A = 'map.gig'.loadAsImage();
makes a gridded graph with each A node being a pixel and the links are the way to get from one adjacent pixel to another.

alternatively a linked list is a linear graph. A hash table is a graph.

In Flock method can be assigned to
a) A Node
b) an edge
b) The entire flock ( single message shared over all instances)

Flock methods can be used to implement parallel programming by using a special method to call the method from the flock in parrell.

A large flock may be distributed invisibly across a number of computers. Hence a message may be transmitted from one sheep/link to another down an edge and actually be transmitting over the network.

Wednesday, August 8, 2007

sightings in the mists of the sea of ghosts

Its been a strange turn of events. I was speaking to Bashar and explained why a computer programmer was so passionately interested in developing user interfaces. I think he got it when I said that it was the development of the first graphical user interfaces that helped drive the development of the first object orientated languages.

I was recording a podcast yesterday when afterwards richardwalker and simon got on to the subject of annotations in Java. He also talked about all the code that a good GUI builder adds to let you simply add code into you objects.

I just had a odd thought. If I started with a blank sheet of paper and wrote down what I wanted in a simple graphical user interface could I think of a way of creating the facilities for a languages that would make the description that small.

Naturally for me I want the interface to say four things.
1. What the interface 'looks like'
2. What the interface does
3. The text for the user explaining what the interface is (help file/user guide).
4. The text for the programmer explaining what the user interface is doing ( programming documentation like java doc.)

I feel like Admiral Hopper (inventing cobol)

Saturday, July 14, 2007

Netbeans plugins

If I was a plugin writing kind of person I would write two plugins ( or doclet).

1. A documentation plug in that would have a stronger narrative element ( that is a starting point). this would complement the kind of documentation you get a moment but add to it.

1. Starting point
@purpose ?
2. tutorial ( hyperlinked code examples)
3. examples ( more code + hyper links )

At the moment I love java doc but the resultant documentation is usless for getting started.

The second plug in would be part of the bug tracking system.
@bug ID [ message ]
would attached a bug from the bug tracking system via document hyperlink. when a bug is fixed then it can
be part of documentation/code base

@TODO anyone ?

Friday, April 6, 2007

Ambient compiler

There was some thought about how to improve the teaching of programming at the OU. I had an odd thought.

Why not have a 'compiler' on line? that is your code is stored on the server and then you access the code from a text box on a web form. One of the form buttons is 'compile' which does some ajaxy magic which then sends the text back to the server where the text is compiled. The error messages are then stuffed back into the html code. When the user clicks 'run' the code is executed on the server and the result is piped back to the output a new window on the client.

Ok why do this? The problem is how to automatically evaluate the work of students. I suspect most people think about how to take the 'product' ( final source code) and mark it ( together with supporting info). This requires trying to understand the process from the source (alone). That process is one which requires someone experianced not only in the lanaguage but java and process I belive that would be impossible to automate. The degree of success of this depends on how much you belive in automatic teaching.

Well if you have the code on the server then you get a stream on log files that indicate who the code evolved. the problem is to find out if the code genuinly the result of the pupil or the result of some creative 'cutting and pasteing'. As such providing the code matches the desired output then if the production process appears normal then the pedigogical results must be achived.
http://try.flex.org/ example of one line compiler of a flex language.
http://nirvana.informatik.uni-halle.de/~thuering/php/latex-online/latex.php Online LaTex compiler.
Online java upload based compiler

i like the idea of a website where the documentation and compiler text box are surrounded by other useful links ( chat room?). not perfet for hard core coders but good as a beginner space.