Forgot your password?
typodupeerror
Programming

Journal: Functional Parallel Computing?

Journal by dancpsu
Computers have stopped getting faster. I thought I sensed something years ago, but it wasn't until I saw the graph on The Free Lunch is Over that it finally came through. The funny thing in the graphic is that it is not Moore's Law that stopped (transistor density is still increasing), but the computer speed itself. Most people know about this, and they know it means what we are seeing already: multi-core processors. However, instead of needing to learn multi-threaded programming, or using a parallel processor capable operating system, I think it means something else entirely. Instead of thinking about 2 cores, or 16, think of 1,000. How do you manage all of them? Will you have hundreds of threads running through your program? Will you have to manage each one individually, or in small groups of threads?

Probably you won't. Instead, you will have to learn a new programming paradigm. I don't mean a new language, or some language extensions, but something that looks entirely different. One option is functional programming. From the recent dispersal of functional programming articles on popular sites such as digg, it seems like this may gain some traction. Learning something like functional programming gives CS grads and the software field several advantages. First, a clean functional program is implicitly parallel. If you code your program in a functional language, then the compiler can spread it over as many processors as possible. Second, functional programs are mathematically provable as correct. The mystical idea of bug-free code would be within reach. Also, this gives the field more respect in the engineering sense. If you can document a proof of your software, then you can sign off as an engineer is expected to do in other fields. Certifications could show that you can write an algorithm of a certain complexity and prove it correct. Third, functional programs tend to be much smaller than imperitive programs (even object oriented languages).

But lastly, and the point of this, is that functional programming could bring us all the way down to the hardware, up to a very high level implementation. When a designer goes to design a new IC, he doesn't sketch out a circuit, he codes it in something called a Hardware Description Language (HDL). All the widely accepted HDL's are functional languages because of its implicit parallelism. So IC's themselves are generated as a set of functions in a functional program. The ironic thing is that the functional program makes the chip run an imperitive assembly language (and procedural at that). This is one of the reasons why, while the programs that a computer runs may be bug-ridden, the processor itself almost never has a single error.

Now, of course, it would not be easy to generate an IC that itself was programmed by a functional language, but such a chip would be able to maximize the space that Moore's Law is still granting, while taking full advantage of parallelism in ways that a pipelined processor could only dream of. Fortunately, such a device already exists in the form of a Field Programmable Gate Array (FPGA). Sometimes, an FPGA is used just to implement an imperitive processor, just moving the switch from declarative (functional programming) to imperitive one step up. While this can have advantages, such as custom instructions, functional programming could bring a lot more performance out of such a system.

Quick Recap:

Traditional
  • Design - Declarative
  • Hardware - Imperitive
  • Hardware ISA - Imperitive
  • Operating System - Imperitive
  • Libraries - Imperitive
  • Application Software - Imperitive

Reconfigurable computing:

  • Design - Declarative
  • Hardware - Declarative
  • Hardware ISA - Imperitive
  • Operating System - Imperitive
  • Libraries - Imperitive
  • Application Software - Imperitive

Proposed:

  • Design - Declarative
  • Hardware - Declarative
  • Hardware ISA - Declarative
  • Operating System - Declarative
  • Libraries - Declarative
  • Application Software - Declarative/Imperitive

Custom FPGA designs for scientific data analysis can speed up calculations 20 to 10,000 times. A general architecture that takes advantage of paralellism in functional programming would take advantage of this speedup. So why aren't FPGA's taking over conventional processors? Well, FPGA's aren't built to constantly reconfigure themselves and have access to memory. Also, many programs will be too big to fit on an FPGA. Splitting up implementations has been done over multiple FPGA's, but only with effort. What needs to be done for a complete changeover is allow the program to be split into parts and page in only the functional parts of the program necessary. Something like Virtual Memory needs to be created to allow for rewiring, and providing standard memory access for each block. Something ingenious needs to be invented for this, just as the TLB was ingenious.

Does anyone know if this is already being done?

Robotics

Journal: Automated Future 2

Journal by dancpsu

It's interesting to hear a perennial diatribe of how automation is going to kill all the jobs and cause the economy to tank with millions of people out of work. It never happens, but it is counterintuitive as to why.

In the 1950s people in the US believed that the future would be mostly leisure time. They believed that in the future, with productivity rising, few people would need to work more than a part-time amount of hours and have all the money they need to live a full life. But 50 years later, people were working longer hours, all the while being more productive. When each new technology came along, more work came with it, and not the type that many people would predict either.

When automations were first speculated about, people expected to have robots that looked like people doing jobs in similar ways to people. The reality was that the machines that do work look like machines and do things like machines. The human-like robot world of the 21st century has not appeared because a specialized machine is better to be specially shaped for the task. It is easier to have an auto-checkout at the grocery store look like a checkout stand rather than a clerk. In fact, the RFID future would eliminate checkouts entirely in favor of a metal-detector style exit that would ring up your goods in an instant, with a quick review screen to look at before you pay wirelessly as well.

Things that could be done in an automated way would make goods cheaper, but would also make people desire more. If a taxi ride only cost $1, you might be tempted to take a taxi for your daily commute, or for running errands around town. If a video camera was only $10, you might be tempted to have five or six just in case something happened that you wanted to videotape.

Also, the pace of innovation has increased as more people have been dedicated to innovation. There are certain limits to the speed of innovation, and I don't believe people can go much faster than current levels, but even at the current pace, many more people will be needed to innovate and create than in previous decades as designs become more complex.

There are some things I think I could predict for the future.

Once cars are automated enough, one might only subscribe to a car service that would essentially be a driverless taxi service. With a cellphone or equivalent, you can call up your car for what you need and punch in your destination, receiving a bill at the end of the month. Parking may be a thing of the past if this occurs. Houses would only need a workroom instead of a garage.

Once fast food is created in an entirely automated form, a restaurant may include only an attendant or "manager" who cleans up, refills, and handles any problems that customers have with their orders or the automated ordering process.

Once making clothes becomes automated enough, a clothing store could be very small, with fabric, buttons, zippers, etc. fed into a machine. The customer would walk in, be measured precisely, and have clothes made to order in seconds. A single attendant could help the customer if there are any problems. Trying on clothes would be done virtually with large high resolution screens instead of mirrors simulating the clothes on the person's body.

User Journal

Journal: SciFi

Journal by dancpsu
Story where a research team gets sucked into another dimension and transported 500 years into the future. The main issue is that they were testing a physics theory on Earth, but when they were transported, they remained in the exact same position relative to their absolute location in the universe. At this point, the galaxy has rotated and moved a great distance away. Fortunately, however, their discovery allowed for very fast spaceships. So when they arrive in the middle of deep space 500 years in the future, they are picked up by a spacecraft awaiting their arrival. Thanks to their precise notes, it allowed for people in the future to predict the exact time and place where they would arrive.

The humans, however, have adapted to their environment, with larger eyes and paler skin as well as being on average seven feet tall and very skinny. Different societies have emerged among the people of the galaxy. Each group forming a nearly entirely alien civilization. For some, being on a different planet simply means there is no longer any reason to get along with those who are different. For others, trade is an absolute necessity, and traveling merchants are always ready to cut a deal. While communication is instantaneous across the universe, it is far easier to limit the communication between worlds since the difficulty of creating matching communicators makes them so scarce as to have a single tower per planet.

The lead scientist thrust from the past is seen as a visionary that would unite humanity. Of course, now humanity on different worlds have changed and barriers between different worlds have run deep. The goal set before him is to visit the different worlds and use his insight as a common ancestor to bridge the gap between all the different worlds. Unfortunately, the people 500 years from now don't realize that even when humanity was confined to a single planet they were divided. After a dozen worlds with little progress, cracks begin to show in their plan. The people who had devised the plan had ideallistically hoped for a united humanity, and when the researchers prove to be a failure as a diplomat, they turn to violent means.

The researchers realize, except for one, that it's not a good thing for the people who rescued them to start on a galaxy wide takeover of humanity. With a contingent of the people who worked with the researchers on their quest, and anyone they can gather, they mount a defense. Ultimately, it ends as it was destined to, with a truce and both sides worse for wear.
Privacy

Journal: The National ID Card

Journal by dancpsu
One thing that drives me crazy is the problem of knowing who someone is on a citizenship scale in the U.S. A passport, birth certificate, driver's license, etc. are a hodgepodge of easily forged, unchecked documents that are causing problems today. I want to separate this out into several areas, the problems, the objections, and the technological solution. Most people are familiar with ID cards, and most people on slashdot are aware of the privacy concerns of the U.S. gov't knowing too much about your life (and the more paranoid believe they already know everything anyway).

The Problems
  • Illegal Hiring Practices
  • People Illegally in the U.S.
  • Credit Fraud
  • Identity Theft

The problems of not having a good hard to forge national ID are becoming major news items now. Particularly prevalent are credit fraud and identity theft. These problems are serious, and without some kind of good easy to verify and hard to forge ID, are impossible to enforce. Wal*Mart is coming under the gun for its illegal hiring practices in the building and cleaning of its stores. How do they stop that? There is no definitive way. The documents are too easily forged, and difficult to verify with their sources.

The Objections

  • Possible medical information in the card keeping some people from being hired
  • Gun owning citizens having the gov't easily track them down if the gov't takes a turn for the worse
  • Certain activities held against you in court that are innocuous now

There are many other objections to the national ID card, but they hinge on one thing: tracking. A national ID card effectively does two things. It verifies that a citizen is who they say they are, and it tracks what the citizen does by tracking that verification. In the mind of the objector is that in order to verify someone's identity, you have to connect to a centralized database. By doing so, that information about that person can be exploited in the future.

The Technological Solution

Essentially, what has to be done is that the verification of the person has to be separated from any kind of centralized identification so that the person cannot be tracked. In the past it would be impossible to do so, but with modern computing technology, it has become common. What I am talking about is called public key infrastructure or PKI. What it does is generate two very large numbers called keys that act as matching pairs. The act of verification is done electronically by "signing" some information about the person. The signing is an encryption that can only be decrypted with the matching key. It's called public key infrastructure because one of the keys is made publicly available while the other remains private. The private key is then used to encrypt (or sign) the information and is then decrypted (or verified) by the public key later on.

All the information can be printed in a 2D barcode on a national ID card. When verification needs to take place, the ID would be scanned and decrypted, compared to the information on the card and the person being verified. The encrypted information could be as simple as their name, birthdate, eyecolor, haircolor, height, etc. or as complex as an encoded image of their face, an encoded image of their signature, a fingerprint, or any combination of the above. The idea is to get enough information so that the person needing to verify you can easily tell you are you, and that someone attempting to steal your identity cannot without a lot of effort.

Space

Journal: Intermediate Spacecraft design

Journal by dancpsu
I have always been disappointed with science fiction/fantasy ideas of spacecraft on television and in movies. In particular, several things are assumed in almost every storyline.
  • Food is either bought or magically created
  • Waste is magically destroyed
  • Magically created gravity (Babylon 5 exception)
  • Shields, not ultra-strong hulls (Firefly is an exception)
  • No robotic drone spacecraft/smart missiles (???)

Particularly, what I am thinking about is not when spacecraft jump from one inhabited, well-established destination to another, but when these ships first set out to explore and colonize. The first places to explore and colonize would be Mars and the asteroid belt. It would probably be a symbiotic relationship since Mars is relatively closer to the asteroid belt than Earth, and takes less propulsion to escape from.

Food

Food should be a problem in space. People need to eat, and even if all food is grown in vats and hydroponic farms, it would have to use a lot of light, filtered from space. It's possible that a meat-substitute like quorn could be used as well as smaller crops to create a complete diet, but probably some animal would have to be aboard the ship as well to provide sustinance. Chickens could provide eggs for protein for instance. Also, the food would have to be carefully chosen to provide enough nutrients and variety to support the people on the ship. whatever grain is decided on, would have to be chosen for its efficiency as well.

Waste

Waste is a similar problem to food. There are different kinds of waste, some that can be broken down organically and reused, and others that cannot be broken down, and may possibly be recycled. A complex sewage system, with several stages of different bacteria would probably be needed, with a complex infrastructure linked to the hydroponic farms. Also reuse would have to be paramount. Nothing would be able to be a use once throw away item, from paper plates and plastic spoons to writing paper and even toilet paper. Something else would have to be devised. Cleaning materials would have to be grown as well, so disease would be kept to a minimum.

Gravity

Gravity is another problem. People can't survive long periods without gravity without their bones atrophying, and plants cannot be grown without some sort of gravity directing their roots. The obvious method of creating a gravity like force is centripetal force. However, plants expect sunlight from the top, so light would have to be directed in to the center of the ship's farms and dispersed outward in line with the centripetal force.

This also requires the ship to be large which would require either that the ship remain in space and never land, or that the ship be able to collapse. The second idea was going to be tested with the international space station, with a section that would inflate using bulletproof kevlar to keep the people safe from micrometeorites. This idea is appealing because most likely the extra space would not be needed on liftoff and landing.

Sheilds

Shields have bothered me about all space series that include it. The materials necessary to eliminate the need for shields and other methods would probably be much more accurate. The best sheild would be a strong hull. Any material that would be large enough to have the inertia to break through the hull would be either dodged or shot to clear the way. There may be some micrometeorites that do get through, but they would be moving much more slowly once piercing the hull, and could be automatically fixed through advanced material design.

Weaponry

One thing that really bothers me is the ballistic nature of the weapons depicted in space. Missiles today can guide themselves to a target, so why can't missiles in the future? Also most fighting and especially dogfighting spacecraft would be entirely automated. There is no need for wars in space to be fought by people in small fighters. The only people needed are the ones who make big decisions. Fighters just carry out their orders. They would be able to patrol around space stations, be extremely accurate in shooting other spacecraft, and be able to detonate themselves if necessary.

News

Journal: Christianity you never knew

Journal by dancpsu
If you have ever taken a philosophy class, you will come to the "Big 3" questions that everyone answers within their own belief system. While most people seem familiar with Christianity, it seems like most are unfamiliar with the teachings that correspond to the Big 3. The questions are as follows:
  • Why are we here?
  • Where did we come from?
  • Where are we going (after we die)?

In (Protestant) Christianity, the answers to these questions are all found in the Bible. Most people, even having read the Bible, have a difficulty reconciling the different stories, geneologies, and teachings within the Bible. Some even believe that the Old Testament and the New Testament have nothing to do with each other. So first, I will go through a (very) basic Biblical structure.

  • Origins and Purpose (Genesis)
  • Fall of Man (Genesis)
  • Trials of the Faithful Lineage (Old Testament)
  • Messianic fulfillment of the Faithful Lineage (Gospels)
  • Teachings for the period before the end of the Earth (New Testament)
  • Last Days, Afterlife (Revelation)

So the entire structure of the Bible is this lineage leading up to the Messiah, and then the teachings for today, and an epilogue of the last days of the world and afterlife. But the purpose and the center of the Bible is the Messiah, from the fall where he is referred to as Eve's offspring in Gen 3:15, to the end of the Bible where the Messiah says "Come".

Why are we here? (Purpose)

But what is God's purpose for us in all of this? Why have us here, and why go through life on Earth, especially knowing in advance what is going to happen? A Victorian era theory was that God meant to have humanity in the best of all possible worlds. Voltaire famously panned this idea with his satirical works. If God was trying to make everyone happy, He certainly did a poor job. One thing I must make clear, is that God's goal is not to make you happy, but to make you a companion (John 15:15). Now there are certain problems with creating your own companion, the first being that to have a true companion, that person has to have a will of his own. If there are more than one, then there is the possibility that they may hurt each other, and for their choices to have meaning, then the hurt can't simply be taken away, or the choice to hurt has been taken away.

The environment is another problem, since many people are hurt by natural disasters as well. To have separate individuals, there must be a neutral space that can be manipulated by the individuals, but which may also affect the individuals. This also allows for the created individuals to create in the neutral environment as well as serve a medium for communication. But this neutral space may also harm the individuals even if it is made to keep them as comfortable as possible. From a planet wide perspective, the Earth is excellently made to protect humans and keep us in relative comfort.

Where did we come from? (Origins)

The Bible teaches that we all came from Adam and Eve, created as perfect beings in an idealistic garden before being disobedient and tossed out into the grim ugly world in which we now find ourselves. Central to the story of Adam and Eve is the fruit they ate in the act of betraying God. The fruit is a strange thing altogether. In essence it is the ultimate choice against God, but what did it do? The fruit was from the tree of the "knowledge of good and evil" (Genesis 2:9), and the serpent said it would make humans like God (Genesis 3:5), which God agreed with (Genesis 3:22). The phrase "knowledge of good and evil" does not mean what it looks like on the face of it. The words "good and evil" juxtaposed in such a way meant to the ancient Hebrew everything in that realm. Like saying "east and west" to mean everywhere, this would include everything moral. But to withold moral knowledge would be a problem, because then no moral choice could be made. But the word "knowledge" to an ancient Hebrew did not mean simply to know but to have authority over. After all there should be some kind of ultimate authority over right and wrong. It would make things much easier with disputes, court cases, and all sorts of arguments. We try to make authorities with judges and attorneys in the legal system, but it is such a laughably bad attempt and corruption is so prevailent that we expect the bad lawsuits, bad rulings, and money mattering more than justice. God would have authority over morality, but after Adam and Eve ate the fruit they had no greater moral authority than themselves.

So why was the fruit there in the first place? As a completion of God's plan for the companionship of humanity. In order to become a companion of God, one would need to have the kind of moral freedom that the fruit provided. However, one would have to build up some sort of tolerance for the fruit's effects. For Adam and Eve to have the fruit at such an early stage meant that they would be disobedient to the point of not even being able to be in the presence of God. Where Adam had talked with God closely before (Genesis 2:19), he and Eve hid when God was approaching after eating the fruit (Genesis 3:8). Not good for a companion who cannot be in your presence.

Where are we going? (Afterlife)

Humanity after Adam and Eve eat the fruit is in a bad situation. Corruption has gotten into the world, and when people die, their souls are seperate from the sustenance of being near God (Luke 16:23-24). So what did God do about it? He set up a time for a person to reverse the effects of the fruit. This would be the Messiah alluded to in Genesis 3:15. It may seem unfair that only two people had to eat the fruit to ruin it for the rest of humanity, but the other side of one man being able to poison all of humanity by eating the fruit, is that one man is all that is needed to reverse its effects for all humanity (Romans 5:12-15). To get to the Messiah is a bit suspenseful though. From Adam and Eve's kids on, the whole of humanity in the Bible is split between the Faithful and Unfaithful Lineage. In order for a Messiah to come about, the Faithful Lineage needs to survive. God intervening so that the Faithful Lineage doesn't get wiped out makes up most of the stories of the Old Testament.

So once the Messiah comes about, then some choice still needs to exist, a bare minimum required so that one can reject God still, and that is simply the private belief of the individual Christian. It's about as easy as it comes, but it doesn't answer the question of justice. Once you make it into heaven, isn't that all? It turns out the afterlife in Christianity isn't as simple as popular culture would have you believe. You can make it to heaven, and still be judged by what you did in life (1 Corinthians 3:12-15). This effectively closes the loophole of the believer who decided to believe and then murders a bunch of people, or the death row conversion after going on a killing spree.

That said, heaven is not clouds and harps. This is a Babylonian myth and has nothing to do with the Bible. Revelation 21-22 describes a material heaven, much different than depicted in popular culture. Also, the Bible does not teach that we will be spirits without bodies. John 20:27 describes Jesus' resurrected body as one that could be touched. The Bible also does not teach that we will become angels, which are described as separate beings from humans entirely. These are all popular culture beliefs that have been falsely attributed to Christianity.

In Summary

In short, Christianity teaches that humanity started out perfect, but not as companions of God, that Adam and Eve disobeyed God and prevented humanity from becoming His companions through the usurping of His moral authority, and we are here to become companions of God, by a choice provided with by the aid of Jesus, the Messiah (Greek: Christ), so that we may live a material life in a material heaven forever.

The Almighty Buck

Journal: The Design Economy

Journal by dancpsu
There seems to be a lot of confusion about the state of the modern western economy. Many things attributed to the economy, including regulations and measurements are for outdated forms of the economy. To begin, let me state the 4 Economic forms shown in progression for a capitalistic society. These are from personal observation and study, not from an economic text.
  • Agrarian
  • Craft
  • Industrial
  • Design

To expand on the terms, an agrarian economy is one of people primarily farming for their own food and some to barter. A craft economy is one where people make things, but not at a scale, just one person makes one object for individual sale. An industrial economy is one where goods are made in large scale on assembly lines in factories. A design economy is where designs become the primary product and need many workers to design newer more complex goods to sell.

Each economy coexists with the others before it, but what distinguishes each economy is the labor of the masses are focused on one type of economy. An economy dies when fewer workers are needed for the economy before. Normally this is accomplished with machines to mechanize what was done by hand before, but the Craft->Industrial transition was more of an organizational effort.

Evidence of a design economy come twofold. First, modern designs are no longer created by a single person, but by larger and larger teams, and need large corporate organizations to support the designs. The complexity is even being handled in novel ways such as the open source movement that uses many people of similar skillsets across the world to support a complex design. Even things that could be produced by a single person now have major support for marketability and focus of a particular design. Second, the manufacturing aspect is becoming less labor intensive. Thanks to mechanization (and moving manufacturing to other economies), there are less man-hours needed to produce the physical goods. The industrial economy no longer applies when only a handful of people are needed to supervise the robots and machines that actually create the product.

Some have dubbed the modern western economy a "service economy", but don't recognize that much of the service is in support of complex underlying designs. The driving force of the economy is what is at the forefront, and not its support. Would one believe that the economy is driven more by a new car on the market, or the mechanic that keeps it in running condition? The car must be designed and manufactured first before services can be provided for it. Some even mistake aspects of the design economy as services. An advertisment agency that puts forth many hours of effort designing an appropriate advertisment is not any more in service of something bigger any more than a car company is in service to the customer who purchases the car.

Now the problem is, there are different needs for different economies. This is true of the patent system, which was made for a craft economy, and hinders a design economy. Different protections are necessary, such as group filing, strict renewal reviews, minimal production requirements, and short expiration time periods. Education as well is generally stuck in the industrial period, where a set of basic skills and following simple instructions were most needed for the majority of laborers. Earlier specialization and a focus on longer projects are necessary for education to correspond to the design economy. Labor laws as well are outdated and still reflect an industrial economy. Youth labor laws are not critical in an air-conditioned office environment.

The transition from the industrial to the design economy has taken place before our eyes in the last few decades, and while business has adapted thanks to competition, education and legal support lags behind. Also, transitioning to a new economy may never happen, since mechanization of new designs would require the mechanization of creativity, which is generally agreed not to be possible. The design economy may not just be another step in the evolution of the economy, but its final destination. At its final fruition, the utopian leisure predicted when fully mechanized production was a dream has fallen to products so complex that large teams need to work 60 to 80 hour work weeks to design the next big thing.

The number of arguments is unimportant unless some of them are correct. -- Ralph Hartley

Working...