User loginNavigation |
LtU ForumWhat is a state?Here are two versions of the factorial function written in Lisp (MuLisp). (DEFUN FACTORIAL (N) and an imperative version, (DEFUN FACTORIAL (N M) The imperative version has two mutable states N and M. The way I look at it, the recursive version has a mutable state N. Is there any argument for saying that the recursive version has no state, or no mutable state? Fogotten Book TitleFor a "concepts of programming languages" class back in school I found a book in the library that helped very nicely--but I've since forgotten the title and author! It had a pelican J.J. Audubon-style on the cover, and had, I believe, "semantics" in the title. The author was, I believe, from Iowa St. Anyone know what book this is? Duck Typing advocated where?I used to think, (way, way, back), that Duck Typing was for dynamically typed languages. Involvement in developing the wikipedia page showed my naïveté, but I am left thinking "is duck typing advocated in languages other than the dynamic ones"? I know that Boo has the specific duck as a type so thats one, any others? An Accidental Simula User, Luca CardelliAn Accidental Simula User (pdf slides) (abstract) Newspeak, an experimental language in the style of Smalltalk
Declarative AssemblerDeclarative Assembler. Christopher Kumar Anand, Jacques Carette, Wolfram Kahl, Cale Gibbard, Ryan Lortie. SQRL Technical Report #20, 2004.
I think this paper is a nice followup to the recent discussion of SPE because it goes further than that paper by analyzing what data are necessary to achieve the ultimate goal of optimal or near-optimal instruction scheduling on superscalar architectures. In other words, it strongly suggests that we can do better than simply embedding low-level instructions in a high-level language by instead embedding a graph of desired results (vertices) and instructions for reaching them (edges) which can be analyzed to exploit cache-coherency, pipelining tricks, instruction-level parallelism, etc, or which could be supplied to an external scheduling algorithm based on some entirely different paradigm. Thread-safe Singleton in C#This has two parts. Please read first part first and think and then read second part. 1 public class SingletonClass 2 { 3 private SingletonClass () { Constructor (); } 4 static SingletonClass instance; 5 public static SingletonClass Instance 6 { 7 get 8 { 9 lock (typeof (SingletonClass)) 10 { 11 if (instance == null) 12 instance = new SingletonClass (); 13 lock (instance) 14 { 15 return instance; 16 } 17 } 18 } 19 } 20 void Constructor () { } 21 } -------------------------------------------------------------------------------- + Second part: 1 public class SingletonClass 2 { 3 public static object Hey_IAmStillUsingThisInstance_Lock = new object (); 4 private SingletonClass () { Constructor (); } 5 static SingletonClass instance; 6 public static SingletonClass Instance 7 { 8 get 9 { 10 lock (typeof (SingletonClass)) 11 { 12 if (instance == null) 13 instance = new SingletonClass (); 14 lock (instance) 15 { 16 return instance; 17 } 18 } 19 } 20 } 21 void Constructor () { } 22 public void DoSomthing () { } 23 } 100 static void Main(string[] args) 101 { 102 lock (SingletonClass.Hey_IAmStillUsingThisInstance_Lock) 103 { 104 SingletonClass.Instance.DoSomthing (); 105 } 106 } This filth is shared memory. >:( Nu - new LISP like language atop of Objective-CAt the recent C4[1] conference, Tim Burks announced a new language he designed, called Nu. He says the following about it:
Tim says that he started out from an effort to bridge Ruby to Objective-C, but the myriad of impedance mismatches led him to develop a new language that he can use instead of Ruby atop of Objective-C:
Earlier in the introduction he says:
A question on free variable capture.I've been studying the lambda calculus by reading the available texts found doing your basic google search. A question has come up that I have not found a sufficient answer to. When doing variable substitution in an application ((E1 E2)) it is fairly straight forward if E2 is a variable. When E2 is something more complex, like an abstraction, how do things work with regards to alpha conversion? Do you first find all the free variables in E2, then rename those that exist free in E1? Or since E2 isn't a variable do not do an alpha conversion stage? Anyone out there too familiar with lambda calculus, I'd appreciate a little assist. -Chris Tools for (PhD) Researching(Sorry that this is a bit off-topic...) I'm not talking about programming tools. Instead, I need something to organize my research progress. I learnt the hard way while I was doing my Masters that when I didn't keep track of my ideas and progress on a day-to-day basis, the task of thesis-writing became almost undoable at a later stage. That convinces me I need some "tool" to build the core of my thesis on a day-to-day basis. I can be on a very wrong track, but what I currently have in mind is a personal wiki (e.g. based on Mediawiki) which allows me to have rich cross-referencing of ideas. Come to think about it, i think what i need are: - a place to keep a journal Any suggestions? |
Browse archives
Active forum topics |
Recent comments
8 weeks 4 days ago
8 weeks 5 days ago
8 weeks 5 days ago
8 weeks 6 days ago
9 weeks 2 days ago
9 weeks 2 days ago
9 weeks 3 days ago
9 weeks 4 days ago
9 weeks 4 days ago
9 weeks 4 days ago