LtU Forum

Good parallel algorithms books?

I'm interested in learning more about parallel algorithms and data structures (since it looks like they're going to become more and more important), and I have access to a decent university library. Does anybody have some favorite books or papers I might read?

As usual on LtU, I'm also interested in how programming languages can make parallel programming faster, more scalable, and/or easier. So if you have some cool programming languages oriented toward parallel stuff, I'd love to hear of them so I can have a look.

Terminology: Thunking vs Quoting

In Cat the construction of a nullary constant generating function (e.g. a thunk) is done using the "quote" operator. It pops a value off the stack, and pushes a nullary function onto the stack. In other words the quote operation has the type: ('a -> ( -> 'a))

I could have called the operation "thunk", but I find the term discordant (a purely subjective opinion). I wonder if there are other associations with the term "quote" which suggest maybe I would be better off if I called the operation "thunk"? Perhaps there is a better term?

Any suggestions would be appreciated.

Defining Types not as Classes but as Mathematical Sets

Hi, long time browser, first time posting.

My background is largely in the C family of languages (specifically C, Java, and C#) but I've been reading into dynamic languages and it got me thinking about the advantages of dynamic type systems and bringing some of their advantages into the static world without sacrificing the bonuses static typing brings. An idea popped into my head when I asked what if an object's type and an object's class were different things and variables only refered to the former and were ignorant of the latter? Furthermore what if you viewed a type as a mathematical set of methods defining one method as equal to another method when their names and signatures are the same?

For example, in such a system the following Java code wouldn't result in an error.


public class A { // Implicitly defines Type A { int op1(int) }
 public int op1(int arg1) { return arg1; }
}

public class B { // Implicitly defines Type B { int op1(int), int op2(int) }
 public int op1(int arg1) { return arg1 + 1; }
 public int op2(int arg1) { return arg1 + 5; }
}

public class C {
 public static void main() {
  A a = new B(); // Not an error since Type A is a [proper] subset of Type B
  System.out.println(a.op1(2));
 }
}

Essentially you get dynamic type membership and static type capabilities.

So I'm pondering:
Does this lose any of the benefits of static type checking? Does this introduce any complications that would prevent a compiler or interpreter from being created? And finally is it dynamic enough?

Putting functional database theory into practice: NixOS

NixOS is a Linux distribution based on Nix, a purely functional package management system. NixOS is an experiment to see if we can build an operating system in which software packages, configuration files, boot scripts and the like are all managaed in a purely functional way, that is, they are all built by deterministic functions and they never change after they have been built. Such an operating system should have all the nice characteristics that the Nix package manager has.

An excellent example of how useful functional databases can be when applied to problems which require persistence.

Expect New Major Language Within Five Years

An eWeek article reports that "A group of software gurus gathered at TheServerSide Java Symposium to discuss the future of programming, saying we should expect to see more dynamic languages and possibly a new major language in the next five years." Some predictions mentioned:

  • "More scripting languages added to the JVM" - Eugene Ciurana, enterprise architect at Walmart.com
  • "More in the way of language experimentation" - Ted Neward, founder of Neward & Associates
  • "In languages I hope we get to something that has a message-based paradigm." - Adrian Colyer, CTO of Interface21.
  • "I think we're five years from the next big language—to be where Java is today" - Gil Tene, CTO of Azul Systems.

The authors of the next big language better hurry up and release it!

I find it interesting to see this degree of receptivity to new languages within a single language community, i.e. at a Java conference. Are attitudes towards new languages changing, perhaps because there's more awareness of alternative approaches these days?

LALR grammar of C++

Recently i had a look on Roskind's C++ grammar. It is used by Yacc to generate parser for C++. But in gcc and even in eclipse CDT's parser these people havent used parser generated by Yacc. I tried to find out why LALR grammar of C++ is not a popular choice for these tools. Somewhere I read that it is difficult to build the symbol table with LALR parsing of C++. Is it correct? why it is so?

Type Directed Concurrency

Type Directed Concurrency by Deepak Garg and Frank Pfenning (2005)

Abstract. We introduce a novel way to integrate functional and concurrent programming based on intuitionistic linear logic. The functional core arises from interpreting proof reduction as computation. The concurrent core arises from interpreting proof search as computation. The two are tightly integrated via a monad that permits both sides to share the same logical meaning for the linear connectives while preserving their different computational paradigms. For example, concurrent computation synthesizes proofs which can be evaluated as functional programs. We illustrate our design with some small examples, including an encoding of the pi-calculus.

This paper doesn't seem to even have been mentioned on LtU before. Frank Pfenning is one of the computer scientists I watch and this is related to LolliMon and CLF which I find quite interesting. The language that results is very LolliMon/CLF-esque.

Mapping language style to ancillary issues?

It would be of interest to me to see a codification of the impact language style has on ancillary tools. For example, I want my IDE to show me wherever a given variable is used. You can try to do that with just textual searches, but if the language allows runtime aliasing then you are presumably going to have a more difficult time of statically generating the relevant information about variable use. Or, you are going to have to restrict the breadth of information generated. (IntelliJ actually does do something along these lines for Java, although I suspect it doesn't follow aliasing chains?)

I'd guess that language styles are more-or-less amenable to particular such issue. I guess I see this as a way of guiding myself and others towards understanding another angle on why e.g. functional programming matters, or mutable state is evil, etc.

Functions shouldn't be lists, functions should be cast to lists

In Joy, and other similar dynamic languages, values can be evaluated like functions that simply yield themselves. This means that any list can be treated as a function. While elegant, this has several drawbacks:

  • compilation requires an extra indirection step (consider how integers and instructions that place integers on the stack are represented differently in most machine code)
  • it is easy to construct ill-typed functions by concatenating lists
  • you lose referential transparency

I've gone into more detail in this article on my web-site.

As a result of these issues I've decided to differentiate functions from lists of functions in the Cat type system. In order to reclaim some of the elegance of Joy (e.g. using functions and lists interchangeably) I've decided to use implicit function to list casts.

As a general rule I feel implicit conversions are evil, but I think the elegance gained is worth it in this circumstance, because instead of writing:

[1 2 3] list [4 5] list cat

I can now simply write:

[1 2 3] [4 5] cat

This is hopefully a useful insight (if it isn't too obvious) to anyone looking at the relationship between dynamically typed and statically typed languages.

Any thoughts? Am I stating the obvious? Or is this in fact a useful observation? Are there any forseeable problems with the approach?

Have to spell out Standard ML from now on...

The Service Modeling Language (SML) provides a rich set of constructs for creating models of complex IT services and systems. These models typically include information about configuration, deployment, monitoring, policy, health, capacity planning, target operating range, service level agreements, and so on. Models provide value in several important ways.

1. Models focus on capturing all invariant aspects of a service/system that must be maintained for the service/system to be functional.

2. Models are units of communication and collaboration between designers, implementers, operators, and users; and can easily be shared, tracked, and revision controlled. This is important because complex services are often built and maintained by a variety of people playing different roles.

3. Models drive modularity, re-use, and standardization. Most real-world complex services and systems are composed of sufficiently complex parts. Re-use and standardization of services/systems and their parts is a key factor in reducing overall production and operation cost and in increasing reliability.

4. Models represent a powerful mechanism for validating changes before applying the changes to a service/system. Also, when changes happen in a running service/system, they can be validated against the intended state described in the model. The actual service/system and its model together enable a self-healing service/system – the ultimate objective. Models of a service/system must necessarily stay decoupled from the live service/system to create the control loop

5. Models enable increased automation of management tasks. Automation facilities exposed by the majority of IT services/systems today could be driven by software – not people – for reliable initial realization of a service/system as well as for ongoing lifecycle management.

XML feed