In The Beam of Light That Flips a Switch That Turns on the Brain, scientists genetically alter cells so that they respond to light. They can then use lasers to stimulate activity in the brain of mice.
This sounds to me like the best approach for a true neural interface, being able to stimulate just certain cells. Genetically engineering a humans brain cells to be light sensitive could cause some weird side effects though.
Also, I wonder if you could get brain cells to also emit light to communicate with their neighbors? Could be interesting.
Requirements: emacs, haskell-mode, cabal-setup
Add the following elisp to your ~/.emacs
; One-button config --user && build && install
(add-hook 'haskell-cabal-mode-hook
(lambda ()
(set (make-local-variable 'compile-command)
(concat "cabal-setup configure --prefix=/home/"
(getenv "USER")
"/usr && cabal-setup build && cabal-setup install --user"))))
Bind compile to a handy button like F12:
(global-set-key [f12] 'compile)
This is handy for HAppS development because I can rebuild and reinstall my code changes with one button.
I do wish I could hit F12 and emacs would recurse up the directories till it finds a cabal file and then run the compile command there, but I'll save that for another day.
Linux Weekly News has an article on SDR, A green light for free-software defined radio?
The article mentions that the Federal Communications Commission of the USA will not approve transmitters that can be reprogrammed to break the spectrum allowances.
...as long as the FCC is saying that SDR devices must contain binary blobs to be certified in the U.S., we will not have complete control over our devices.
The scariest part is a comment from pascal.martin:
...
Did you go to Best Buy lately? Wireless is taking over Ethernet in term of shelf space. You find few choices with Ethernet equipment and much more choice with wireless. In a few years, Ethernet might be relegated to a more professional market (expensive CISCO boxes...) out of range for most personal use.
Open Source could be pushed out of the home network market, smashed between the demands of the FCC and those of GPL v3. Without home network there is no home computer either. Worst case, Linux could become unusable for 80% of its users. FCC is telling us that binary-only drivers might be our only way. Not much fun.
I'm on the committee for CUFP, but I really wish I could give my own talk on the many speed bumps HAppS development has encountered while trying to write a 'real application' with Haskell.
GHC is everything you want in a production language implementation, and its developers are very responsive.
Our biggest problem is that the standard libraries have lots of rough edges and corner cases that imply that they just haven't been heavily used yet.
Today we spent hours trying to find an elusive heisenbug, and finally tracked it to our usage of Network.URI.escapeURIString.
Some of our code builds SHA1 hashes of timestamps and submits them to some other company's server.
Which of the two code chunks below is correct for escaping SHA1 hashes?
escapeURIString isAllowedInURI
escapeURIString (not.isReserved)
Answer: isAllowedInURI won't touch this hash NPxlhPw+we7QcTGrvYmmV/+G318= but on the other end those plus signs become spaces!
Another rough spot that affected HAppS was that many libraries that come with GHC have Read and Show instances that do not fit into:
read $ show x == x
Since HAppS uses Read/Show for serialization, several datatype wrappers were created, RSMap and SURI are two that spring to mind, one for Data.Map and one for Network.URI.
For serialization, I wish Haskell had introduced separate typeclasses for human and computer consumable text, along the lines of Python's repr and str split. In Python, eval(repr(x)) == x but str(x) is just for humans.
Haskell is great for commercial applications, (in my opinion superior to Python) but it still has a few rough edges in the libraries.
Finland's DeCSS case was based on a nice chunk of Haskell source:
DVD-levyjen sisältö on suojattu teknisellä suojauksella, jonka tarkoituksena on ilmeisestikin vaikeuttaa levyjen katselua. CSS-suojaus toimii levyn sisällön salakirjoituksella, ja ei estä levyjen kopiointia mitenkään. Ongelmaksi nousee levyn soittaminen käyttöjärjestelmissä, joissa ei ole soitto-ohjelmaa valmiiksi. Seuraava ohjelma yrittää ratkaista omalta osaltaan ongelmaa: Ensin tarvitaan jokunen riippuvuus: > import Data.Array > import Data.Bits Ja annetaan operaatioille kätevämpiä nimiä: > (.<.) = shiftL > (.>.) = shiftR > (.^.) = xor Seuraavassa kehitellään algoritmiä, jolla levyjen CSS-suojauksen purkaminen onnistuu levyjen katselua varten. Levyjen purkaminen vaatii suojausavaimen, jonka oletetaan olevan "keyfile" nimisessa tiedostossa. > haeAvain :: IO [Int] > haeAvain = do xs <- readFile "keyfile" > return [fromEnum x | x <- xs] DVD-levy jakaantuu 2048 tavun lohkoihin, jotka on salakirjoitettu itsenäisesti toisistaan. Purkuohjelma on toteutettu filtterinä. Toteutetaan ensin funktio, joka jakaa merkkijonon kokonaisluvuista koostuviin lohkoihin. > jaaOsiin :: String -> [[Int]] > jaaOsiin "" = [] > jaaOsiin xs = [fromEnum x | x <- take 2048 xs] : jaaOsiin (drop 2048 xs) ja sitten itse DVDn luku: > haeDVD :: IO [[Int]] > haeDVD = do xs <- getContents > return (jaaOsiin xs) Ensin pitää rakentaa kaksi 256 elementtistä vektoria, joita käytetään varsinaisessa purkamisessa: > (r,p) = let (r',p') = unzip $ map rp [0..255] > in (listArray (0,255) r', listArray (0,255) p') > rp :: Int -> (Int,Int) > rp k = let op1 i = (k .>. i) .&. 1 > a = op1 0 > b = op1 1 > c = op1 2 > d = op1 3 > e = op1 4 > f = op1 5 > g = op1 6 > h = op1 7 > rk = (a .<. 7) .|. (b .<. 6) .|. (c .<. 5) .|. (d .<. 4) .|. > (e .<. 3) .|. (f .<. 2) .|. (g .<. 1) .|. (h .<. 0) > a' = (a .&. b) .^. d .^. 1 > b' = (e .&. f) .^. g .^. 1 > c' = (a'.&.b') .^. f .^. 1 > d' = (a'.&.b') .^. b .^. 1 > e' = (a .&. b) .^. c .^. 1 > f' = (e .|. f) .^. h .^. 1 > g' = (e'.&.f') .^. a .^. 1 > h' = (e'.|.f') .^. e .^. 1 > pk = (h'.<. 7) .|. (g'.<. 6) .|. (f'.<. 5) .|. (e'.<. 4) .|. > (d'.<. 3) .|. (c'.<. 2) .|. (b'.<. 1) .|. (a'.<. 0) > in (rk,pk) Jokaisen lohkon purkaminen voidaan esittää seuraavasti: > puraLohko :: [Int] -> [Int] -> [Int] > puraLohko avain lohko = > let kp = listArray (0,4) [r ! ((avain !! n) .^. (lohko !! (84+n))) | n <- [0..4]] > ala = take 128 lohko > l0 = (kp ! 1) .|. (1 .<. 8) .|. ((kp ! 0) .<. 9) > m0 = (kp ! 4) .|. ((kp ! 3) .<. 8) .|. (((kp ! 2) .&. 0x1f) .<. 16) > .|. (1 .<. 21) .|. (((kp ! 2) .&. 0xe0) .<. 17) > x0 = 0 > yla = reverse $ snd $ foldl pura ((l0,m0,x0),[]) $ drop 128 lohko > pura ((l,m,x),acc) s = > let lp = l .^. (l .>. 14) > l' = ((l .>. 8) .^. (lp .<. 9) .^. (lp .<. 12) .^. (lp .<. 15)) .&. 0x1ffff > mp = m .^. (m .>. 3) .^. (m .>. 4) .^. (m .>. 12) > m' = ((m .>. 8) .^. (mp .<. 17)) .&. 0x1ffffff > x' = (0xff .&. complement (l' .>. 9)) + (m' .>. 17) + (x .>. 8) > in ((l',m',x'), ((p ! s) .^. x') : acc) > > in ala ++ yla Sitten vielä funktio joka muuttaa vastauksen takaisin merkkijonoksi ja tulostaa sen: > tulostaVastaus :: [Int] -> IO () > tulostaVastaus xs = putStr [toEnum x | x <- xs] Ja lopulta itse pääohjelma: > main = do avain <- haeAvain > lohkot <- haeDVD > sequence_ [tulostaVastaus (puraLohko avain lohko) | lohko <- lohkot] Tämä ohje on myös suoritettava Haskell (http://www.haskell.org) ohjelma. Ohjelmaa voi käyttää esimerkiksi seuraavasti: runghc decss.lhs < salattu > purettu GHC on vapaa Haskell kääntäjä ja tulkki saatavilla osoitteesta (http://www.haskell.org/ghc). Ohjelman voi myös kääntää nopeampaa toimintaa varten. Samassa hakemistossa täytyy olla viisi tavua pitkä tiedosto nimeltään keyfile. Ohjelma käyttää tätä avainta tiedoston purkamiseen. Koska suojaus on heikko, oikein avaimen arvaukseen kuuluu moderneilta tietokoneilta vain pari minuuttia. Tämän ohjelman tarkoituksena on esittää DVD-levyissä käytetty salakirjoitukseen perustuvan teknisen suojauksen purku DVD-katseluohjelmien kirjoittamista varten. Lisäksi ohjelma pyrkii esittämään salausalgoritmin yksinkertaisessa muodossa ja auttamaan näin sen ymmärtämistä ja oppimista. Ohjelma kirjoitetiin ansiotarkoituksessa Mikko Rauhalan tarjoamaa 0.05 euron rahapalkintoa tavoitellen. Lisäksi tarkoituksena on tuoda esiin uuden tekijänoikeuslain epäkohtia ja osallistua kansalaiskeskusteluun asiasta. Ohjelmaa sekä sen muunneltuja versioita saa levittää vapaasti. 7.1.2005 Espoo Einar Karttunen
Today I made a comment on #haskell-blah to the effect that Haskell was a socialist programming language, but not really. I explained that you surrender some decision making and let the machine make some decisions for you. It's not really true, but it's a cute comparison.
Someone else said that socialism was about surrendering thought instead of decision making, someone else said that was an extreme view.. you know how political discussions go.
Sweden fits my definition of socialism ( "the only European country with taxes that exceed 50% of GNP") so I'll take it as an example. When I lived in Sweden (about six months ago), there was only one choice for health care, the national system. If you own your own business, you need to have your own tax guy and be liberal about classifying things as business costs if you want to have money left over. In short, the social system weighs heavily on those who earn money, and gives quite a bit to those who don't.
On the other hand, I visited the emergency eye care center two Fridays ago and no one there knew whether my health insurance would cover diagnosis or even how much the diagnosis would cost before insurance. With one exception, everyone I know has serious credit card debts, often from something that their health insurance did not cover. Two of my relatives have had to delay treatment for possibly life threatening problems because of insurance technicalities.
One of my rules of thumb is that if you can't pay for something when you buy it, you will pay more than it's worth. If you don't even know the price beforehand, you will get ripped off.
According to that rule, Sweden is a better choice, no matter how heavy the price, at least I know I've already paid for it.
I've heard it said that Sweden is a great place to be poor, and the USA is a great place to be rich. I think there's a lot of truth in that statement, but I suspect it's good to be a tax accountant just about anywhere.
Dave Herman's blog points to an insightful entry
My position is that for regular desktop software to scale to 32 cores by 2011 (as roadmaps predict) we'd have to rewrite everything above the kernel, starting today, using some parallel programming model that doesn't suck. Since that model doesn't exist, it's already too late.
I've noticed this myself. Debian has a pbzip2 package that uses pthreads to parallelize bzip2 operations. But why isn't there some library I can install that parallelizes everything? I don't know if that's even possible for a C program.
But there are options for Haskell. NDP and associated types could do it. So maybe a good community activity is to write a tutorial on how to convert a Haskell program into a multicore program?
<dons> she wrote some nice papers in the late 80s on generational garbage collection, I think. <dons> there was one with Wadler, iirc. <dons> on removing intermediate lists. <dons> unless i'm thinking of the wrong paris hilton.
Just now...
Customer Service: Now Sweden is that S-W? Shae Erisson : It's S-W-E-D-E-N Customer Service: Oh, I know how to spell it, I just don't know the state abbreviation. Shae Erisson: It's a country in Europe. Customer Service: Oh ok, can you hold on for just a minute?
How many US Citizens would mistakenly think Sweden is a US State?
After nearly two years and much searching, I have finally acquired my own hardcopy of Art of Doing Science and Engineering: Learning to Learn by Richard Hamming. So far it's everything I expected. I'll post an in-depth review when I've finished reading. Digital Restrictions Management and the DMCA kept me from reading this book when I purchased a PDF copy from ebooks.com, since Adobe e-books encryption only works on Windows. As ebooks.com PDFs have printing disabled and limit copying to ten pages per day, I do not recommend buying books from them.
In other book news, Ron Doerfler has a new website for his book Dead Reckoning : Calculating Without Instruments. It includes errata and extended information. If you like math, you'll like this book.
I've been unable to find an errata website for Okasaki's Purely Functional Data Structures, I wonder if such a thing exists?
Happily, Rabhi & Lapalme's Algorithms: A Functional Programming Approach does have its own errata website, and I found the errata on page 176 during an overseas flight...
Peter Gutmann's A Cost Analysis of Windows Vista Content Protection is an interesting description of the added technical costs of Digital Restrictions Management. My favorite quote comes just at the beginning:
Executive Executive Summary --------------------------- The Vista Content Protection specification could very well constitute the longest suicide note in history.
Software Metrics: Measuring Haskell
This would be fun to apply to big Haskell projects like HAppS.
Wireless Networking in the Developing World
This is a completely standalone book on Wifi, networks, and associated theory in a form anyone can understand.
More Haste, Less Speed The Complexity of Lazy Evaluation
Bird, Jones, and de Moor on how lazy evaluators are strictly more powerful than eager evaluators for a particular set of problems.
I always enjoy Barry Jay's work.
Mathematical description of unicycling.
Gravitometric Field of a Rotating Superconductor and of a Rotating Superfluid
Maybe I got this one as a preprint from arXiv? I can't find it online. This is just one of the many papers about spinning charged superconductors yielding gravitomagnetic effects. Favorite quote:
This disagreement with theory is discussed in the literature, without any apparent solution.
Incentives Build Robustness in Bittorrent
Bittorrent is just one example of a tit-for-tat system, Fon is another. Do you know of more?
Simulating Creativity in Jazz Performance
I purchased a saxophone a few days back and I'm having trouble finding research papers that cover jazz improv. Maybe I should ask Paul Hudak for a sequel to his 'Jazz Improv with Haskore' paper.
Safecracking for the computer scientist
This is just one of many interesting papers on Blaze's papers page.
I suspect Cale will like this paper. It's a neat look into the math behind Set.