LtU Forum

Referentially Transparent Scheme

What features from R5RS would have to be removed if one wanted a referentially transparent scheme?

In Lisp In Small Pieces, Christian states that assignment, side-effects, and continuations break referential transparency. So I would assume that one would have to remove any destructive operators such as set!, set-car!, set-cdr!, as well as removing call/cc.

I also thought that defining global variables (via define) would be removed though I would imagine if you dropped the availability of set! the use of define in the global context would not be much of an issue.

Am I looking at this the right way? Are there other things that have side-effects in Scheme that I am not aware of? Is there more information on this topic that I can look and learn more?

Best regards,

MJ Stahl

GAWK (GNU AWK) for AI?

I've been doing a lot of (g)awk lately and recently stumbled upon an interesting little paper called GAWK for AI?.

This resonates with my recent experiences/revelations regarding how feature impoverished languages (like gawk) can often help you focus more on the domain and task at hand.

Pi-calculus and mobile system books

Am looking at books on process calculii, and am wondering what is thought of the following:

* Milner's Communicating and Mobile Systems: The Pi-Calculus
* Sangiorgi and Walker's The Pi-Calculus: A Theory of Mobile Processes
* Fokkink's Introduction to Process Algebra

All three are at Powell's; unfortunately, all three are currently only stocked in their warehouse in town. I prefer not to ask them to transfer a book to their retail outlets, unless there's a good chance I might purchase it--so any recommendations on which one(s) I should investigate first?

I already have Hoare's Communicating Sequential Processes, so no need to recommend that (though I recommend it to others who are interested).

New for Python 2.5

"What's New in Python 2.5"

Of interest are:

If the Python crew is adding partial application to the language, I'm curious why they wouldn't have gone the whole hog and added in partial evaulation.

Implicit Behavioral Subtyping

I have posted a draft of an article about implicit behavioral subtyping in the Heron programming language at http://www.artima.com/weblogs/viewpost.jsp?thread=144349. I believe it to be original research, but I still have many more papers to plow through. I was wondering if anyone could help me out. That includes pointing out mistakes, or similar research which should be mentioned. Thanks a lot!

What is considered source code?

I have seem many posts about technology that lets you change the behavior of a program with changing the code. They claim that changes to production environments can be made as easily as changing a config file. Many times these config files hold import details like database queries.

My question is, what is considered source code?

Obviously, anything written in a programming language and compiled is source code. But what about non-compiled code?

Are SQL statements considered source code? What if they are in a config file?

Should the database structure be considered "source code"? What about the stored procedures it contains?

How about a config file that makes minor changes the way the program works? For example, using a different factory class based on a flag.

What if the changes are major? For example, one that injects code in the fashion used in Aspect Oriented Programming.

This is important because, in the real world, all changes to source code need to be documented and tested.

Towards the best collection traversal interface

This has been discussed before on LtU, but I don't think you can add new messages to threads in the "classic" section. I came across this presentation while I was contemplating ways to generalise a SAX-style interface to a parser I was writing and realised that I'd practically written a fold already. The API proposal is excellent and I think would make a good fit for some collections I've been thinking of writing for Tcl (I'd adapt the fold to be able to optionally make use of Tcl's event loop for doing traversals in the background, and use Tcl's break/continue/error exceptions rather than an explicit continue/don't continue indicator in the result). However, I thought I'd just check to see whether there is any new research on this that I should be aware of. Also, I'm struggling somewhat with the Haskell code demonstrating the enumeration->cursor transform without call/cc. Specifically, I'm wondering if it would be possible to translate the example into a language like Tcl which is strict and has relatively weak support for functional programming techniques? I think I could probably get my head around the Haskell enough to try and make a cheap+dirty imperative version, but any ideas on good ways to go about it would be useful.

Functional libraries for Java

Over the past few months I have collected a few links for Java functional libraries (I haven't actually used any of them yet in any major project). Thought it might interest people here:


http://www.cs.chalmers.se/~bringert/hoj/ programmer (includes Java 5.0 generics support). Little documentation.


http://jakarta.apache.org/commons/sandbox/functor/ doesn't look like it is maintained, doesn't support generics. Little documentation.


http://devnet.developerpipeline.com/documents/s=9851/q=1/ddj0511i/0511i.html
library.


http://functionalj.sourceforge.net

http://www.functologic.com/orbital/

http://jga.sourceforge.net/ programming in java (includes generics). Looking forward to more documentation, perhaps better organization of the API.




Java 5.0 also has an interesting interface (same as Oz, AliceML?):
java.util.concurrent.Future with the following description:

"A Future represents the result of an asynchronous computation. Methods are provided to check if the computation is complete, to wait for its completion, and to retrieve the result of the computation"


I read one rumor (on theserverside.com...can't find it any more) that Java 7.0 will have something like C#'s delegates.


There was another comment from Javalobby.org about simulating continuation using a new library in Java 5.0 (I believe from java.util.concurrent.*)...can't find that either.



Googling for "functional c#" brings up some blog enteries where people show how to do functional style programming in C#. ACM has a couple of papers on functional programming in Java/C#, I'm trying to find those again.

Next Neko Features ?

Hello,

Neko is an intermediate high-level dynamicly typed programming language. It has been designed to provide a common runtime for several different languages (dynamicly as well as staticly typed).

Some people were interested in Neko evolution, so I'm posting here the new features that are part of the just-released 1.2 version (see http://nekovm.org) :

  • runtime exceptions : several operations that were returning "null" before are now raising an exception. This is the case for invalid function calls (not a function or invalid number of arguments), object field access (for example null.x) , array access (still null if outside of bounds) and numerical operations.
  • linker : using "nekoc -link" you can now link a lot of .n bytecode files together into a single standalone .n file
  • nekoboot : this utility enable you to create standalone executables from a single bytecode file
  • renaming : the neko virtual machine is now named "neko" (instead of nekovm) and both neko and nekoml compilers are named "nekoc" and "nekoml". Compilers are built using nekoboot and are then standalon executables (this is more easy to use, simply "nekoc myfile.neko").
  • TCO : tail recursion optimizations in Neko
  • Object Prototypes : object can now have chained prototype (see Language Reference Documentation)
  • standard library : added UTF8 support, improved XML parser, and other useful primitives as well
  • licence change : Neko 1.2 is now LGPL while Neko 1.1 was GPL

I would like to get feeback from people that are interested in Neko. What are the features that are missing in Neko for you to target it ? Is there something in the design/other that prevent you from using Neko ? I'll work on next release to fix theses points if any.

Currently there is continuations on my TODO list.

New language for kids: Scratch - Logo meets Squeak Smalltalk?

I had first heard of Scratch as being a candidate for MIT's $100 laptopfor the third world. It appears to be a mind-meld of Squeak Smalltalk (the implementation language), Microworld Logo and the Lego Mindstorm's visual programming environment.

Here is an early paper on the language and here is the (even earlier) proposal.

XML feed