Results tagged “programming” from Tech Observer: Linux And Open Source

Nice bit of writing on some code archaeology. Not definite in it's answer, it provides some illumination of the thinking behind complex problem solving.


float InvSqrt (float x){
float xhalf = 0.5f*x;
int i = *(int*)&x;
i = 0x5f3759df - (i>>1);
x = *(float*)&i;
x = x*(1.5f - xhalf*x*x);
return x;
}


Finding the inverse square root of a number has many applications in 3D graphics, not least of all the normalisation of 3D vectors. Without something like the nrm instruction in a modern fragment processor where you can get normalisation of an fp16 3-channel vector for free on certain NVIDIA hardware if you're (or the compiler is!) careful, or if you need to do it outside of a shader program for whatever reason, inverse square root is your friend.


jawr


Jawr is a tunable packaging solution for Javascript and CSS which allows for rapid development of resources in separate module files. Writing a simple descriptor properties file, and using a servlet and a tag library are all the requirements to use it.
[...]
Jawr offers the best of both worlds, by combining a powerful bundling-minifying-compressing scheme for optimal service in production, with a rapid development mode for quick change-save-test cycles.

More ruby stuff, this is a ruby library implementing MapReduce which is a programming model and an associated implementation for processing and generating large data sets.

Users specify a map function that processes a key/value pair to generate a set of intermediate key/value pairs, and a reduce function that merges all intermediate values associated with the same intermediate key.

skynet


Skynet is an open source Ruby implementation of Google’s Map/Reduce framework, created at Geni.com. With Skynet, one can easily convert a time-consuming serial task, such as a computationally expensive Rails migration, into a distributed program running on many computers.

wow take a look at this tight little implementation! Nice concept, rapid return of the image and though it did not ship with sparklines support it will add it shortly...
Google Chart API


The Google Chart API returns a PNG-format image in response to a URL. Several types of image can be generated: line, bar, and pie charts for example. For each image type you can specify attributes such as size, colors, and labels.
Yellow line chart with x-axis labelled with March, April, May, June, and July and y-axis with 50Kb
You can include a Chart API image in a webpage by embedding a URL within an tag. When the webpage is displayed in a browser the Chart API renders the image within the page.

Patrick Lenz's incredible Ruby on Rails book is now FREE to Download! Build Your Own Ruby on Rails Web Applications That's right! No catches, no samples. For the next 60 days, a COMPLETE COPY of Patrick Lenz's Ruby on Rails beginners' book is free to download.

Here are a few quotes from this article on wireless design, note the link for zigbee and the tinyos link.

Selecting a Wireless Sensor Development Platform


This article will present the problems a designer will face when implementing a wireless sensor network and the factors that are important in deciding which development platform to select. [...]
One of the more interesting parts of the software layers in a wireless sensor network is the Zigbee software stack. Texas instrument offers a free version of the stack called Z-Stack. Z-Stack is compliant with the Zigbee 2006 specification and several platforms. A link to TI's offering is given here: http://focus.ti.com/docs/toolsw/folders/print/z-stack.html
[...]
In order to build support for TCP/IP, USB mass storage devices or provide parallel execution of software tasks one needs to resort to a RTOS. A good free one for sensor devices is Tiny OS. For more information the reader is encouraged to visit the following web sites: www.tinyos.net, and www.sensinode.com.

this is very good. very interactive, it engages the student, and keeps the interest level up. Should be suitable for 9 years and up!

Ruby Tutorial Hackety Hack