- my projects:
- parseerror.com:
- googlebomb:
- useful:
- interesting:
- people i know:
- people i don't know:
- wastes of time:
- software:
- music:
|
- A Parallel Approach to XML Parsing
- The Connection Has Been Reset
- The 25 Year-Old BSD Bug. People just do not understand how hard it is to write perfect code. Any function lacking an exhaustive test suite should be assumed to have bugs in it.
- "The press does not exist to provide information but to provoke emotion."
- Sexy prime
- stochastic
- Well, I've bought nice, expensive headphones (Sennheiser) and cheap, crappy headphones (Radioshack). They've both crapped out on me, though it took the Sennheisers longer to do so (~1 year vs. a few months for the Radioshack ones). How hard is it to make a pair of fucking headphones.
- "The Internet has been operating now for 10 years," Gates said. "The second 10 years will be very different." The Internet has been in operation since the 1970s. What an idiot.
- Frustrated drivers try to sell their gas-guzzlers
- CCTV boom has failed to slash crime, say police
- I think that the programming model for massively parallel systems will be more functional than imperative. Common imperative languages don't include the right kind of information to facilitate auto-parallelism. I'm working on designing a programming language and interpreter will automatically partition and execute general-purpose programs in parallel. The language currently looks something like a combination of the best parts of Scheme, Haskell and Python; but it's far from finished. It's a big project; I'll post something up here as soon as it's worth sharing.
- mod_spox
- Do Androids Dream of Electric Sheep?
- Internet porn hurting Toronto strip clubs
- The Slab Allocator: An Object-Caching Kernel Memory Allocator
- jed explains digital audio
- Tahoe, the Least-Authority Filesystem
- There's Plenty of Room At the Bottom — a 1960 lecture by physicist Richard Feynman about the importance of nanotechnology.
- Ariane 5 Flight 501 was a rocket that was detroyed by an overflow error in the guidance software.
- Trie
- CUDA Showcase
- Hypercomputation
- APL
- The AutoClass Project
- Perlisisms - Epigrams in Programming
- Wrote a program for calculating all 203280221 prime numbers between 2 and 2^32-1. It implements Miller-Rabin primality test and completes in about 49 minutes on a single 2GHz CPU. I wrote it to take advantage of multiple CPUs, so that should give us linear speedup; but of course the best way to make it faster is to use a smarter algorithm.
- The first 1000 primes
- Physical Address Extension
- Bigtable: A Distributed Storage System for Structured Data
- Actor model
- hierarchize
- "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it."
— Alan Kay
- Scala
- Knuth was wrong about premature optimization. The root of all evil is a premature return path. A very well-reasoned and insightful post.
- The Funniest Joke in the World
- "Infinite patience produces immediate results."
- What Every Programmer Should Know About Memory
- "I know the future because I have seen the past."
- A New Way To Look At Networking
- Processing reminds me of LOGO.
- L-system
- Space-filling curve
- Ray Tracing For the Movie 'Cars'
- The Long Now
- I caught the show "Man-Made" over the weekend on The National Geographic channel. I found it profoundly satisfying because of its engineer-like treatmeant of the subject. The topic of the show was the bra. It begins with an introduction of the bra and lays out its practical importance and cultural history. Then we are given an overview of the design process via the design of a single new bra. Through the design the whole is broken down into its constituent pieces. We then learn how those pieces are made from their constituent parts and so on back to the original dependency raw materials: silk from silk worms, spandex from oil refineries, dye from its chemical components, plastic and steel. The methods and tools involved in each step of the process are covered. The show wraps up by taking us through the entire now-understood process and covering some other miscellaneous but interesting facts. I found it thoroughly enjoyable, interesting and educational. There is hope that someone watching these shows learns not only the specific details of how one type of everyday object is made, but the overall pattern of how to learn about a subject. Maybe there is hope for TV after all.
- Richard Feynman's appendix to the Rogers Commission report on the space shuttle Challenger accident
- Residential Styles
- How the Fed Works
- I have been working on my periodic table table recently.
- kowtow
- superdelegate
- golden spiral
- senescent
Elements of Murder: A History of Poison is written by John Emsley, the author of many other pop-culture explorations of the chemical elements. It is an interesting (and certainly morbid) journey through the Euro- and Brit-centric history of elemental poisonings, both accidental and intentional. Even though I'm going through an "elements phase" at the moment this book was still a mixed-bag; some aspects of poison were intriguing while other accounts dragged on. Many of the poisoning accounts read straight out of a murder mystery, carrying on for some time and involving many characters. Inevitably all the accounts were of upper-class folk, as the lives of the poor are undoubtedly less well-documented and involve fewer international trysts. While I took away some practical information from the reading I think I won't be hanging onto this one.
- Man commutes via bicycle on Texas freeway
- A tree grows amid rotting paper in the Detroit Public Schools book depository
- Astronomy books for the blind
- bisque
- China bans free plastic bags — I think this is a great first step towards reducing pollution and moving away from the "use once and throw it away" mentality.
- Tata motors rolls out $2500 car in India
- a french amateur radio operator rolls his own vacuum tubes. beautiful.
- Building beer brewing Bender — someone built a full-size model of Bender from Futurama and then brewed beer inside him (a la episode "The Route of All Evil"). Beautiful.
- Witness the side-effects of a fatter society: Super-Sized Autopsy Tables Needed For Big Corpses
- Neuromancer invented the genre of cyberpunk. This sounds impressive until you try and make a list of good cyberpunk. I read it to take a break from non-fiction, but I find myself wishing I didn't. The book was not unenjoyable, it was just too cool, too forced-grittiness tough-guy macho-nerd and too much of an unintelligible mess even before we are subjected to futuristic Jamaica-mon techno-slang.
- Introducing the Solar Tree
- "Bender's Big Score" was nonsensical, convoluted, disjointed and weak. I couldn't even make it through the whole thing, it was just too crappy. It was, dare I say, too nerdy. It contained so many cheesey *wink wink* in-jokes that anyone who hadn't seen the show simply wouldn't care. Nor, it seems, those who tire of the same crap recycled endlessly. Futurama just gets worse. I'm done.
- I noticed that the icons on my site, as beautiful as they are, take an inordinate amount of time to download. I noticed recently that yahoo.com uses a CSS-based image consolidation technique for its icons.
- Fed loans banks $20 billion
- Finally, an in-depth investigation of the eternal question: Could a morbidly obese goalie shut out an NHL team?
- The Story of Stuff
- Idiocracy has a great premise but is a bit too juvenile to be really good.
- arc melting
- Time hackers play with atomic clocks at home
- Interesting that within a few weeks of Fewer Roadside Bombs in Iraq the U.S. Finds Iran Halted Its Nuclear Arms Effort in 2003. Seems like a fair trade, right?
- Bruce Schneier Q&A @ Freakonomics
- Rural Britain wants to put itself off the GPS map
DNA: The Secret of Life by James D. Watson is equal parts memoir, history book, textbook, gallery of scientist personality profiles and soapbox for his (unsurprisingly) pro-GM stance. Highlights include Watson's account of the Human Genome Project and the account of human evolution as it is currently understood via genetics. While I personally found high school biology to be completely dry and inaccessible I feel that Watson and co-author Andrew Berry do a good job of describing the the function and importance of DNA and various DNA-related technologies. A book trying to cover so many topics necessarily can't be terribly thorough on any of them, but it did pique my interest on a few topics which I plan on delving into in more depth elsewhere. As for grievances: while I don't necessarily agree with all of Watson's opinions my major complaint would be that the book, at over 400 pages, was a bit longer than it needed to be. I'd borrow this one from the library.
- Adblock Plus is a firefox plugin that blocks in-line ad images and frames. It is superior over regular Adblock because it allows one to subscribe to externally-managed "block lists" of ad-serving domains, so one mustn't manually build one. A perfect example of the power of a flexible plugin architecture.
- Saving Electricity
- San Francisco considers late-night pizza ban(!)
- U.S. Copyright Basics
- 2007-11-27 In any environment those best-suited thrive; and the music business is changing. NPR had a story on T-Pain's domination of the pop charts, mentioning he made more money from ringtones than from singles. Most interestingly they also mentioned his extensive use of a vocoder (2:27 into the audio) and tones which translate very well when played on a cellphone's (crappy) speaker; the ringtone sounds very similar to the actual song. We often forget to take into consideration the context of the delivery medium.
- deceptively — see the "Usage Note"
- Dell's Ideastorm is a good... idea.
- What's old is new again: sail-boats
Apparently in order to do remote debugging via Windows for .Net stuff (someone else's project, not mine) both debugger and debugee machines need to be part of the same workgroup or same domain. Things just seem to get more and more complicated. This is a shot of Process Explorer running via Remote Desktop running via Windows in VMWare in Windows.
- Reactor
is a software design pattern for handling multiple simultaneous connections in a single thread of execution; while I normally don't build my software explicitly around design patterns my current project does fit this pattern.
- Helvetica is a documentary about the most influential typeface of our time. Part history, part analysis, part existential design philosphy; I learned some and enjoyed most. Helvetica is a modern Swiss san serif typeface based off of a German one named Akziedenz Grotesk, though marketing knew the name wouldn't sell in the US and named it Helvetica based on Helvetia (the Latin name for Switzerland).
- Newsweek article on Amazon's e-book venture. I hope it's a long time before paper books are obsolete, but this thing has enough features to be interesting.
- Memory Leaks in C# — how is garbage-collection advantageous over manually-managed memory? i have never understood this; one has the same potential problems and less control over how memory is managed (i.e. the timing of GC).
Zero: The Biography of a Dangerous Idea discusses the history of math and science with regards to one of my favorite numbers: learning to divide by zero, sum infinite series of zero, cover all rational numbers with zero, destroy space/time with zero, provide infinite energy with zero and that zero and infinity are really just two poles of the same sphere.
- Trigonometry
- Sine
- Fundamental theorem of calculus
- A history of Zero
-
pizza@debian:~$ echo "explain char *(*x)[5];" | cdecl
declare x as pointer to array 5 of pointer to char
- The Rise and Fall of Ziggy Stardust and the Spiders from Mars
- I'm currently reading
Structure and Interpretation of Computer Programs (a.k.a SICP) — a beautiful book that explores the structure of information, algorithms and computer programs. It isn't a book about learning how to program, or about Lisp or Scheme; it's not a book about math. It's a book about thinking, about learning, about exploring information and algorithms.
- Introduction to Parallel Computing
- Counting bits set, Brian Kernighan's way
- Trie
- Folding@Home
- Terror watch list swells to more than 755,000 names
- NESL: A Parallel Programming Language
- BitC Programming Language
- Writing Bug-Free C Code
- Rules of Go
- Hashlife
- Watched Into the Wild tonight; and having read the book I can say that I think they did a good job. The movie was beautifully made.
- I've been thinking about how to efficiently manage a list of timers after seeing the
same issues/solutions in Linux's tickless feature, libevent and mod_spox; this is some Haskell to treat
a sorted list as a tree and insert an item in O(log n) work.
insert p i [] = [i]
insert p i (x:[]) | p i x = [x,i]
| otherwise = [i,x]
insert p i l =
do
let (lo,hi) = splitAt (div (length l) 2) l
if p i (hi !! 0) then
lo ++ (insert p i hi)
else
(insert p i lo) ++ hi
I really like how functional languages allow one to concentrate on algorithms instead of implementations.
- 2007-10-09 I borrowed and read Harry Potter and the Deathly Hallows over the weekend and I am emotionally exhausted.
- Purely Functional Data Structures
- Disabling NTFS Last Access Timestamps
- An even "better" way to find the largest entry in a list is:
big (x) = foldl1 max x
- A better way to find the largest entry in a list is:
big (x:xs) = foldr max x xs
Which applies the 'max' function between each pair of entries in a list
- Haskell Prelude
- Funny, recursive lambda functions in lisp seem to not be part of the proper language, and require hackery to be made to work. Let me know if I'm missing something.
- Common Lisp HyperSpec
- Just because you cannot do it does not mean it cannot be done.
- bucket sort and example of how bucket sort is much faster than qsort when sorting Library of Congress call numbers.
- Thousands of Burmese protestors killed
- Why you should rewrite your program several times
- OK, so I've been playing with a Haskell tutorial
and I like it so far. So far the best thing I've done is write a function to find the highest number in a list:
big (x:[]) = x
big (x:y:xs) | x > y = big(x:xs)
| otherwise = big(y:xs)
Not a huge accomplishment, but the whole list and pattern-matching
and recursion everywhere stuff takes some getting used to after
the imperative world.
- the latest interesting thing i've done is: set up a flickr account
- Experimental realization of Shor's quantum factoring algorithm using nuclear magnetic resonance
- A Gentle Introduction to Haskell 98 λ
- Rubber-hose cryptanalysis
- The Last Question
- A little example program to generate a file that is both a valid BMP image and a valid PHP script
- Why You Should Never Rewrite Code From Scratch
- I took this photo recently with my new camera, it's the best one I've taken in a long time:
- bokeh
- KODAK Guidelines for Better Photographic Composition
- photography composition articles
- Why Is The System Idle Process Hogging All The Resources?
- Happy Programmer's Day!
- Canon EOS Digital Rebel XTi kit
- Rule of Thirds
- Harry Potter and the Goblet of Fire
- Parkour
- DO NOT ABBREVIATE "THANKS", "SORRY" OR "PLEASE"
- Photoshop CS2 HDR
- Harry Potter and the Prisoner of Azkaban
- some pictures from Taiwan
- Concurrent Programming Without Locks
- Design for the Other 90%
- Passive house
- Basically you only get 3GB of vmem per process in 32-bit Linux, since the kernel uses the top GB for itself. Sorry!
-
"Of course the people don't want war. But after all, it's the leaders of the country who determine the policy, and it's always a simple matter to drag the people along whether it's a democracy, a fascist dictatorship, or a parliament, or a communist dictatorship. Voice or no voice, the people can always be brought to the bidding of the leaders. That is easy. All you have to do is tell them they are being attacked, and denounce the pacifists for lack of patriotism, and exposing the country to greater danger."
— Hermann Goering at the Nuremberg trials
- Harry Potter and the Chamber of Secrets — these books are pure fluff, but they're fun.
- The New York Times slips up on sexual math
- Back from Taiwan; the trip was amazing for a number of reasons. Kept very busy. My taiwan pictures don't do a very good job of telling the story of my trip, but there you go.
- The story of the Nestlé boycott
- Lawrence hugs harlem
- malfeasance
- ERT! — I love Matt Feazell's stick figure minicomics.
- explosm — some quality mean-spirited stick figure comics.
- Harry Potter and the Sorcerer's Stone — fun book, I'm a bit behind on the series. I finished it within 24 hours and can't wait to start the next one.
- some blog made claims that google could save the world N megawatts of computer monitor-power by changing their background to black, supposedly because black uses less power to display than white. i believe this may be the case for CRTs, but may be the exact opposite for LCDs. i will test it tonight.
- Is C++ a superset of C? What are the differences between C and C++? Can I use a C++ compiler to compile C code?
- Ethanol Hurts the Environment And Is One of America's Biggest Political Boondoggles (And Is More Expensive Than Gasoline)
- morass
- A Pound of Feathers — cars are heavier than they used to be... why? Why does a VW bug from the 2000s weight 50% more than one from the 1970s?
- Post hoc ergo propter hoc — The fallacy that correlation constitutes causation.
- pannier
- Time May Not Exist. What I've been thinking all along; our concept of time is simply a side-effect of our conscious perception; modern concepts of timekeeping are mostly arbitrary and were invented to enforce social control. Upside: You are not really late.
- subvention
- Julia and I went to Discovery's Shark Week 20th Anniversary party at Chelsea Piers in Manhattan last night; it wasn't as much fun as the Planet Earth kickoff, but hey, I'm not complaining. After the usual speeches and ads for upcoming shows we were treated to an extended sneak preview of the movie Ocean of Fear, which is a recreation of events following the sinking of the USS Indianapolis in the Phillipine Sea in 1945. This is the story made famous by Robert Shaw's Quint in Jaws; the movie is fittingly narrated by the ever-nasal Richard Dreyfuss. 800 mean went into the water, 317 came out 4 days later. The movie was engaging and well-done; two of the surviving sailors, now in their 80s, praised the account as authentic. That said, the show is graphic and frightening as Julia, clinging to my arm the entire showing will tell you, and I did see many people get up from their seat over the course of the hour. Of course, a movie about 500 men being eaten by sharks should be terrifying.
So while attending the event was a no-brainer, getting there was a bit of a challenge because of a steampipe explosion on Lexington and 41st and everything was closed off for several blocks in all directions, including Grand Central. Subways weren't running and no one was being let in on 42nd. Everything worked out fine, we simple took fewer subways and did more walking, buses and cabs than usual. By 10:30 42nd still wasn't open, but we found the north entrance on 47th and managed to catch Metro North that way.
- so awful it's beautiful:
strcspn(foo, "\n")[foo] = '\0';
- louche
- counting CPU cycles
- carterman is flying cross country. I is jealous.
- I baked my second, third and fourth loaves of sourdough bread; the second was worse than the first, third was worse than the second, and the fourth resembled the first, which remains my best effort. I assume I either haven't grown my sourdough colony long enough or it's the heavy whole wheat flour I'm using. I'm going to switch to some sort of white flour and see if I get any better results; the whole wheat bread is just way too dense.
- Ten politically incorrect truths about human nature
- I baked my first loaf of sourdough bread today. My bread consists of whole wheat flour, filtered chlorinated tap water, unsalted butter, cane sugar and rock salt. It is an attempt of mine to better understand what my food is, how it is made and where it comes from.
It actually came out as a good-looking boule; it is not quite rock-like, but it has not risen enough. It is edible but not very good; nevertheless, a start. I thought my problem was adding salt too early, so in my second loaf I added the salt 30 minutes after the initial mixing; to no avail, the second loaf is identical to the first, except it looks worse :-/. I've been letting the loaves rise for about 3-4 hours, I think for the third loaf I will try letting it rise overnight.
- Discourse on Method and Meditations on First Philosophy
- I built and tested a simple, ugly, working(!) version of a penny alcohol backpacking stove using 2 old beer cans, a leatherman and of course, a penny in about 10 minutes. I'm working on building a nicer version, and I still need a stand for the pot so I can test boiling water.
- Last night I took the plunge and made some pancakes from my sourdough starter using rusty's sourdough pancake recipe. They proved edible, a major success!
- Growing and Harvesting Wheat by Hand
- Weather in Sfax, Tunisia
- Running on Emptiness
- What Else Is New? How uses, not innovations, drive human technology.
- Microbial Fermentations
- Sourdough Bread: How To Begin
- The Lambda Papers
- One Perfect Day
- sourdough bread
- How to move a subversion repository
- dwelling portably
- How to wake up from the american dream
- Dark Days
- Spot The Fake Smile
- Red-Hot Filthy Library Smut
- sourdough starters faq
- Latin Tags and Phrases
- Someone came into freenode's ##c with a good question: what is the output of the following code snippet and why?
char s[]="\12345s\n"; printf("%u", (unsigned)sizeof s);
- Polymers Are Forever
- Pyramid scheme
- Blackout 2003 NYC
- How To Drop Out
- Ishmael — An enlightening, mind-stretching book about how things got to be this way in regards to the dominant human world culture.
- refresh your high school math skills
- GPU Hacking
- Karatsuba multiplication
- Rare Risks Breed Irrational Responses
- Fallacy Files
- Fallacies
- History of the Universe
- Voluntary Milking Station
- The Beez' speaks
- Eating Bees — Why Does It Take So Long To Answer a Simple Question? A fictional behind-the-scenes account of how bugs get fixed, or not, in the MMORPG industry.
- The Hat Problem
- HDR software & plugin
-
Bought a new cam'ra.
I took some photographs of
everything but it.
- John Frum and the cargo cults
- Inside the digital dump
- Subversion Repository Replication
- Windows Domain Authentication for Subversion
- Stable API Nonsense
- I need to implement this page as a priority queue, or multiple queues instead of a single general queue. Important stuff always gets pushed down too fast.
- Cisco PIX Firewall Command Reference, Version 6.3
- Exploit chaining
- PowerTOP
- map of canada
- How to troubleshoot a PC that won't turn on
- New Space Telescope Will Outdistance Hubble
- What's wrong with IEEE 754 Floating Point?
- Boxely
- DNA Alignment - A Problem in Computational Biology
- The fallacy of wishful thinking
- The world goes to town
- How does Linux execute my main()?
- Non-blocking BSD socket connections
- OMGSTATS! is back up.
- How to tie the 10 most useful knots
- I've been too busy reading lately to even keep up listing books, here's what I've been up to:
- Evolution: The Computer Tree
- Mod Function and Negative Numbers
- Hypercube
- The Year Without a Summer
- Fluorescent Blub Break Creates Costly Hassle — A woman broke a compact fluorescent lightblub (CFL) while installing it in her daughter's bedroom.
- <studdud> what the fuck is wtf
- Calculating digits of π
- Fundamental Forces
- The Great Computer Language Shootout — it's funny to see languages live up to their reputations: C is fast, Ruby is slow, Erlang is amazingly concurrent and sucks at everything else.
- Wargames: Vortex
- TODO: Add two-way pipes into bash. Why? Because it would be convenient to be able to hook 2 programs together. perhaps use socketpair() instead of pipe()?
- BOINC
- Prex Embedded Real-time Operating System
- <Nomenumbra> 0 bottles of beer on the wall, 0 bottles of beer, you take 1 down, pass it around, 4294967295 bottles of beer on the wall.
- Consistent Hashing
- IBM's Millipede data storage project — effectively massively parallel nanoscale punchcards. Don't drop them.
- A while ago I was planning on a multimedia web spider/search engine and thought of using surfer's web browsers as a platform for offloading some extra processing, so that users would end up doing some work... oh well, someone already thought of that, in a security context: Tool turns unsuspecting surfers into hacking help
- Gigabit Ethernet Jumbo Frames and Why You Should Care
- 'Devastating' Moyers Probe of Press and Iraq Coming
- Principles of the American Cargo Cult
- Teach Yourself Programming in Ten Years
- The Rise of "Worse is Better"
- Microsoft (probably) uses the abs function patented by Sun
- How Security Companies Sucker Us With Lemons
- At the end of the day it's not what you add but what you take away.
- SymbOS — a desktop OS for Z80
- Reading Code From Top to Bottom
- Writing portable device drivers
- Gravity Probe B
- Pendulum: A Reversible Computer Architecture
- Incompatibilities Between ISO C and ISO C++
- Red-black tree
- How Microsoft Lost the API War
- A High-Tech Worker's Guide to Globalization's Myths
- Calling a DLL with C#
- AdvancedPageReplacement
- VS Electronics and Embedded Development
- Automatic Generation of Peephole Superoptimizations
- HigherHalfBareBones
- Ridiculous times call for ridiculous actions.
- Working For the Man
- Intel x86 Function-call Conventions - Assembly View
- int2bin.c
These are seperate functions all performing the same task: converting a 32-bit unsigned integer into its ASCII-ized
binary representation (i.e. 0x01234567 -> "00000001001000110100010101100111"); decToBin() was a naive implementation and
I optimized for speed from there. I applied some things I've really only truly learned recently, such as the speed of
table lookups and the speed of branchless algorithms; I further learned that GCC can do things like completely optimizing
any mention of memcpy() away while still performing its operations(!). I also learned that it's much easier to give GCC
good C code and let it generate the asm than try and second-guess it, at least in this case.
$ ./int2bin
20000000 iterations:
function seconds speedup
decToBin 1.211 0%
int2bin tiny 1.217 -0%
int2bin 0.255 376%
int2bin_unroll 0.255 376%
int2bin32 0.235 415%
int2bin32_unroll 0.230 427%
- High Availability with Open Source
- Exokernel
- Contiki OS
- Apple least eco-friendly electronics company
- A port of the MINIX OS to the PowerPC platform
- beep
- sonicvision
- CS 162 Operating Systems and System Programming Podcasts
- A discussion of virtualization and performance
- Materials Studio
- Uncyclopedia
- Hacker's Delight
- So today someone mentioned that the fastest way to compute a "popcnt" in an 8-bit unsigned integer was a lookup table. I was familiar with the popcnt methods using "sideways addition" in the AMD Optimization Manual and Bit Twiddling Hacks. I wondered how the different methods compared speed-wise, so I tested them. Long story short: table lookup for an 8-bit int was 50% faster than the popcount magic. I wondered how they compared using 32 bits, and lo-and-behold, calling the table method 4 times was 25% slower than the equivalent 32-bit parallel popcount... but I modified the table lookout to do 2 16-bit lookups instead of 4 8-bit lookups, and it is indeed about 40% faster than the pop count, thus relegating the magic to situations like an embedded device where resources are very constrained, or where it is used to initialize a 65536-item table lookup (similiar to how asymmetric public key crypto is used to bootstrap the faster symmetric algorithms in SSH).
/* 32-bit parallel population count */
int popcnt(uint32_t v)
{
v = v - ((v >> 1) & 0x55555555);
v = (v & 0x33333333) + ((v >> 2) & 0x33333333);
return ((v + (v >> 4) & 0xF0F0F0F) * 0x1010101) >> 24;
}
- Detecting the Presence of Virtual Machines Using Local Table Data
- Advanced Bash Scripting Guide
- Bash Reference Manual
- fail2ban
- PageReplacementRequirements
- Aggregate MAGIC
- Is Assembly Programming Still Relevant, Today?
- How to locate an Oops
- Slobs are more productive. Finally, vindication.
- Multiprocessor Support for Event-Driven Programs
- When porting apps to different platforms, one always delights in discovering errors of which up until that point they had never heard.
- Father of FORTRAN dead at 82. Also the 'B' in BNF, the format used for expressing structured grammars in, among other things, RFCs.
- I'm sure I'm not the first one to figure this out, but a very handy way of transferring files between 2 machines using only a shell and netcat is to run
nc -l -p someport > somefile on the receiving side and
nc -q0 somehost someport < somefile on the sending machine.
Handy where you can get a limited shell environment on the receiving side but not much else.
- So I have this app I wrote and I wanted to get it working on a MIPS platform. Well it turns out that the Linksys WRT54G uses a MIPS processor, how convenient. Once you get a shell on the WRT54G and compile a uclibc toolchain then you can cross-compile apps from your x86 (ok, Intel, IA-32) box, scp them to your WRT54G and then let them crash! Wonderful.
So my app uses libevent; I found that it segfaulted at event_init(); not good. Turns out the WRT54G doesn't have epoll of course, so you need to set the environmental variable EVENT_NOEPOLL. So now:
EVENT_NOEPOLL=1 ./myapp
crashes some more. Whoops, it's crashing when I call libc's getopt() to parse cmdline options (i.e. main()'s argc and argv). This should just work. Turns out that certain versions of uclibc corrupt argc and argv... yikes, nothing is sacred.
- Linux and symmetric multiprocessing
- OpenBSD has its second remote exploit in 10 years.
This is significant because the OpenBSD people put security first above all else; they audit their own code and other people's code and have produced some nice features and projects, notably OpenSSH, strlcpy and strlcat, PF and their secure heap. I think what this tells me is that one can be fanatical about security and still let insecure code slip through. This again makes me think that monolithic kernel design is flawed because it does not account for human error.
- They Write The Right Stuff
- Zero-Defect Software Development
-
export PATH=/opt/mipseltools/bin/:$PATH;
./configure --host=i686-pc-linux --target=mipsel-linux --build=mipsel-linux;
make CC=/opt/mipseltools/bin/mipsel-linux-gcc
- Distributed Operating Systems: A high-quality, interesting look at operating system design, distributed algorithms, etc. from Mr. Tanenbaum.
- Kekexili chronicles the battle between volunteer wildlife rangers and ruthless antelope poachers in the Kekexili region of the Tibetan plateau. It is a difficult story told in a beautiful way. I have been told "All Chinese movies are the same: slow, deep and sad." I think I agree, and I think that is why I like them.
- The ethical dilemmas of robotics
- Creating Libraries
- < Zhivago> lord: I don't tell people not to use C -- I tell people that C is a horrible language.
- Content-addressable memory
- Waterfall model of software development
- What is linux-gate.so.1?
- kernel preemption - to enable or disable?
- Software development is a never-ending series of failure punctuated by occasional, brief success.
- Wireless Tools for Linux i.e. iw*
- The Infinity Machine — very interesting thought experiment, though I think the choice of programming language is way off track ;)
- All environment variables which affect CVS
- Planet Earth miniseries
- Getting Started with OpenSolaris using VMWare
- modular system programming in minix 3
- Construction of a Highly Dependable Operating System or Why Do Operating Systems Crash?
- minix 3 — as the size and complexity of software increases, so it must be split into smaller and smaller pieces in order to remain maintainable. I believe that monolithic kernel design (all drivers in the kernel) simply cannot ever be reliable, given the huge amount of driver code and the difficulty of perfecting them. I believe that microkernel designs are the long-term way forward.
- On Linux Random Number Generator
- The Problem with Threads
- Babel was intimate, tragic and touching.
- Know Your Enemy: Web Application Threats
- JOINT STRIKE FIGHTER AIR VEHICLE C++ CODING STANDARDS FOR THE SYSTEM DEVELOPMENT AND DEMONSTRATION PROGRAM
- Y2K-like fears create shuttle scheduling crunch
- $10 wok keeps station on the air
- A Gentle Introduction to Haskell
- The Future of Food — an in-depth investigation into the disturbing truth behind the unlabeled, patented, genetically engineered foods that have quietly filled grocery store shelves for the past decade.
- Failure Trends in a Large Disk Drive Population
- Papervision3D — a 3-D engine for Flash.
- People seem to not understand the effects of global warming. The average global temperature changes, in terms of how humans experience temperatures in daily life, are unnoticably small, fractions of a degree, over the period of years. I wouldn't even notice if someone changed my thermostat by fraction of a degree (but I would notice if my freezer went from being -0.1°C to +0.1°C).
Global warming doesn't mean there will never be a snow storm, and every time it's hot it is not because of global warming. Global warming directly affects large things, things on a scale that an average person does not directly experience, which is one obstacle to understanding it. It won't necessarily affect your A/C bill this summer or your suntan; it affects the oceans, which in turn affect temperatures, weather patterns and wildlife, among others. In turn these affect things that you do care about, like whether or not your beachfront property is still beach in 50 years, whether or not your house gets torn apart by a hurricane or whether or not your country can grow enough crops to feed its people.
- Pirates at the Multiplex — Vanity Fair covers The Pirate Bay
- I've had it with libxml. Not only is the C API ugly and confusing, but there is apparently no way to have it handle a stream of XML, without lots of ugly hacks and glue. Why? I thought the point of XML was standardized data exchange. Why even bother... so I'm not. I'll write my own ghetto ASCII-only stream-based XML parser with a decent interface, standards be damned. At least I'll be able to frickin' use it.
- Windows XP does not handle multiple monitors correctly, at least not on my Dell Inspiron 8200. When WinXP boots up and I have an external monitor plugged in, it will randomly select that or my native screen, seemingly at random, even though it is configured correctly. My solution thusfar has been to either get lucky or reboot and disconnect and reconnect the external monitor.
- Jeff Han demonstrates multitouch user interface. This stuff is really beautiful, and I believe this is how everyone will be working 20 years from now (and the military 5 years from now, if not already), hopefully sooner. Of course, those wall-sized screens won't be cheap.
- Bump Key HOWTO
- Observer pattern
- web elements
- Slab allocation
- The New York Hall of Science just opened an exhibit GENOME. Now, I was lousy at biology and science in general, but upon reading up on genes and DNA their structure reminded me a lot of a computer program.
- Been playing with libevent lately, it's a nice interface for non-blocking I/O that fits on top of lots of non-nice, unportable interfaces of various *NIXs and WIN32.
- Home box has been broken lately. I tried a bunch of stuff, but alas... it appears to have been a faulty stick of RAM I just pulled out. Everything is OK if you pull out in time.
- Jose's Mexican-style Guacamole
- IPCC's Climate Change 2007: The Physical Science Basis
- calling an external program in C (Linux)
- The Free Lunch Is Over: A Fundamental Turn Toward Concurrency In Software
Not quite sure I buy the concept that ubiquitous multi-core machines will revolutionize how software is written.
Small utilities will continue to be single-threaded like today, and large complex applications like database servers and
sophisticated graphics applications will continue to use multiple threads and multiple interconnected programs, as they do today.
The power of breaking up complex processes into small interconnected pieces never really hit me until I read Google's
original whitepapers on the design of their search engine (with an eye toward replicating it). It really is "just"
20th century algorithms used arranged in a 19th century assembly line model — but it's so powerful.
- older stuff is in the archive...
|
Reading:
Queue:
Want:
|