Domain: chalmers.se
Stories and comments across the archive that link to chalmers.se.
Stories · 29
-
Why Is "Design by Contract" Not More Popular?
Coryoth writes "Design by Contract, writing pre- and post-conditions on functions, seemed like straightforward common sense to me. Such conditions, in the form of executable code, not only provide more exacting API documentation, but also provide a test harness. Having easy to write unit tests, that are automatically integrated into the inheritance hierarchy in OO languages, 'just made sense'. However, despite being available (to varying degrees of completeness) for many languages other than Eiffel, including Java, C++, Perl, Python, Ruby, Ada, and even Haskell and Ocaml, the concept has never gained significant traction, particularly in comparison to unit testing frameworks (which DbC complements nicely), and hype like 'Extreme Programming'. So why did Design by Contract fail to take off?" -
Humanoid Robot HR-2
Denix writes "The HR-2 humanoid robot was constructed during a period of three months at Chalmers University in Sweden. It has 22 degrees of freedom which enables it to easily move around imitating human motions. The robot is also equipped with stereovision giving it possibilities to perform hand-eye coordination. For that task an artificial neural network is evolved. Furthermore, the artificial brain is capable of tracking faces as well as recognising them. The HR-2 is also able to speak. The website also contains a movie (35.5 MB) of the HR-2 in action." -
Humanoid Robot HR-2
Denix writes "The HR-2 humanoid robot was constructed during a period of three months at Chalmers University in Sweden. It has 22 degrees of freedom which enables it to easily move around imitating human motions. The robot is also equipped with stereovision giving it possibilities to perform hand-eye coordination. For that task an artificial neural network is evolved. Furthermore, the artificial brain is capable of tracking faces as well as recognising them. The HR-2 is also able to speak. The website also contains a movie (35.5 MB) of the HR-2 in action." -
Free DVD Recording Tool For Linux?
jobsagoodun writes " cdrecord-ProDVD is OK for burning DVDs but (i) it grumbles pointlessly about device names and (ii) it has a weird binary-only license that expires every six months or so. There are some Free forks off cdrtools - dvd+rw/+r/-r ,dvdrtools and this patch - do any of them make a good replacement?" -
Searching for the Best Scripting Language
prostoalex writes "Folks at the Scriptometer conducted a practical survey of which scripting language is the best. While question like that is bound to generate flamewars between the usual Perl vs PHP, Python vs Perl, VBScript vs everything crowds, the Scriptometer survey is practical: if I have to write a script, I have to write it fast, it has to be small (less typing), it should allow me to either debug itself via a debugger or just verbose output mode. sh, Perl and Ruby won the competition, and with the difference of 1-2 points they were essentially tied for first place. Smalltalk, tcc, C# and Java are the last ones, with Java being completely unusable in scripting environment (part of that could be the fact that neither Java nor C# are scripting languages). See the 'Hello world' examples and the smallest code examples. Interesting that ICFP contests lately pronounced OCaml as the winner for rapid development." -
Get Ready for For The 7th ICFP Programming Contest
nate writes "Convinced your favorite programming language provides unbeatable productivity? Convinced you and your friends are world-class programmers? If so, we're providing you the opportunity to prove it! We are pleased to announce the 7th ICFP Programming Contest to be held in conjunction with ICFP 2004. All programmers are invited to enter the contest, either individually or in teams; we especially encourage students to enter. You may use any programming language (or combination of languages) to show your skill." Read on below for the details."On Friday, 4 June at 12:00 Noon (EDT), we will publish a challenge task on the Web site and by e-mail to the contest mailing list. Teams will have 72 hours until Monday, 7 June 12:00 Noon (EDT) to implement a program to perform this task and submit it to the contest judges. We have designed the contest for direct, head-to-head comparison of language technology and programming skill. We have a range of prizes including cash awards and, of course, unlimited bragging rights for the winners.
Previous contests included: 2003, 2002, 2001, 2000, 1999 and 1998."
-
Purely Functional Data Structures
andrew cooke writes "A while ago I read the comments following a Slashdot book review. Someone had posted a request for books that covered a wider range of languages than Java, C, Python, etc. Well, I thought, why not review Okasaki's Purely Functional Data Structures? It's a classic from the underworld of functional programming - recognised as the standard reference, yet clear enough to work as an introduction to the subject for anyone with a basic functional programming background. Of course, some readers won't know what functional programming is, or what is special about pure data structures. So I hope that this review can also serve as something of an introduction to the languages that I (a software engineer paid to work with Java, C, Python, etc) choose to use in my spare time, just for the joy of coding." Read on for the rest; even if you're not planning to give up C or Perl, there are links here worth exploring. Purely Functional Data Structures author Chris Okasaki pages 220 publisher Cambridge University Press rating 8/10 reviewer Andrew Cooke ISBN 0521663504 summary Functional programming for grown-ups.In Okasaki's introduction he says that the "[...] benefits of functional languages are well known, but still the vast majority of programs are written in imperative languages such as C. This apparent contradiction is easily explained by the fact that functional languages have historically been slower than their more traditional cousins, but this gap is narrowing."
Indeed, OCaml has a reputation for being "as fast as C," yet it contains automatic memory management and supports object-oriented, as well as functional, programming. It's also probably the most widely used functional language outside academia (except perhaps Lisp/Scheme).
I mention OCaml not just because it's fast, free and popular, but because Okasaki uses a related language - ML - in his book. The ML family of languages are the standard strict, functional languages (Standard ML of New Jersey is perhaps the reference implementation but see also standardml.org). Okasaki also includes an appendix with examples in Haskell, which is the standard lazy functional language.
The difference between lazy and strict languages is the order in which code is evaluated. Most languages are strict. Unlike most languages, Haskell only evaluates something when it is absolutely necessary. Each parameter to a function, for example, is passed as a "thunk" of code, not a value. If the value is not required inside the function, the parameter is left unused; if it is required (say as part of a result that needs to be displayed) then the thunk is evaluated. This evaluation may trigger a whole slew of evaluations of functions that "should" have been called earlier (from a Java programmer's point of view).
Laziness is both good and bad. The bad side is obvious: the order in which code is executed my be very different from the order in which the program was written and some serious book-keeping is necessary in the compiler to juggle the thunks of code and their final values. The reordering of code could cause mayhem for IO operations, for example (in practice, of course, Haskell includes a solution to this problem).
The good side is that laziness can help make programs more efficient and, while the definition of ML doesn't include laziness, individual ML implementations -- including OCaml and SML/NJ -- include it as an extra.
Much of Purely Functional Data Structures (the second of three parts) focuses on how to use laziness to make data structures efficient. Lazy evaluation allows book-keeping actions to be postponed, for example, so that the cost of maintaining the data structure in an efficient form can be averaged across several read/write operations (improving worst case limits - avoiding a very slow response if the data happen to be in a "bad" order).
An understanding of how the efficiency of algorithms is rated (the big-O notation) is one piece of knowledge that this book does assume, along with a basic grasp of what Stacks, Queues, Trees, etc, are.
This lazy boost in efficiency is needed because, even though functional languages may be getting faster, it's not always possible for them to implement the efficient algorithms used in imperative (non-functional) programming.
But I'm getting ahead of myself, because I haven't described what a functional language is, or why it is useful. These are the topics of the first part of the book, which explains how functional languages, which make it impossible to change variable values by direct assignment, support persistent data structures. This section is fairly brief, and while it's a good refresher course for someone who's not had to worry about such things since studying at university, it's not sufficient as an initial introduction to functional programming in general.
There's a good explanation of functional programming in the Wikipedia, but, in all honesty, I don't see how anyone can really "get it" without writing functional code (just as I, at least, couldn't understand how OOP worked until I wrote code that used objects).
So forgive me for not telling you why functional programming is good (This paper is one famous attempt), but perhaps a better question to focus on is "Why should you spend the time to investigate this?" The best answer I can give is that it leads to a whole new way of thinking about programming. Describing functional programming as "excluding assignment to variables" doesn't do justice to the consequences of such a profound change (one I found almost unimaginable - how can you program without loop counters, for example?).
There's a practical side to all this too - learning new ways of thinking about programs makes you a better programmer. This ties in closely with the final part of Okasaki's book, which explores a few fairly esoteric approaches to data structures. Who would have thought that you can design data structures that parallel the way in which you represent numbers? Some of this is pretty heavy going - I can't say I understood it all, but I'm taking this book with me on holiday (it's slim - just over 200 pages) and I'll be bending my brain around some of the points in the last few chapters as I lie in the sun (here in the southern hemisphere it's late summer).
So just who would benefit from this book? It seems to me that it's most valuable as a second book on functional programming. There are a bunch of texts (and online guides) that can get you started in functional programming. This one goes further. It shows how to exploit the features of functional languages to solve real problems in applied computing. Admittedly, they are problems that have already been solved in imperative languages, but you might find that you, too, come to enjoy those famous benefits of functional languages. The algorithms in this book let you enjoy those benefits without paying the price of inefficiency.
Andrew Cooke last reviewed for Slashdot The Aardvark is Ready for War . You can purchase Purely Functional Data Structures from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page. -
ICFP 2003 Programming Contest Results
An anonymous reader writes "The previously reported ICFP Contest has been over for quite some time. The results were announced on August 26, 2003 at the conference in Uppsala, Sweden, yet the contest organizers have yet to publish results. Despite the forgetfulness of the organizers, it is known that this year C++ did well, taking first and second, but not judge's prize. Interestingly, a one-man team consisting of an undergraduate student took first place, followed by a team of highly ranked 'red' TopCoders, with the maintainers of Gwydion Dylan taking judge's prize." -
ICFP 2003 Programming Contest Starts June 28th
mvw writes "The web pages for the ICFP 2003 programming contest are online! It starts Saturday, 28th June 0:00 GMT. As the time zone hints, this year it is organized in Sweden." From the rules page: "All programmers are invited to enter the contest, either individually or in teams. The contest offers direct, head-to-head comparison of language technology and programming skill. We have a range of prizes for the winners: cash awards, books, invitations to the conference for students, and, of course, unlimited bragging rights. The prizes will be awarded at ICFP 2003 in Uppsala this August." -
ICFP 2003 Programming Contest Starts June 28th
mvw writes "The web pages for the ICFP 2003 programming contest are online! It starts Saturday, 28th June 0:00 GMT. As the time zone hints, this year it is organized in Sweden." From the rules page: "All programmers are invited to enter the contest, either individually or in teams. The contest offers direct, head-to-head comparison of language technology and programming skill. We have a range of prizes for the winners: cash awards, books, invitations to the conference for students, and, of course, unlimited bragging rights. The prizes will be awarded at ICFP 2003 in Uppsala this August." -
Nanotech Pinball and Miniature Engines
glenmark writes "Researchers at the Solid State Electronics Laboratory at Chalmers University of Technology in Sweden have developed the world's smallest pinball game. The video is fascinating. The flippers are electrostatically-actuated monocrystalline silicon cantilevers. I hope Pat Lawlor and Steve Ritchie see this. I have a feeling they would get a kick out of it." And in another nanotech story, psmears writes "Three hundred times more powerful than ordinary batteries, but much lighter and smaller? Researchers at the University of Birmingham have developed a micro-engine that will allow people to charge mobile phones using lighter fluid. Further information at Research-TV including photos and a film." -
Nanotech Pinball and Miniature Engines
glenmark writes "Researchers at the Solid State Electronics Laboratory at Chalmers University of Technology in Sweden have developed the world's smallest pinball game. The video is fascinating. The flippers are electrostatically-actuated monocrystalline silicon cantilevers. I hope Pat Lawlor and Steve Ritchie see this. I have a feeling they would get a kick out of it." And in another nanotech story, psmears writes "Three hundred times more powerful than ordinary batteries, but much lighter and smaller? Researchers at the University of Birmingham have developed a micro-engine that will allow people to charge mobile phones using lighter fluid. Further information at Research-TV including photos and a film." -
Nanotech Pinball and Miniature Engines
glenmark writes "Researchers at the Solid State Electronics Laboratory at Chalmers University of Technology in Sweden have developed the world's smallest pinball game. The video is fascinating. The flippers are electrostatically-actuated monocrystalline silicon cantilevers. I hope Pat Lawlor and Steve Ritchie see this. I have a feeling they would get a kick out of it." And in another nanotech story, psmears writes "Three hundred times more powerful than ordinary batteries, but much lighter and smaller? Researchers at the University of Birmingham have developed a micro-engine that will allow people to charge mobile phones using lighter fluid. Further information at Research-TV including photos and a film." -
E.U. Agrees To Launch Galileo Satellite Location System
waimate writes "The European Union today decided to go ahead with Galileo, the constellation of 30 satellites which will compete with the U.S. GPS system. The U.S. abolished selective availability three years ago partly to make GPS more useful for all mankind, but also to dissuade other countries from developing their own navigational satellite system, and thus be dependant on the U.S. for both peaceful and military purposes. Since the demise of the Russian GLONASS system, GPS is the only game in town. Evidently recent events make Europe feel less comfortable about such things, and so they're building their own. Good thing for commercialization of space, or bad thing for world peace?" -
Final KDevelop 3.0 Alpha Released
e8johan writes "The KDevelop team has released the final alpha of KDevelop 3.0 (a.k.a. Gideon) has been released. This third generation of KDevelop looks really promising as it features plug-in editors, many wizards (even for Kicker apps, KControl modules and KIOSlaves). Some of the features that I like best are the support for cross compilation and support for more languages than C/C++. Screenshots are here, more info here, dot.kde article here!" -
Phoenix To Change Name
e8johan writes "Phoenix, the Mozilla-based web browser, is forced to change name. The new name has not yet been decided, but it is being discussed . The reason is that the BIOS manufacturer Phoenix Technologies dislikes the trademark infrigment. Next week version 0.5 will be released, with a new name." -
The Swiss Army Knife of Linux?
e8johan asks: "I recently found the BusyBox project that combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. As I look through the list of products and projects using BusyBox I find that most installers use it (RH, Slackware, Mandrake, Gentoo, etc.) As the footprint of this is very small, I came to wonder, are there any other smaller versions of common linux software. I found TinyX and the small linux project but I lack a proper desktop. Does anyone has a small desktop solution (like KDE or Gnome) to recommend. What I'm looking for is a proper desktop solution with common configurations tools, standardized IPC and common look-and-feel, not just another window manager." -
Test of the Preemptive Kernel Patch
e8johan writes "Linux was originally written as a general-purpose operating system without any consideration for real-time applications. Recently Linux has become attractive to the real-time community due to its low cost and open standards. In order to make it more practical for the real-time community, patches have been written to affect such things as interrupt latency and context switch. These patches are public domain and are becoming part of the main Linux tree. The test results can be found here." -
KDevelop 3.0 beta 1
e8johan writes "The KDevelop team has released the first beta of KDevelop 3.0 a.k.a. Gideon (download here). The GUI has been completely rewritten, support has been added for more languages, auto-completion, etc. Plus a bundle of improvements, the change overview can be found here. Judging from the screenshots ( 1, 2 and 3) it looks even more promissing than I dared to hope for!" -
Windows vs Linux On Security
e8johan writes "NewsFactor is running an article asking whether Linux really is more secure that Windows. I'd say that they miss to point out that Microsofts Office suite combined with VBA scripting makes Windows more insecure than anything I've ever seen, but they do make some good points, especially when discussing Open Source and security." -
Open Source Studies
e8johan writes "Avaya Labs Research has presented a paper studying the open source process in the cases of Apache and Mozilla. They reach a number of interesting conclusions, the ones I find most interesting are: * Open source projects tend to have a core team of 10-15 coders, producing almost all code. The next layer is a set of developers submitting new features and bugfixes. The next layer is a set of advanced users submitting bug reports. * Open source projects tend to have a lower bug-rate than commercial projects. * Open source projects are generally quicker to respond to user requests. The article also discusses the differences between projects that have always been open source (such as Apache) and projects having a proprietary history (such as Mozilla)." -
More on KDE Groupware
e8johan writes "The KDE PIM Team will integrate all their applications into one common interface and create an Outlook-like application.This is being done in the Kroupware project commissioned by the German government. There is a prototype of KOrganizer with KMain embedded into it (shots 1, 2), and another prototype with KMain running as a KPart in Kaplan (shot 1, 2, 3). This looks hopeful and if they manage to build the application as flexible and modular as other KDE projects this will hopefully mature into something great." Kroupware is a catchy name, but I wonder if the KDE team is aware of the English word croup. -
Seeking Input for Software Verification Policies?
e8johan asks: "I currently work at a company in the automotive industry. It is importat to ensure quality and for our products we use extensive testing before, during and after the assembly. Now I have been asked to help in the creation of a company instuction for ensuring that all 'in-house' developed software works properly. I have written a short summary describing the essentials such as: "do not ignore compiler warnings", "always describe what the code is intended to do in your comments", "do not assume that all users run in the same environment", etc. I now feel that I need more input, has anyone done anything like this before? How do you test your software?" -
Linux DVD Player on a Bootable CD?
Kumar asks: "I'm trying to make a bootable Linux CD with nothing more than XFree86 4 and ogle to play DVDs. I'm trying to make it as simple as possible: boot the system, change the CD, hit 'play'. If anyone has attempted anything like this before I'd like to hear of their successes and/or any tips on achieving this goal." A Linux box set up like this might make a nice alternative to an expensive DVD player. Is anyone working on something like this? -
Ogle Does CSS and DVD Menus
javilon noted that a new DVD Player for Linux has appeared, and this one supports CSS and is the first player to implement menus. It's called Ogle and is developed by a few students at Chalmers University of Technology ins Sweden. It's really exciting to see several different groups independently and together developing players. The only question is when will the MPAA give up? -
Ogle Does CSS and DVD Menus
javilon noted that a new DVD Player for Linux has appeared, and this one supports CSS and is the first player to implement menus. It's called Ogle and is developed by a few students at Chalmers University of Technology ins Sweden. It's really exciting to see several different groups independently and together developing players. The only question is when will the MPAA give up? -
What About Functional Languages?
sdavies asks: "Functional languages like Scheme and Haskell are great! (here is a PS viewer) They give programmers new tools for elegance and abstraction. Unfortunately, to the legions of procedural programmers writing in languages like C/C++(/C#), Java, and VB, functional languages are considered obscure and impractical. What is your experience with functional languages, and what do you think is preventing them from being adopted into the mainstream?" -
3D Window Manager
xmda pointed us to a website for 3Dwm which, as the name implies, strives to be a 3d window manager for X. They talk about hardware that it might be useful with, and show some screenshots. It looks very rudimentary, but its a pretty interesting thing none the less. I'm just wondering how long with have a good 3d display and 3d input device that would make this really fly. And for that matter, will flatland be better for coding anyway? -
Privacy vs. Free Speech in Sweden
Daniel Deimert writes "In October Sweden will get a new law on personal data, "PUL", which is based on EU legislation. The law will make it illegal to make names public on the net, without the mentioned persons "unmistakable consent" - and it threatens the freedom of speech. Very interesting. Makes me wonder where I draw the line between free speech and privacy.