LtU Forum

Duck typing vs Structural Subtyping

I ran into structural subtyping [vs nominal] this summer with Cannasee's Motion-Types description. While talking to somebody about a joke ["Genetic code is dynamically typed and favors the "duck typing" philosophy. This creates an enormous amount of security holes, where special ducks ("poisons") with appropriate appearance but malicious behaviour could be introduced into the system."], we realized we didn't know the precise difference between the two terms. Duck typing seems to have a dynamic connotation, where as structural subtyping is one of the gems of the static ocaml world. A google search actually hit the LtU forums with someone hinting at subclassing vs subtyping.

I have a couple of ugrad years left and would like to know this one before I'm out :) Thoughts?

- Leo

Can anyone help me solve this Sudoku?

I received this Sudoku url from a friend. He says he's solved it up to here, but he's stuck:

http://www.freesudokuhost.com/showsudokuhosting.php?id=20051224213001997

I'm unable to move ahead either. I asked my friends, but no one is able to help.

I'm fairly good with Sudokus, and so is my friend who sent this to me. All I need is just the next step. I can (hopefully) solve it from there.

Thanks,

Elizabeth Daniel.

Back to Basic

I thought some of you might be able to enjoy themselves playing around with this in the coming vacation. It's a basic interpreter written in javascript, and thus runs in the browser.

There is also a ruby interpreter written for the browser, which can be found here

Well .. that's all folks,
Merry christmas and a happy new year to all of you

Understanding the Dynamic Nature of a Program

What is the latest thinking on how to deal with the fact that the dynamic nature of a program can be so terribly different from the static source code representation? Surely, we want to be able to better represent the dynamism of our systems for many reasons, not the least of which is debugging.

(Miscellaneous, random, uneducated sampling follows) There are various systems for examing the trace of dynamic systems or debugging anything, which are all useful work. Can we go further? How about a system that lets me understand dynamism from the start of development, through the creation of linear source code, and on to debugging. Maybe visual programming can help (or does it fall victim to the old adage, "now they have two problems")? Visula takes a swing by giving a 2D view of time and data. Maybe the best we can do is use models to try to force us to understand our own systems and avoid getting into bad places.

Hasn't this issue been around since folks invented computers? What approaches arleady exist? What does/n't work? What is tenable in the near future, perhaps?

[Newbie] Where can I learn about VM / C interfacing?

Hi all,
I worked through EOPL (1st edition) and consequently can write interpreters/(simple) byte code virtual machines for simple languages.

Now I'd like to learn how to interface these interpreters/vms to libraries written in C. Most scripting languages seem to have some kind of FFI and I am eager to learn how to interface my (admittedly toy) languages to existing libraries.

Can anyone point me at books/papers etc that deal with this aspect?

Is it necessary for the interpreter/vm to be written in C to interface with a library written in C? (If this is a dumb question, please do not hesitate to correct me. I am very much a newbie).

Any pointers to something that tells me "How to interface an interpreter/VM with C libraries" (or something that comes close) is greatly appreciated.

Ideally someone has written a book that deals with these aspects but *any* pointers are fine! I am totally flummoxed.

Thanks in advance,
Ravi

The Behavior of Behavior

Does anyone have a copy of this somewhere? I'd appreciate it if you can email me a copy.

Revisiting AWK

I was dusting off my old copy of "The AWK Programming Language" by Aho, Weinberger and Kernighan (IMHO, one of the best programming books ever written) and decided to see what was being done with AWK these days.

A very interesting networking extension has been added to gawk called Gawkinet. What is particularly interesting is how they managed to add networking capabilities to the language by introducing one new operator "|&" and treating network addresses like files. Leading to examples like:

     
BEGIN {
       "/inet/tcp/0/localhost/daytime" |& getline
       print $0
       close("/inet/tcp/0/localhost/daytime")
     }

Interesting...

Virtual machine implementation and dynamic languages

I'm looking for references to virtual machine implementations and dynamic languages.

I seem to recall something recently about what the Java VM lacks wrt dynamic languages and what other implementations (Parrot?) do that enable dynamic languages.

What would a Universal VM look like? Is such a thing possible?

I'm not googling the right keywords, I'm not finding what I'm looking for.

Countering Trusting Trust through Diverse Double-Compiling

Here is a very interesting article addressing a well known compiler problem.

Date: Mon, 12 Dec 2005 17:03:54 -0500
From: David A. Wheeler 
To: bugtraq@securityfocus.com
Subject: Countering Trusting Trust through Diverse Double-Compiling

Everyone here should be familiar with Ken Thompson's famous
"Reflections on Trusting Trust." If not, see:
 http://www.acm.org/classics/sep95/
The "trusting trust" attack subverts the compiler binary;
if attacker succeeds, you're doomed. Well, til now.

I've written a paper on an approach to counter this attack. See:
 "Countering Trusting Trust through Diverse Double-Compiling"
 http://www.acsa-admin.org/2005/abstracts/47.html

Here's the abstract:
"An Air Force evaluation of Multics, and Ken Thompson's famous Turing award
lecture "Reflections on Trusting Trust," showed that compilers can be subverted
to insert malicious Trojan horses into critical software, including themselves.
If this attack goes undetected, even complete analysis of a system's source code
will not find the malicious code that is running, and methods for detecting this
particular attack are not widely known. This paper describes a practical
technique, termed diverse double-compiling (DDC),
that detects this attack and some unintended compiler defects as well.
Simply recompile the purported source code twice: once with a second (trusted)
compiler, and again using the result of the first compilation.
If the result is bit-for-bit identical with the untrusted
binary, then the source code accurately represents the binary.
This technique has been mentioned informally, but its issues and
ramifications have not been identified or discussed in a
peer-reviewed work, nor has a public demonstration been made.
This paper describes the technique, justifies it, describes how
to overcome practical challenges, and demonstrates it."

I think you'll find this interesting.

--- David A. Wheeler

The Smalltalk Report 1991-1996

For 1996 there's a link to each of the pdf files and there's a pdf index for the earlier issues 1991-1995


afaict we must play with the URL to reach the pdf file, so '91 issue 1

SMAL0101.PDF
and '92 issue 3 will be SMAL0203.PDF

XML feed