Become a fan of Slashdot on Facebook


Forgot your password?
Back for a limited time - Get 15% off sitewide on Slashdot Deals with coupon code "BLACKFRIDAY" (some exclusions apply)". ×

Submission + - Tearable Cloth In JavaScript (

mikejuk writes: Every now and again there is a demonstration program that you just have to play with. Tearable cloth is a JavaScript app that animates a grid-like cloth and you can move it or tear it with the a swish of a mouse. It's addictive and it's going to waste hours of productive programming time. What is impressive is that the simulation is interactive and it's written in JavaScript drawing directly to a Canvas element. Moving the mouse across the cloth disturbs it as if the cloth had been "poked" by a stick or a finger. Dragging with the right-mouse button pressed cuts the cloth and creates holes or even detaches portions which then simply fall under gravity. What may also surprise you about this simulation is that it doesn't use a physics engine but solves the equations of motion using a directly implemented integrator function. It isn't completely stable under all values of the parameters and after you have tired of toying with the cloth, now you know how a kitten feels, you might like to take a look at the JavaScript code.

Submission + - JavaScript Assembly Language (

mikejuk writes: The idea of using JavaScript as a modern day assembly language for browser code is being taken very seriously by Mozilla. Asm.js is a specification for a high performance JavaScript assembly language and OdinMonkey is an engine that runs it really fast. It is a detailed specification for a subset of JavaScript. Notice that while this means that this isn't a new language there are new features which would be ignored by a standard JavaScript engine. For example, the language only has strictly-typed integers, floats, arithmetic, function calls, and heap accesses. This is achieved using annotations in the form of comments and a restricted set of operations which only work with the data type — for example logical operators convert numeric values to int32.

The fact that asm.js is a subset of JavaScript means that you can take an asm.js program and run it in a standard unmodified browser or JavaScript engine. However, to get any real value from using it you need it to be run using an optimizing JavaScript engine. This is the second half of the project. Mozilla is working on OdinMonkey, a JavaScript engine that recognizes when it has been fed an asm.js program and can apply automatic optimizations.
At the moment asm.js runs no worse than half the speed of native code. So who needs NaCL or PNaCL — JavaScript might be all we need.


Submission + - Agile Programming As Family Therapy (

mikejuk writes: It used to be physicists who poked their noises into other people's subjects, but now it could be programmers. Agile programming is very popular, but currently not as a way to manage your family — this could be about to change. Bruce Feller puts the case, in a recent TED talk, for the agile approach to... no, not programming but to running a family. After explaining the basic idea of agile versus the old fashioned waterfall model he says:
"Inevitably people began taking some of these techniques and applying it to their family"
As a programmer, I'm not sure that I see where the inevitability stems from, but perhaps I'm missing the point. Perhaps humans have a basic flaw that causes them to overgeneralize any new theory.
On the other hand, I can see the sense in the "Agile Thanksgiving", but it sounds more like a distributed programming approach:
"one group of people working on the food, one setting the table and one greeting visitors at the door."
From this point the video provides examples of how agile can help with family life.
Programmers do have a way of thinking about things that can help with non-coding situations, but I doubt that it is as narrow as agile. It is more likely that general algorithmic thought is what is effective. The power to organize what happens to be more efficient, rewarding and effective, is what applying a good algorithm is all about. Perhaps it isn't Agile Thanksgiving that is the success, but Algorithmic Thanksgiving.
What next — Kanban, Scrum, lean, test driven development, gamification — all good ways to manage a family.


Submission + - President Obama Says Teach Programming! (

mikejuk writes: Ladyada, aka Limor Fried, founder and CEO of Adafruit had the opportunity to ask the President of the United States some questions in a Google+ Hangout. She inquired about patents, how the president's girls were doing in science and technology and asked: should we teach programming in schools?
Limor: "..can we make it an national effort to also add a computer programming language requirement"
President: "I think it makes sense, I really do."
He then went on to discuss the value of vocational training and programming in particular.
Sadly there were no firm promises on how and when programming might be included in school, but now we know that we have a powerful ally who agrees that programming is worth teaching and learning.


Submission + - Can You Do The Regular Expression Crossword? (

mikejuk writes: Programmers often say that regular expressions are fun ... but now they can be a whole lot of fun in a completely new way. Want to try your hand at a regular expression crossword?
The idea is simple enough — create a crossword style puzzle with regular expressions are the "clues". In case you don't know what a regular expression is — it is a way of specifying what characters are allowed using wild-card characters and more. For example a dot matches any single character, an * any number of characters and so on.
The regular expression crossword is more a sort of Sudoku style puzzle than crossword however because the clues determine the pattern the the entries in a row have to satisfy. It also has to use a hexagonal grid to provide three regular expressions to control each entry.
This particular regular expression crossword was part of this year's MIT Mystery Hunt, and if you don't know anything about it then good — because it could waste a lot of time. This annual event is crammed with a collection of very difficult problems and the regular expression crossword, created by Dan Gulotta from an idea by Palmer Mebane, was just a small part of the whole — and yes there is a solution.


Submission + - Gnome Goes JavaScript (

mikejuk writes: Much to most programmers shock and dismay Gnome has made JavaScript its main language for apps. It will still support other languages and it still supports C for libraries but for apps it is JavaScript that rules.
JavaScript seems to be a good choice for Gnome 3 as the shell UI is written in the language. It is also consistent with the use of the JavaScript in WinRT, Chrome Apps, FirefoxOS apps and generally the rise of web apps.
As you might expect, the initial reactions are of horror at the idea that JavaScript has been selected rather than the favorite language of the commenter. There is a great deal of ignorance about, and prejudice against, JavaScript which is often regarded as an incomplete toy language rather than the elegant and sparse language that it actually is.


Submission + - JavaScript Comes to Minecraft (

mikejuk writes: JavaScript is the language of the client and it is becoming the language of the server. Now it seems set to be the language of Minecraft. ScriptCraft is a Minecraft mod that can be added to the game to allow the player to use JavaScript commands. Walter Higgins ported the Rhino JVM implementation of JavaScript in a few spare weeks over Xmas. Some additional JavaScript classes allow the construction of blocks making it possible to automate construction. It also provides a "turtle like" drone class that makes it easier to move in 3D. It makes use of a fluent API to create a domain specific language for movement. As its creator says:
"Ultimately I think the ScriptCraft mod could be used to take building in Minecraft to a whole new level. With a full-blown language at the Player's disposal, it should be possible to create not just castles and forts but entire road networks and cities."
Most importantly of all, it not only pushes the boundary of Minecraft it also provides a way to get kids who are already hooked on Minecraft to start learning JavaScript.


Submission + - C Beats Java As Number One Language (

mikejuk writes: Every January it is traditional to compare the state of the languages as indicated by the TIOBE index. So what's up and what's down this year? There have been headlines that C# is the language of the year, but this is based on a new language index. What the TIOBE index shows is that Java is no longer number one as it has been beaten by C — yes C not C++ or even Objective C. TIOBE name Objective C as the language of the year but because it has grown most in popularity but this is mainly because of the growth of iOS — it is hardly used for anything else. No without a doubt the language of the year should be C for deposing Java.

Submission + - Mayan to Spanish Translation at the End of the World (

mikejuk writes: Many people were concerned that the Mayan calendar predicted the end of the world on December 21st 2012 but a more realistic disaster is the imminent demise of the Mayan language which it is estimated will be extinct within two generations. As the 14th B’ak’tun began, and the world didn’t end Microsoft Research, took the optimistic view and demonstrated a Mayan to Spanish translation system. The system can translate from Yucatec, a dialect of Mayan, to Spanish and vice versa and the hope is that it will keep Mayan alive by allowing native speakers to communicate with the Spanish speaking majority using mobile phone and tablets. Let’s hope that the improved communication will stop any misunderstanding of what might happen at the end of the 14th B’ak’tun.

Submission + - Microsoft Kills Expression Suite (

mikejuk writes: Microsoft has announced that the Expression suite of design tools is no more. It has been removed from sale immediately and it has been placed on a maintenance only status until it reaches its end of life. Expression was Microsoft’s offering for designers and competed directly with Adobe products. You can now download the components of Expression — Design 4, Web 4 and Encoder 4 — for free but you can’t buy them. Of course, knowing that you are using "doomed" products, even for free, takes some of the icing off the cake.The central component of the suite the UI designer Blend is to be integrated with Visual Studio 2012 probably along with Update 2. It looks as if Microsoft is giving up on trying to get designers to use its tools.

Submission + - A Bare Metal Raspberry Pi Course (

mikejuk writes: This is a course designed to explain the real basics of computing — there is nothing between you and the hardware. You write an ARM assembly language program and a basic loader gets it running on the Raspberry Pi. It starts out flashing the LED and programming the GPIO directly. From here we move on to programming direct to the screen. This is more than just working with a memory-mapped graphics facility. The graphics chip is as powerful as the CPU and so working with it is a little more complicated. Several lessons work up from random dots to text.The final lessons deal with USB I/O and after two lessons you have a keyboard and screen program that can be used as a dumb terminal.Overall this looks like a good way to get back to basics, and a Raspberry Pi is cheap enough to buy one to just play with ARM assembler.


Submission + - One Day To Go To Windows Phone 8 SDK? (

mikejuk writes: Windows Phone 8 launches on October 29th. This time it really is a cliff hanger. What has Microsoft been holding back to increase the excitement and justify not releasing the SDK? Is there anyone still paying attention or has every reasonable developer left the Microsoft IDE and switched out the lights? Only a small number of privileged developers have been allowed to have a copy of the SDK. Most of the potential WP8 developer community has been left out in the cold. The apparent reason, or at least the reason given, is that WP8 contains really exciting features that will be revealed at the launch and a bunch of anarchic developers would simply go and spoil the tension by telling the world about it. Can you think of any feature that would be included in the SDK that would make the end user go "wow — I just got to have a WP8"? No? Nor can I.
A final big question is — do we get the SDK now?
You might be assuming that the answer is an obvious yes, but the launch of WP8 isn't necessarily the launch of the SDK. By all the laws of common sense it should be, but if the reason for holding it back is to do with it not being ready for release then a different set of rules might apply.
Still not long to wait — assuming anyone is still waiting...


Submission + - Life Programmed In Life (

mikejuk writes: Every programmer likes a good self reference, a recursion, a bootstrap — but this one is mind-boggling. We have an implementation of Conway's game of life in Conway's game of life. Or put more simply Life in Life.
It has long been known that Conway's life is Turing complete, that is you can use it to compute anything that a Turing machine can compute, but doing it is another matter. Now we have an video that really brings the idea home. Some years ago, around 2006, Brice Due created a metapixel — a unit cell that can be customized to behave like any cell in a Life like cellular automata. The metapixel uses 2048x2048 “real” Life cells and takes 35,328 generations to change state and it really is aware of the state of each of its neighbours. This makes it possible to create an implementation of Life in Life. But your mind has not been completely blown until you see the video of the smooth zoom, reminisent of the famous “powers of ten” video. It starts down at the single cell level and zooms out all the way until you can see Life being run by the metapixels. Life’s simple rules give rise to complex behaviours which are used to implement simple rules — the circle has closed.


Submission + - From a Nand Gate To Tetris (

mikejuk writes: Long before the current crop of MOOCs there was a course that taught you all you needed to know about computers by starting from the Nand gate and working its way up through the logic circuits needed for a computer, on to an assembler, a compiler an operating system and finally Tetris. Recently one of the creators of the course, Shimon Schocken gave Ted talk explaining how it all happened and why it is still relevant today. Once you have seen what is on offer you will probably decide that it is not only still relevant but the only way to really understand what computers are all about.

Submission + - SmoothLife - A Continuous Conway's Life ( 2

mikejuk writes: Conway's Game of Life is well known, but what about a version that works not on a discrete grid but in the continuum? It has all of the features of Life, including gliders, and it really looks alive.
A paper published at the end of last year by Stephan Rafler described a generalization of Life to a continuous domain. He called it SmoothLife. Now we have a new video by Tim Hutton of SmoothLifeL (a particular version of the rule) in action complete with gliders — see the video.
Does it have a purpose? Does it have to?

You have a massage (from the Swedish prime minister).