Mass rename/move to get rid of Haskell stuff

This commit is contained in:
Chris Hodapp
2020-04-11 22:25:33 -04:00
parent 9bd5a8ff13
commit 0aabd0267d
412 changed files with 36 additions and 10590 deletions

68
content/about/index.md Normal file
View File

@@ -0,0 +1,68 @@
---
title: About Me
author: Chris Hodapp
---
## Shorter version
Engineer, artist, programmer, mathematician, photographer.
Also, freelancer for hire; find me on LinkedIn, Facebook, or IRC.
## Longer version
I've been using computers to create things since I realized that this
was possible. I had the good fortune to have a computer at age 6 and
an older brother who showed me MS-DOS,
[POV-Ray](http://www.povray.org/), NeoPaint, and BASIC. This,
combined with video games like Doom, drove my early interest in
graphics, 3D rendering, and programming.
This progressed to an interest in mathematics, algorithms, and
programming language theory. I also got a digital camera in late
2003, and added photography to that list. Since then, I've been
fascinated with the use of algorithms that create and transform
images - for the sake of visualizing data, creating art, image
processing, and computer vision. (The use of algorithms for creating
and transforming sound also fascinated me, and I read and dabbled
extensively here, but my utter ineptitude at music put a damper on
this.)
I studied electrical engineering at University of Cincinnati, and
while there was a co-op at [Etegent](http://www.etegent.com/),
continuing there full-time when I graduated in 2010. I did some
interesting work there combining software development and research
around signal processing, image processing, and computer vision.
While at UC, I happened into some [cinci2600](https://cinci2600.org/)
meetings and eventually became a founding member of [Hive13][]. I'm
regularly found there, and on occasion give talks.
Around 2014 I moved to a startup, Urbanalta, and here I designed PCBs
and wrote embedded software. This is where I started using Haskell
more intensively on the embedded side, eventually co-creating
[HaskellEmbedded][] and the [Ion][] library. I regularly attend
[CincyFP](https://cincyfp.wordpress.com/) and occasionally give
presentations, such as
[this one](https://haskellembedded.github.io/posts/2015-06-09-atom-cincyfp-slides.html).
I am now studying for a masters in computer science (specializing in
machine learning) at Georgia Tech. I'm also freelancing in the area
of electronics and embedded software, but open to other areas:
software development, photography, rendering, computer vision,
computational photography, machine learning.
## Other profiles & identities of mine
- [My résumé](../assets/resume.pdf)
- `hodapp` on [freenode](https://freenode.net/) IRC
- [GitHub (hodapp87)](https://github.com/hodapp87)
- [Flickr (hodapple)](https://www.flickr.com/photos/hodapple/)
- [Twitter (\@hodapp87)](https://twitter.com/Hodapp87)
- [LinkedIn](https://www.linkedin.com/in/chris-hodapp-0440959?trk=hp-identity-photo)
- [Facebook](https://www.facebook.com/hodappcm)
- [HaskellEmbedded][], a site I co-founded and contribute to
[HaskellEmbedded]: https://haskellembedded.github.io/
[Ion]: https://haskellembedded.github.io/
[Hive13]: http://hive13.org/

49
content/links/index.md Normal file
View File

@@ -0,0 +1,49 @@
---
title: Links
---
# Notes & Projects from Georgia Tech OMSCS
I've done my best to follow the Academic Honor Code here, and keep
assignments or project material to what was explicitly allowed to be
public (e.g. the final project for CS6475, or the code itself for
CS7641 and not the report). Please let me know if I missed anything.
- [CS6476 (Computer Vision)][cs6476]
- [Scanned notes](../assets_external/cs6476-notes.pdf)
- [CS6475 (Computational Photography)][cs6475]
- [Scanned notes](../assets_external/cs6475-notes.pdf)
- [Final project](https://github.com/Hodapp87/cs6475_neural_style)
- [CS7641 (Machine Learning)][cs7641]
- Scanned notes from three mini-courses:
- [SL: Supervised Learning](../assets_external/cs7641-notes-sl.pdf)
- [UL: Unsupervised Learning & Randomized Optimization](../assets_external/cs7641-notes-ul.pdf)
- [RL: Reinforcement Learning & Decision Making](../assets_external/cs7641-notes-rl.pdf)
- [Assigment 2 code](https://github.com/Hodapp87/cs7641_assignment2)
- [Assigment 3 code](https://github.com/Hodapp87/cs7641_assignment3)
- [Assigment 4 code](https://github.com/Hodapp87/cs7641_assignment4)
- [CS8803-O03 (Reinforcement Learning & Decision Making)][cs8803o03] (now CS7642)
- [Scanned notes](../assets_external/cs8803-rldm-notes.pdf)
- [CS7646 (Machine Learning for Trading][cs7646]
- [Scanned notes](../assets_external/cs7646-ml4t-notes.pdf)
- [CS6505 (Computability, Complexity, & Algorithms)][cs6505]
- [Scanned notes](../assets_external/cs6505-notes.pdf)
- [CSE6242 (Data & Visual Analytics)][cse6242]
- [Scanned notes](../assets_external/cse6242-notes.pdf)
- [CS6460 (Educational Technology)][cs6460]
- [CS6601 (Artificial Intelligence)][cs6601]
# Papers
- [Unsupervised Learning for Computational Phenotyping](https://arxiv.org/abs/1612.08425) and
the associated code at <https://github.com/Hodapp87/mimic3_phenotyping>
[cs6476]: https://www.omscs.gatech.edu/cs-4495-computer-vision
[cs6475]: https://www.omscs.gatech.edu/cs-6475-computational-photography
[cs7641]: https://www.omscs.gatech.edu/cs-7641-machine-learning
[cs8803o03]: http://www.omscs.gatech.edu/cs-8803-special-topics-reinforcement-learning
[cs7646]: http://www.omscs.gatech.edu/cs-7646-machine-learning-trading
[cs6505]: http://www.omscs.gatech.edu/cs-6505-computability-algorithms/
[cse6242]: https://www.omscs.gatech.edu/cse-6242-data-visual-analytics
[cs6460]: http://omscs6460.gatech.edu/
[cs6601]: http://www.omscs.gatech.edu/cs-6601-artificial-intelligence

View File

@@ -0,0 +1,13 @@
---
author: Chris Hodapp
comments: true
date: 2008-03-22 14:23:17+00:00
layout: post
slug: hello-world-2
title: Hello world!
wordpress_id: 498
categories:
- Journal
---
Welcome to [WordPress.com](http://wordpress.com/). This is your first post. Edit or delete it and start blogging!

View File

@@ -0,0 +1,40 @@
---
author: Chris Hodapp
comments: true
date: 2008-03-24 23:20:55+00:00
layout: post
slug: workfest-with-christian-appalachian-project-day-one
title: Workfest with Christian Appalachian Project, day one
wordpress_id: 37
categories:
- Journal
tags:
- christian appalachian project
- Photos
- workfest
---
{{< load-photoswipe >}}
It's quite different.
People are open. Their groups are open.
It's a difference between being pushed away from people constantly, and being pushed toward them, so one does not constantly need to fight back against the repulsion.
Maybe it's the types of people. Maybe it's the environment. But it's wonderful. Maybe similar to the way I felt in Seattle when I visited there last year.
Months in Cincinnati and I might never meet a new friend... hours here and I've made several already.
It's good to see Lea for a change, instead of just emailing. Corrie's also very friendly, and so are most of the other people from the class for that matter. Max and Dan tolerate me being around them, which is good when they're the only two that I have talked to much.
People I've seen so far just look like generally very good people - honest and practical and benevolent and grateful, and not trying to escape or cheat the system for their own greed. Put them in certain cities, and maybe that would emerge - but they're here.
They're out of that context. They look like they're in the context they belong.
My Canon camera is probably almost out of battery power, despite efforts. I should have brought the charger. But I have the Kodak too. Maybe it will show some of the picturesque terrain.
{{< figure src="/wp_old/2008/03/img_6262.jpg" caption="Camp AJ from one angle">}}
{{< figure src="/wp_old/2008/03/img_6253.jpg" caption="Arriving at Camp AJ">}}
{{< figure src="/wp_old/2008/03/img_6265.jpg" caption="Playground and climbing wall near entrance road">}}
(Later note: That is [Camp AJ, 2549 Sand Lick Rd, McKee, KY 40447](https://www.google.com/maps/dir/Cincinnati,+Ohio/Berea,+Kentucky/Camp+AJ,+2549+Sand+Lick+Rd,+McKee,+KY+40447/@37.488284,-84.0115257,16z/data=!4m19!4m18!1m5!1m1!1s0x884051b1de3821f9:0x69fb7e8be4c09317!2m2!1d-84.5120196!2d39.1031182!1m5!1m1!1s0x8842e18aa160b579:0xd32df1c2b2266672!2m2!1d-84.2963223!2d37.568694!1m5!1m1!1s0x884315ccbd7d479b:0x28e72c53d5d60a9d!2m2!1d-84.00718!2d37.4887543).)

View File

@@ -0,0 +1,44 @@
---
author: Chris Hodapp
comments: true
date: 2008-03-25 01:53:54+00:00
layout: post
slug: workfest-day-two
title: Workfest, day two
wordpress_id: 43
categories:
- Journal
tags:
- christian appalachian project
- Photos
- workfest
---
Proceed with first work day.
Due to loud snorers and periodic heater-startup and my cell phone failing to be a usable alarm after its batteries drained in standalone mode for no apparent reason, causing me to believe it was 6 AM when it was probably around 2 AM . . . I had very little sleep, and woke up pretty groggily and felt like eating nothing and doing nothing.
This wore off pretty easily once I was at the work site with my crew. I was working with Corrie at first, and she was cheerful and this helped; Connie, the owner of the house we were helping repair, was also extremely kind to us.
Most of my morning consisted of putting up fanfold insulation on some walls. Despite constant hammer-pounding and cold, it was pretty peaceful, maybe calming (in a "stage crew" sort of way, like in high school when I discovered that painting flats and beating the crap out of things with hammers was very stress-relieving)... though tiring for my hands and arms.
It reminded me a bit of working on the grounds department at KMCN, except that the surrounding area was miles of country, not just a collection of flowerbeds and trees in the city. I will need to bring my camera and get some pictures of the rooms loading there, as well as the house and its environment.
A bluegrass band (Phillip Akemon and Flatlick) also came tonight. They were very good; I have a few pictures and short video clips (though Kirsten probably has most of it in a much higher-quality format).
I was talking to Lea and she told me she hated being around some of the Christians here... I don't totally blame her, even if I don't have the same view (yet). My view is that they are having a very positive outcome, and if they have to believe what they believe to achieve it, then so be it. They aren't pushing beliefs on anyone else, so I can't really criticize much.
[![30 PM?](/wp_old/2008/03/6282.jpg)](/wp_old/2008/03/6282.jpg)
Phillip Akemon
[![Phillip Akemon](/wp_old/2008/03/6285.jpg)](/wp_old/2008/03/6285.jpg)
Mike Morgeson
[![Mike Morgeson](/wp_old/2008/03/6289.jpg)](/wp_old/2008/03/6289.jpg)
Kevin Amburgey & Phil
[![Kevin Amburgey & Phil](/wp_old/2008/03/img_6291.jpg)](/wp_old/2008/03/img_6291.jpg)
Phil & Phil Jr.
[![Phil & Phil Jr.](/wp_old/2008/03/6292.jpg)](/wp_old/2008/03/6292.jpg)

View File

@@ -0,0 +1,48 @@
---
author: Chris Hodapp
comments: true
date: 2008-03-26 04:07:10+00:00
layout: post
slug: workfest-day-three
title: Workfest, day three
wordpress_id: 49
categories:
- Journal
tags:
- christian appalachian project
- Photos
- workfest
---
Well, scratch that part in the last entry about not pushing beliefs.
I slept like a rock (as MJ predicted), woke up groggily, and started another day. Work was a bit slow at first because my wrist was sore and it was hard to hammer, but everyone was pretty productive in general.
Deacon Gregory gave a long, slightly unexpected sermon at lunch today, which I disagreed with a lot of, but thought it a bit inappropriate if I spoke out and had no one on my side (though Corrie said later that she didn't like it much either). So, Lea perhaps was right.
I also had some odd discussions with Max, Dan, and Paul. I've been trying to talk with everyone from UC, but I haven't see Lizzie or Holly much. Aside from that, I've tried to talk to some people in my crew and just around camp. Lolita has seemed to keep her distance from the rest of the crew (just as a general tendency, not like active avoidance), but she's very friendly. We walked around for 10-15 minutes to shoot pictures of the landscape and a nearby family cemetery.
A speaker came to talk about poverty when the camp met after dinner. I don't recall much of this because I was dead tired, and the room was very hot and making me ready to pass out. Everyone from UC met after that, and Lea made a point that many of the volunteers were very ignorant in general and this bothered her (such as when they'd say things that were insulting to her and her heritage).
I wandered in the cafeteria after that and eventually got Corrie, Dan, and Max to play Thirteen (the card game that my brother showed me days prior, and almost a year prior in Seattle). Paul replaced Max when he wanted to play euchre with another group instead, and William joined in; his girlfriend Laura wanted to play but then she was distracted looking at pictures on my camera and then reading a paper/magazine/something. We played about 3 or 4 hands before everyone else was too tired to play, so they left. I think they liked the game, but it's hard to tell for sure.
I took a ton of pictures today... my 512 MB card is almost full in my Canon, but I have my 128 and 32 MB cards, and my old crappy Kodak with 512 and 64 MB cards. I am surprised the batteries have lasted so far in the Canon, as they've been at "low" since the first day.
I understood some of what Jen Eich said months ago about being able to volunteer for a year without racking up debt - much of the staff lives in a sort of coop under CAP, with most expenses covered (like housing, insurance, and utilities) and a $150/month stipend. It looks very nice - if one is suitably dedicated.
Early stages of the deck:[![Early stages of the deck](/wp_old/2008/03/6306.jpg)](/wp_old/2008/03/6306.jpg)
[![Deck from the other side](/wp_old/2008/03/6318.jpg)](/wp_old/2008/03/6318.jpg)
Corrie & Christine putting up soffit
[![Corrie & Christine putting up soffit](/wp_old/2008/03/6310.jpg)](/wp_old/2008/03/6310.jpg)
[![Nearby road](/wp_old/2008/03/6338.jpg)](/wp_old/2008/03/6338.jpg)
[![Family cemetery](/wp_old/2008/03/6341.jpg)](/wp_old/2008/03/6341.jpg)
[![Some kitten](/wp_old/2008/03/6348.jpg)](/wp_old/2008/03/6348.jpg)

View File

@@ -0,0 +1,46 @@
---
author: Chris Hodapp
comments: true
date: 2008-03-27 21:45:58+00:00
layout: post
slug: workfest-day-four
title: Workfest, day four
wordpress_id: 56
categories:
- Journal
tags:
- christian appalachian project
- Photos
- workfest
---
Typical morning, finishing up of some work, watching a deck get assembled...
After that we went to a church about 30-40 minutes away and had dinner with the families whose homes we were repairing. Some people got up to talk and expressed a lot of gratitude in general.
Sometime on the drive back to camp with the rest of my crew, we all basically lapsed into some mix of a sugar-high combined with slap-happiness, and we were laughing and screaming the whole way back over really nothing in particular, fueled by the occasional 55-mph tight turn with a bus and semi truck in the other lane, and random songs on the radio (which otherwise had been off until now). Ma'Isah randomly grabbed me during her overdramatic dancing to "Rescue Me," which was a bit odd, but also quite funny.
Once back at camp, the colleges split up to meet, and it seemed everyone from UC was just as slap-happy and high on sugar/caffeine/whatever. They already were laughing at MJ (or maybe with him) about some conversation revolving around underwear or something I completely missed, and the meeting was just a sort of continuation of that. We attended to all needed business, like evaluation forms that we had to fill out - we just happened to be laughing the entire time. Kim, for instance, saw that I had written "cute fluffy kittens" on the part of the form where I was supposed to note a high point of the trip, and she confused "kittens" with "mittens" and then proceeded to laugh her ass off for about 5 minutes.
She also asked the group if they thought they'd like to meet afterward sometime just to get ice cream or something, because we all seemed to be enjoying being around each other and it would be weird to suddenly leave and cease to meet again. Holly also asked who'd like to return to Workfest next year, and MJ suggested talking to honors at UC about that, as people didn't have to come as part of a class - it could just be a university function.
It's odd... it's like we all started meshing and being friends.
It's miles apart from other environments I've been in, where I had suspicion that it was not my fault that I couldn't enter people's social boundaries and felt that they were putting up walls to keep me out. Sometimes those suspicions would leave and I'd blame myself for being who I am, but if I have no trouble befriending multiple people over a few days, I must be doing something right.
Photos:
[![Sky in the morning](/wp_old/2008/03/img_6359.jpg)](/wp_old/2008/03/img_6359.jpg)
We were repairing Connie's house; this photo has Andy (one of the crew leaders), Connie, and Heather (Connie's daughter)[![Andy, Connie, Heather](/wp_old/2008/03/6389e.jpg)](/wp_old/2008/03/6389e.jpg)
More progress on the deck[![More progress on the deck](/wp_old/2008/03/6369e.jpg)](/wp_old/2008/03/6369e.jpg)
Random cat that would hang around[![Random cat with no tail](/wp_old/2008/03/6367e.jpg)](/wp_old/2008/03/6367e.jpg)

View File

@@ -0,0 +1,32 @@
---
author: Chris Hodapp
comments: true
date: 2008-03-28 00:45:08+00:00
layout: post
slug: workfest-day-fourfive
title: Workfest, day five/sixish
wordpress_id: 63
categories:
- Journal
tags:
- christian appalachian project
- Photos
- workfest
---
I was too busy/asleep to write much of an entry, so I'll just post the few photos I have from the last two days.
Almost-completed deck[![Deck, almost finished](/wp_old/2008/04/6422e.jpg)](/wp_old/2008/04/6422e.jpg)
[
](/wp_old/2008/04/6422e.jpg)
Crate of [Ale-8-One](http://www.ale8one.com/) donated by someone whose name I forget[![Crate of Ale-8-One](/wp_old/2008/04/6425e.jpg)](/wp_old/2008/04/6425e.jpg)
Pastries which Andy took a lot of time preparing for breakfast [![Pastries that Andy put a lot of work into](/wp_old/2008/04/k6584e.jpg)](/wp_old/2008/04/k6584e.jpg)

View File

@@ -0,0 +1,51 @@
---
author: Chris Hodapp
comments: true
date: 2008-03-31 22:48:15+00:00
layout: post
slug: stuff-i-experienced-at-work-today
title: Stuff I Experienced At Work Today
wordpress_id: 61
categories:
- Journal
---
1. Declared myself a complete asshat for writing a blog about nothing
2. Declared myself a lazy bastard for using iTunes to subscribe to podcasts to put on my iPod and listen to while driving in to work. Whatever, I get sick of Clearchannel and raving right-wing lunatic talk radio.
3. Broke the printer after two pages
4. Discovered that while both my managers described the intern who had just left as essentially clueless, she had decorated the cubicle in interesting tiny artworks made with post-its and highlighter, like this:
![](/wp_old/2008/04/cubicleart.jpg)
5. Was very glad that I took 2 hours several months ago to document WTF I was doing when I left, because I certainly did not remember
6. Was told I needed to cut my hair, which is true
7. Heard the random Canadian guy comment about all the snake-handling that he thinks goes on in Appalachia (and the venom from those snakes, he claims, is from female brain cells)
8. Was mistaken for someone who cared during some discussion about why baseball and the Cincinnati Enquirer suck
9. Read [The Democratization of the Music Industry](http://www.huffingtonpost.com/jeff-price/the-democratization-of-th_b_93065.html) by Jeff Price
10. Read about [TuneCore](http://www.tunecore.com/) of which Jeff Price is the CEO... it would be more interesting to me if I actually created any music to sell on it
11. Read about [gizmo](http://gizmo5.com/pc/products/desktop/) which my friend described as like Skype, but better.
12. Basically nothing

View File

@@ -0,0 +1,36 @@
---
author: Chris Hodapp
comments: true
date: 2008-04-04 00:06:22+00:00
layout: post
slug: alexander-blu
title: Alexander Blu
wordpress_id: 66
categories:
- Scratch
tags:
- Music
---
[![Alexander Blu - May](/wp_old/2008/04/may-150x150.jpg)](/wp_old/2008/04/may.jpg)[![Alexander Blu - Moderato](/wp_old/2008/04/moderato-150x150.jpg)](/wp_old/2008/04/moderato.jpg)
[![Alexander Blu header](/wp_old/2008/04/header2.jpeg)](/wp_old/2008/04/header2.jpeg)
**Alexander Blu**
* I had a song by this artist from 2005.08.13 (from Interconnected MusicMedia, now known as [SoundLift](http://www.soundlift.com)) which I never really listened to... but finally got around to listening to, and I found the artist is still around and writing songs.
* His personal site is [here](http://www.alexanderblu.com/). His albums are available online under the Creative Commons. He also has a decent collection of digital pictures, some videos, and slide shows.
* His description of the music: "...electro genre (Instrumental Music) with frequent use of electric guitar and Instrumental Lullabies for kids and adults in electro ambient genre. My music philosophy is that music should be relaxing and not burdening to the listener."    . . . basically lines up with how I'd describe it.
* I've listened to "Moderato" and "May" so far, but a few other albums are there as well.
_Where to get it:_  [Here](http://www.alexanderblu.com/AlexanderBlu/The%20Music/Music.htm) at his home page.

View File

@@ -0,0 +1,149 @@
---
author: Chris Hodapp
comments: true
date: 2008-04-18 00:56:59+00:00
layout: post
slug: post-its-and-scrap-notes-starting-20080403
title: Post-its and scrap notes, starting 2008.04.03
wordpress_id: 71
categories:
- Scratch
tags:
- books
- politics
- science
---
So, my bag now has a big stack of scrap notes in it, just from things I jotted down at work... these should probably go online...
**2008.04.03**
* [http://www.ucsusa.org](http://www.ucsusa.org) - Union of Concerned Scientists
* [Study: Unskilled and Unaware of It](http://www.apa.org/journals/features/psp7761121.pdf) - some notable paper
* [Ig Nobel Prize](http://www.improbable.com/category/ig-nobel/) - "Research that makes people LAUGH and then THINK"
* [Talking Points Memo](http://www.talkingpointsmemo.com/) - I don't know why I wrote this
* [Analog Devices - Blackfin](http://www.analog.com/processors/blackfin/) - 16/32-bit embedded core, 10-stage RISC MCU/DSP pipeline, full SIMD support
* [Analog Devices - SHARC](http://www.analog.com/processors/sharc/index.html) - floating-point DSP
* [Administration Asserts No Fourth Amendment for Domestic Military Operations](http://www.eff.org/deeplinks/2008/04/administration-asserts-no-fourth-amendment-domestic-military-operations) - some article from EFF
**2008.04.04**
* "Iraq and the Lessons of Vietnam: Or, How Not to Learn From the Past" - Lloyd Gardner, Marilyn Young ([Amazon](http://www.amazon.com/Iraq-Lessons-Vietnam-Learn-Past/dp/1595581499))
* [Open Media Now! foundation](http://www.openmedianow.org/) - has the goal of open media infrastructure; apparently the same guys who made [Gnash](http://www.gnu.org/software/gnash/)
* [Ohio InfoSec](http://ohioinfosec.org/)
* "The True Believer: Thoughts on the Nature of Mass Movements" - Eric Hoffer; published in 1951, discusses the psychological causes of fanaticism ([Amazon](http://www.amazon.com/True-Believer-Thoughts-Movements-Perennial/dp/0060505915))
* [IBM Power6 at 4.7 GHz benchmarks](http://www.tomshardware.com/forum/239162-28-power6-7ghz-benchmarks)
**2008.04.09**
* [David Allen, Getting Things Done and GTD](http://www.davidco.com/) - some sorta organizational system that NPR's podcast from 2008.02.20 mentioned
**2008.04.11**
* [Ken Miller](http://www.millerandlevine.com/km/evol/) - biology professor, notable for combining evolution with belief in God and rejecting creationism and intelligent design; wrote "Finding Darwin's God: A Scientist's Search for Common Ground Between God and Evolution" ([Amazon](http://www.amazon.com/Finding-Darwins-God-Scientists-Evolution/dp/0060930497/ref=sr_11_1?ie=UTF8&qid=1208479139&sr=11-1))
**2008.04.16**
* "Outline of Intellectual Rubbish" - Bertrand Russell ([e-text here](http://www.solstice.us/russell/intellectual_rubbish.html))
* "The Shock Doctrine: The Rise of Disaster Capitalism" - Naomi Klein ([personal site](http://www.naomiklein.org/shock-doctrine), [Amazon](http://www.amazon.com/Shock-Doctrine-Rise-Disaster-Capitalism/dp/0805079831))
* same author: "No Logo: No Space, No Choice, No Jobs " ([Amazon](http://www.amazon.com/No-Logo-Space-Choice-Jobs/dp/0312421435))
* "The End of America: Letter of Warning to a Young Patriot" - Naomi Wolf... for a bit more apocalyptical point of view ([Amazon](http://www.amazon.com/End-America-Letter-Warning-Patriot/dp/1933392797/ref=pd_lpo_k2_dp_k2a_3_txt?pf_rd_p=304485601&pf_rd_s=lpo-top-stripe-2&pf_rd_t=201&pf_rd_i=0312421435&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=02T588HAKSC426C3JPNX))
* "War is a Racket" - Major General Smedley D. Butler - booklet/speech from 1930's ([e-text here](http://www.lexrex.com/enlightened/articles/warisaracket.htm))
* [MUCS-PCB](http://intranet.cs.man.ac.uk/apt/projects/tools/mucs-pcb/) - PCB design software (GPLed) from University of Manchester
**2008.04.17**
* [www.linuxcnc.org](http://www.linuxcnc.org) - software to let a PC control a CNC machine; according to archivist in #electronics on Freenode, this can use a parallel port (with some level converters and optoisolators) to control four stepper motors, and the CNC itself can be made from largely a lot of scrap parts

View File

@@ -0,0 +1,133 @@
---
author: Chris Hodapp
comments: true
date: 2008-04-26 04:53:30+00:00
layout: post
slug: more-scrap-notes-starting-2008-04-18
title: More scrap notes, starting 2008-04-18
wordpress_id: 72
categories:
- Scratch
tags:
- apps
- books
- Music
- politics
---
**2008.04.something**
* "True Enough: Learning to Live in a Post-Fact Society" - Farhad Manjoo ([Amazon](http://www.amazon.com/True-Enough-Learning-Post-Fact-Society/dp/0470050101)) - in a way, a more factual approach to people judging by "truthiness" rather than truth
* "Moral Politics: How Liberals and Conservatives Think" - George Lakoff ([Amazon](http://www.amazon.com/Moral-Politics-Liberals-Conservatives-Think/dp/0226467716/ref=pd_bbs_sr_3?ie=UTF8&s=books&qid=1209181316&sr=8-3)) - who knows, might be interesting
**2008.04.18**
* People that some guy labeled as "hard left": Chomsky, Tariq Ali, Gore Vidal, Howard Zinn, Naomi Klei
* Artist that I like who appears to have not released any songs in 2 years: John Schmidt ([CNet Music Library](http://music.download.com/johnschmidt/3600-8244_32-100382928.html))
* Some other artist I also marked as liking despite the generic name: Digital Trance ([Dance-Industries](http://www.dance-industries.com/view_artist.php?ID=1041))
* Artist I don't particularly like, but who has had songs in my collection for 4 years for some reason: Eye Candy ([personal site](http://www.eye-candy.info/))
* One that I liked for being "ambient, pretty soothing + flowing": Organic Frequencies ([CNet Music Library](http://music.download.com/organicfrequencies/3600-8357_32-100405391.html))
* Some artist that I like for similar reasons: Rec.Hat ([Myspace](http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=3945577), [CNet Music Library](http://music.download.com/rechat/3600-8357_32-100083306.html))
**2008.04.21**
* Glenn Greenwald ([Wikipedia entry](http://en.wikipedia.org/wiki/Glenn_Greenwald)) - apparently wrote some interesting books, criticized the corporate media, and so on.
* [Economic Mobility Project](http://www.economicmobility.org/) - "The Economic Mobility Project is a unique nonpartisan collaboration...blahblahblah... Our purpose is to provoke a more rigorous discussion about economic mobility in America by presenting new findings and research, and analyzing the effects of social, economic and human capital factors that may impact ones ability to move up the economic ladder over a generation."
* Another netlabel I like some music on: [Rohformat](http://www.rohformat.de/) (and I was listening to "flight of birds" by ronin, which I'd link to but the site is down right now)
* Artist which makes me most sad to find he has not released anything in years: LMK ([CNet Music Library](http://music.download.com/lmk/3600-8263_32-100127064.html))
**2008.04.23**
* Decent album by Easily Embarassed: [Darkened Emotion EP](http://www.cardamar.com/releases.php?release=MARP009) (free download courtesy of Cardamar Music)... I wrote "electronic, flows pretty well, beat-oriented"
* From the same source, "Another Day in the Clouds" mixed by Cardamar is good; it's available at their [mixes](http://www.cardamar.com/mixes.html) page . . . I wrote "gentle, ambient, soothing"
**2008.04.25**
* More artists: Windcheater ([Beatpick](http://www.beatpick.com/Windcheater), [Myspace](http://www.myspace.com/windcheater))
* [Beatpick](http://www.beatpick.com/), apparently, is a service that offers DRM-free music under the Creative Commons, allows people to license the music, splits profits 50/50 with the artist, allow free non-commercial use, etc.
* Another artist, also of the house genre: Zeropage ([personal site](http://www.zeropage-media.com/), [DMusic](http://zpage.dmusic.com/), and [SoundLift](http://www.soundlift.com/band/music.php?id=103006) for the tracks I originally had from 2005).
* Another artist, this one more of the trance genre: Edzes, or Andreas Bruvoll Skaarung ([CTG Music](http://www.ctgmusic.com/artist.php?id=4))
* An ambient artist that I think I like: Art of Infinity ([personal site](http://www.art-of-infinity.com/), [Myspace](http://www.myspace.com/artofinfinity)). The place I originally found him (Interconnected Musicmedia, now SoundLift) no longer has his page, but he appears to be thriving without it.
**2008.04.25**
Software I had at one point for some reason:
* [arbaro](http://arbaro.sourceforge.net/): tree generation for POV-Ray as described in ["Creation and Rendering of Realistic Trees"](http://www.cs.duke.edu/education/courses/fall02/cps124/resources/p119-weber.pdf)
* [Bliss](http://bliss.kylesblog.com/) intellivision emulator
* [DarkPlaces](http://icculus.org/twilight/darkplaces/): modified Quake engine that, for me at least, works a bit better on modern hardware and OSes than the original
* [Flock](http://www.flock.com/): "the social web browser", or, the browser that I used to use because it allowed me to do bulk uploads to Photobucket. It appears to now support a lot more, with regard to interaction with online social networks.
* [knotplot](http://knotplot.com/): plots knots... or, visualizes knots from a mathematical perspective.
* [Nosefart](http://nosefart.sourceforge.net/): Nintendo Music Player which handles NSF files from NES games.
* [ScummVM](http://www.scummvm.org/): multiplatform VM to play old adventure games, such as from LucasArts (I am probably completely butchering these terms), provided you have their data files. [Beneath a Steel Sky](http://en.wikipedia.org/wiki/Beneath_a_Steel_Sky) is one such game, now available as freeware, apparently of the cyberpunk genre.
* [Namazu](http://www.namazu.org/): full-text search engine, as in a piece of software that you can install on your own servers if you wish
* [Art of Illusion](http://www.artofillusion.org/): "Art of Illusion is a free, open source 3D modelling and rendering studio. It is written entirely in Java..." . . . I've used it to make 3D meshes for POV-Ray and it works quite well for being written in Java.

View File

@@ -0,0 +1,58 @@
---
author: Chris Hodapp
comments: true
date: 2008-05-05 01:32:43+00:00
layout: post
slug: alix1c-board-edirol-repair
title: Alix.1C board & Edirol repair
wordpress_id: 73
categories:
- Technobabble
tags:
- Hardware
- midi
---
I guess I'll repeat what some other people do, and put up blog entries about what they do with hardware...
**Alix.1C**
My [Alix.1C](http://www.mini-box.com/Alix-1C-Board-1-LAN-1-MINI-PCI?sc=8&category=754) mini-ITX board just arrived, hopefully to replace the server that's sitting in the closet collecting dust, and making a lot of noise and heat due to having 5 hard drives (all of which could be replaced by a single drive for about $30).
This board is a 500 MHz AMD Geode with 256 MB RAM onboard; it uses about 5 watts and runs from 12VDC. It has a CompactFlash header onboard, so right now I am running Linux from a 128 MB card.
[![Alix.1C](/wp_old/2008/05/6547.jpg?w=300)](/wp_old/2008/05/6547.jpg)[![Alix.1C other view](/wp_old/2008/05/6549.jpg?w=300)](/wp_old/2008/05/6549.jpg)
**Edirol PCR-M50**
My brother got me an Edirol PCR-M50 keyboard about 16 months ago. When I used it recently to mess around with [Reaktor 5](http://www.native-instruments.com/index.php?id=reaktor5_us) I found that a number of the keys had stopped working. I figured this was probably because for the past several months I'd used the MIDI keyboard primarily for putting books on top of rather than any music-related purpose, due to being in a dorm room with nowhere else to put the books. But after some online searching, it looks like a number of people have had the same issue. and it's due to some corrosion/oxidation/dirt on the contacts that the keys activate.
Some said they'd taken it apart and cleaned it to fix it. So I figured that would be easier to do than try to memorize which notes didn't work. I took some pictures... mainly for my own reference in case I forgot how things were supposed to go back together... but I am putting them up here too:
Front cover off, after removing like 50 screws:
[![Edirol keyboard 1](/wp_old/2008/05/6553.jpg?w=300)](/wp_old/2008/05/6553.jpg)[![Edirol keyboard 2](/wp_old/2008/05/6554.jpg?w=300)](/wp_old/2008/05/6554.jpg)
So I started the process of removing keys because I could not see any other way to access the contacts. They grey part on the left in the first picture looks like about the same mechanism as a keyboard or older joystick pad. There are two pads for each key rather than just one, and my guess is that the one nearest the fulcrum is hit slightly sooner than the further one, and the time elapsed between the two hits is used to guess the velocity with which they key was struck.
Other than that, just a pretty easy-to-understand design. Each key is held up by a tension spring on the opposite side, and keys slide in and out pretty easily once the springs are gone. The only annoying part was all the white grease everywhere that kept getting all over my hands.
[![Edirol keyboard 3](/wp_old/2008/05/6555.jpg?w=300)](/wp_old/2008/05/6555.jpg)[![Edirol keyboard 4](/wp_old/2008/05/6556.jpg?w=300)](/wp_old/2008/05/6556.jpg)
And it's just connected electrically with a ribbon cable, normal 0.1" pitch, like an IDE header.
[![Edirol keyboard 5](/wp_old/2008/05/6557.jpg?w=300)](/wp_old/2008/05/6557.jpg)
So I proceeded to remove the first dozen or so keys by pulling out the springs, then white keys and black keys.
The PCB in the next pictures looks almost black, but it should be more of a dark green. The lines are dust that came between the keys. In any case, these show the rubber(ish) part on top that the keys strike, and the gold PCB contacts beneath them.
[![Edirol keyboard 6](/wp_old/2008/05/6562.jpg?w=300)](/wp_old/2008/05/6562.jpg)[![Edirol keyboard 7](/wp_old/2008/05/6563.jpg?w=300)](/wp_old/2008/05/6563.jpg)
Conveniently, there are four rubber sections (one per octave). Each two gold pads correspond to a key, and the holes between each are where the rubber section is secured.
I removed the first section completely, but fully re-seating the rubber took awhile. What I eventually did was lift up just the portion enough to get to the PCB contacts underneath. As only a few keys were problematic, it was just a matter of pounding the keys or rubber to hear which ones didn't respond right. Electronics are really supposed to be turned off when you service them, but it is much easier to audibly hear the response of a key/contact to determine how well it's working, so I had it plugged in... oh well, the electronics are all low-voltage.
From there I just needed to clean off the contacts underneath the problematic keys with some rubbing alcohol on a q-tip. I didn't exactly need to remove all 48 keys to do this, but I wanted to clean the keys off anyway.
Yay. Keyboard is working well again.

View File

@@ -0,0 +1,31 @@
---
author: Chris Hodapp
comments: true
date: 2008-05-05 01:54:01+00:00
layout: post
slug: scrap-notes-20080425ish-20080503
title: Scrap notes, 2008.04.25ish-2008.05.03
wordpress_id: 83
categories:
- Scratch
tags:
- os
---
* [Adobe Open Screen Project](http://www.adobe.com/openscreenproject/) - apparently Adobe is now opening up the SWF and FLV formats, which hopefully soon means significantly less trouble getting Flash to work for me on Linux.
* [Tilera TILE64](http://www.tilera.com/products/processors.php) - some sort of chip with 64 interconnected cores (or "tiles"); according to their site, tiles can be grouped into clusters, and the chip can run multiple operating systems simultaneously. Maybe kinda neat.
* [Bulwer-Lytton Fiction Contest](http://www.bulwer-lytton.com/) - "whimsical literary competition that challenges entrants to compose the opening sentence to the worst of all possible novels." Kinda interesting to read.
* [Contiki OS](http://www.sics.se/contiki/) - "Contiki is a small, open source, highly portable, multitasking computer operating system developed for use on a number of memory-constrained networked systems ranging from 8-bit computers to embedded systems on microcontrollers, including sensor network motes." (from [Wikipedia entry](http://en.wikipedia.org/wiki/Contiki)). Apparently can run from a few KB and provide multitasking and TCP/IP, as well as a full GUI if given about 30 KB. It runs on a variety of systems, including AVR micros, Commodore, Apple II, blahblahblah. Looks handy.
* Sort of reminds me of the [TRON Project](http://en.wikipedia.org/wiki/TRON_Project) despite not really being anything like it.

View File

@@ -0,0 +1,121 @@
---
author: Chris Hodapp
comments: true
date: 2008-05-17 14:39:34+00:00
layout: post
slug: overdue-scrap-notes-20080501-0516
title: Overdue scrap notes, 2008.05.01-05.16
wordpress_id: 84
categories:
- Scratch
tags:
- electronics
- linux
- politics
- programming
---
**2008.04.30**
* [Reaktor diary](http://reaktordiary.blogspot.com/): might be helpful as I learn to use Reaktor
* Despite that this program is not open source but proprietary, it offers more comprehensible insight into its workings than any of the open source synth software I have tried so far.
* Given, I've only used a couple premade instruments, but their internal structure is out-in-the-open in the form of modules, not as blocks of code that I would have a hard time finding and a harder time comprehending.
**2008.05.06**
* [Chilling Effects Clearinghouse](http://www.chillingeffects.org/): "A joint project of the Electronic Frontier Foundation and (about a dozen schools).... Chilling Effects aims to help you understand the protections that the First Amendment and intellectual property laws give to your online activities."
* [Linux Softpedia - EDA](http://linux.softpedia.com/get/Science-and-Engineering/Electronic-Design-Automation-EDA-/): looks like a good collection of Electronic Design Automation software for Linux
* [Signs](http://www.iti.uni-stuttgart.de/~bartscgr/signs/wiki/index.php/Main_Page) (or [here](http://linux.softpedia.com/get/Science-and-Engineering/Electronic-Design-Automation-EDA-/Signs-7965.shtml)): "a tool for logic synthesis and gate level simulation... include synthesis of RTL-style VHDL circuit descriptions and a dynamic graphical netlist viewer..."
* [KTechLab](http://ktechlab.org/): "...an Open Source Intergated Design Environment (IDE) for electronic and PIC microcontroller circuit design and simulation."
* [Alliance CAD](http://www-asim.lip6.fr/recherche/alliance/): "a complete set of free CAD tools and portable libraries for VLSI design... includes a VHDL compiler and simulator, logic synthesis tools, and automatic place and route tools."
* Octeon Plus - some chip, 4 to 16 MIPS64 core, 600-1000 MHz, 15-40W power usage... looks pretty fast ([Linuxdevices link](http://www.linuxdevices.com/news/NS6961076616.html))
* [Helpful link ](http://nomediakings.org/doityourself/howto_silkscreen_posters_and_shirts.html)about silkscreening/screenprinting from [nomediakings.org](http://nomediakings.org)
**2008.05.09**
* "This Film is Not Yet Rated" ([IMDB](http://www.imdb.com/title/tt0493459/)) - some movie my friend Adam recommended; looks like the [full version](http://video.google.com/videoplay?docid=-559517494445537267) is online, for now, at Google Videos
* [Univ. of Manchester, Advanced Processor Tech. Group](http://intranet.cs.man.ac.uk/apt/) - good link for some software projects and papers relevant to processors
* "In Defense of Lost Causes" - Slavoj Zizek ([Amazon](http://www.amazon.com/Defense-Lost-Causes-Slavoj-Zizek/dp/1844671089))... maybe an interesting book from a "Slovene sociologist, philosopher, and cultural critic." who describes himself as a Marxist
* "Right Is Wrong: How the Lunatic Fringe Hijacked America, Shredded the Constitution, and Made Us All Less Safe" - Arianna Huffington ([Amazon](http://www.amazon.com/Right-Wrong-Hijacked-Shredded-Constitution/dp/0307269663)) . . . just in case you needed more anti-conservative propaganda
* Past public lectures from Perimeter Institute for Theoretical Physics are available [here](http://www.perimeterinstitute.ca/Outreach/Public_Lectures/View_Past_Public_Lectures/) (though videos look like mostly Windows Media Player or Flash).
* [SIMH](http://simh.trailing-edge.com/): software from the Computer History Simulation Project, able to simulate (not emulate?) a variety of rather old hardware, like the DEC PDP
**2008.05.16**
* [Excerpts](http://www.relativitybook.com/resources/Einstein_religion.html) from Einstein's letter to Eric Gutkind on 1954-01-03 - expresses some of his views on religion pretty well... apparently lining up a bit with the "Deus sive nature" views of [Spinoza](http://en.wikipedia.org/wiki/Baruch_Spinoza)
* [Reconfigurable computing](http://en.wikipedia.org/wiki/Reconfigurable_computing)... worth learning about.
* [Microcode](http://en.wikipedia.org/wiki/Microcode)... also worth learning about, particularly with x86
* [FpgaC](http://fpgac.sourceforge.net/): "FpgaC compiles a subset of the C language to net lists which can be imported into an FPGA vendors tool chains... excellent alternative to VHDL/Verilog for algorithmic expression of FPGA reconfigurable computing tasks." . . . like an HLL rather than an HDL.
* [Atmel FPSLIC](http://www.atmel.com/products/FPSLIC/): AVR microcontroller and SRAM-based FPGA combined on one die
* [Achronix](http://www.achronix.com/): FPGAs running up to around 2 GHz
* [OpenCores](http://www.opencores.org/): Designs and publishes core designs (for FPGAs, CPLDs, ASICs in general) under a license based on the LGPL
* [OpenFPGA](http://www.openfpga.org/): Promote FPGAs in blahblahblah by trying to have open standards and information and practices
* [Pragmatic Marketing](http://www.pragmaticmarketing.com/): I dunno, but I've read a few useful links here
**2008.05.16**
* "Commonwealth - Economics for a Crowded Planet" - Jeff Sachs ([link](http://www.marginalrevolution.com/marginalrevolution/2008/03/common-wealth-e.html) at [marginalrevolution.com](http://www.marginalrevolution.com/))

View File

@@ -0,0 +1,101 @@
---
author: Chris Hodapp
comments: true
date: 2008-05-24 04:06:44+00:00
layout: post
slug: 20-pages-of-scrap-notes-20080519-0523
title: 20 pages of scrap notes, 2008.05.19-05.23
wordpress_id: 85
categories:
- Scratch
tags:
- linux
- politics
- programming
---
I astound myself by how many pages of scrap notes I accumulate over 5 days, just during my down time at work.
**2008.05.19**
* "Exposing the Modern Racist Paradigm," extremely long page [here
](http://www.opposingdigits.com/racistparadigm/)
* Someone's opinions on why the Amiga is awesome, [here](http://www.basden.demon.co.uk/amiga/amigade/features.html) . . . meaningful to me because I haven't used an Amiga
* [Simputer](http://www.simputer.org/) - "self-contained, open hardware handheld computer, designed for use in environments where computing devices such as personal computers are deemed inappropriate." (quoth [wikipedia](http://en.wikipedia.org/wiki/Simputer))... this looks like a project that didn't do as well as expected and is rather old right now, but it looks interesting anyhow.
* Someone's [blog](http://thomaskraemer.blogspot.com/2008/05/hp-memristor-math-visualization.html) about the memristor, and why it's the 4th circuit element, and why he thinks it's useful/revolutionary.
* [Reversible computing](http://www.zyvex.com/nanotech/reversible.html) . . . worthy of consideration
**2008.05.20**
* Intel Atom D945GCLF motherboard from [Tranquil PC Ltd.](http://www.tranquilpc-shop.co.uk/acatalog/Motherboards.html) - $82 for motherboard with 1.60 GHz Atom 230; looks like a pretty good deal
* [OLPC XO 2.0](http://www.xconomy.com/2008/05/20/negroponte-unveils-2nd-generation-olpc-laptop-its-an-e-book/) - new version of the XO, which "isnt really a laptop at all but a double-screened, fold-up electronic book", and which Negroponte has a goal of being producing for $75 each.
* [Pen Computing](http://pencomputing.com/) - good resource on mobile/handheld/rugged computing products
**2008.05.21**
* [Lulu](http://www.lulu.com/) - Self publishing service; allows you to publish (as in, actual physical books that can be purchased online) with no setup fees. You keep 80% of creator revenue on sales, and you keep the copyrights to the material.
* [Adam Smith's Lost Legacy](http://adamsmithslostlegacy.com/) - because someone's pissed about how people constantly mangle what Adam Smith said
**2008.05.22**
* [Digilent Inc.](http://www.digilentinc.com/) - Offers some inexpensive starter boards with Xilinx Spartan FPGAs or Atmel AVR microcontrollers
* [Xtreme Data, Inc.](http://www.xtremedatainc.com/) - "Database Analytics Appliance able to sustain 1TB/min of SQL processing"... well, that's kinda boring, but I suppose it does live up to the name, and somehow accomplishes this with FPGAs.
* [DRC Computer Corporation](http://drccomputer.com/) - offers Reconfigurable Processor Unit which fits into an AMD Opteron socket on a multiway board, allowing it to directly connect to its bus and access memory, and offload CPU-intensive software routines to hardware; they use Xilinx FPGAs for this.
* [Project VGA](http://wacco.mveas.com/) - "Low Budget, Open Source, VGA Compatible video card"
* [FPGA Central](http://www.fpgacentral.com/) - Good resource for FPGA links
**2008.05.23**
* [Llamasoft Blog](http://www.llamasoft.co.uk/blog/) - From the maker of one of my favorite games, Llamatron. He has written some interesting software.
* [JavaSpaces](http://en.wikipedia.org/wiki/Tuple_space#JavaSpaces) - distributed shared memory in Java, along with other stuff, and part of [Jini](http://en.wikipedia.org/wiki/Jini) from Sun. This could be neat if I actually used Java.
* [VX32](http://pdos.csail.mit.edu/~baford/vm/) - "virtual extension environment" for x86; one can run x86 apps in this for a secure, isolated environment in which they are limited in what they are allowed to do.
* [ACL2](http://www.cs.utexas.edu/~moore/acl2/) (Applicative Common Lisp) - "both a programming language in which you can model computer systems and a tool to help you prove properties of those models," and part of the Boyer-Moore family of theorem provers

View File

@@ -0,0 +1,140 @@
---
author: Chris Hodapp
comments: true
date: 2008-05-27 02:06:04+00:00
layout: post
slug: old-tattered-notebook-from-1999-notes
title: Old-tattered-notebook-from-1999 notes
wordpress_id: 86
categories:
- Scratch
tags:
- linux
- politics
- programming
---
So, these are probably more useful here than sitting in a dusty binder...
**2003.07**
* "Common Lisp, Typing, and Mathematics" by Francis Sergereart - good (long) paper about one application of Common Lisp; [Postscript here](http://ai.king.net.pl/articles/common-lisp.ps)
* "Getting Started With LaTeX", David R. Wilkins - [here](http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/)
**2004.07**
* [AT&T Graphviz](http://www.graphviz.org/) - very very useful program for visualization of directed and undirected graphs
**2005.04**
* [](http://www.opencroquet.org/)[Croquet](http://croquetconsortium.org/) (from the Croquet Project, not to be confused with the Croquet Consortium) - by my description, an attempt to extend the original 2-dimensional paradigm for a GUI into 3 dimensions; by their description, "Croquet is a powerful new open source software development environment and software infrastructure for creating and deploying deeply collaborative multi-user online applications and metaverses on and across multiple operating systems and devices."... I think it's an interesting project, anyhow. Check out some of the papers Alan Kay helped write, and look at some of the videos.
**2005.??**
* [JGraph](http://jgraph.com/) - some sort of graphing and visualization software, open-source and written in Java
* [Ploticus](http://ploticus.sourceforge.net/) - more graphing and visualization, not as shiny as JGraph, but not Java either; apparently good for on-the-fly graph generation, for websites and such
* [TeXmacs](http://www.texmacs.org/) - " GNU TeXmacs is a free wysiwyw (what you see is what you want) editing platform with special features for scientists."... it puts Mathematica's rendering to shame.
**2005.08.23**
* Very useful [link](http://www.geocities.com/evilsnack/matrix.htm) for using matrices in POV-Ray
* Media and Particle Systems in POV-Ray, [here](http://www.willamette.edu/~gorr/classes/GeneralGraphics/Media/)
* Photons & caustics in POV-Ray, [here](http://nathan.kopp.com/photons.htm)
**2006.12.11**
* ["Weaving the Web"](http://www.w3.org/People/Berners-Lee/Weaving/), Tim Berners-Lee - "The original design and ultimate destiny of the World Wide Web, by its inventor."
**2006.12.15**
* [Grasshopper Enterprises](http://www.grasshopper.com/), "Borders of science, boundaries of imagination," might be complete and total bullshit, but the page has some interesting things on lucid dreaming and other workings of the mind
**2007.04.19**
* [cachegrind](http://valgrind.org/info/tools.html) - cache profiler, part of the valgrind suite, designed to pinpoint cache misses in code
* I don't know why, but I wrote down "BDI2000 JTAG", maybe because the Abatron BDI-2000 can be used to debug the Linux kernel via JTAG?
**2007.04.26**
* ["The Grand Inquisitor"](http://www.mtholyoke.edu/acad/intrel/pol116/grand.htm) from "The Brothers Karamazov" by Fyodor Dostoevsky  -  I think I'm supposed to read this because I don't know why else I'd have written it down.
**2007.11.02**
* [Voyage Linux](http://linux.voyage.hk/) - Debian-based distro, designed for embedded systems, like [Soekris](http://www.soekris.com/) boards; it is suitable as a WAP, firewall, gateway, NAS, etc.
* [IPv6 Tunnel Broker](http://tunnelbroker.net/) - reach IPv6 internet freely by tunneling over existing IPv4 connections, courtesy of Hurricane Electric Internet Services
* [The Honeynet Project](http://www.honeynet.org/) - goal is to increase the security of the Internet by "learning the tools, tactics, and motives involved in computer and network attacks, and sharing the lessons learned"
* ["Links to Tens of Thousands of Legal Music Downloads"](http://www.kuro5hin.org/story/2003/9/5/05113/70314)
* "The Hacker Crackdown: Law and Disorder on the Electronic Frontier" by Bruce Sterling; available [here ](http://www.mit.edu/hacker/hacker.html)as "literary freeware"
* ["The War on the Unexpected" by Bruce Schneier](http://www.schneier.com/blog/archives/2007/11/the_war_on_the.html)
**2008.05.26**
* [http://www.looknohands.com/chordhouse/piano/](http://www.looknohands.com/chordhouse/piano/) - helpful web applet for figuring out chords and scales and numerous other things about which I am clueless but trying to learn[
](http://www.looknohands.com/chordhouse/piano/)

View File

@@ -0,0 +1,65 @@
---
author: Chris Hodapp
comments: true
date: 2008-06-01 16:55:32+00:00
layout: post
slug: semi-organized-scrap-notes-20080526-20080601
title: Semi-organized scrap notes, 2008.05.26-2008.06.01
wordpress_id: 87
categories:
- Scratch
tags:
- crackpots
- linux
- politics
- science
---
**Political/otherwise controversial
**
* Seen on a bumper sticker on a semi truck: [http://www.headsneedtoroll.org/](http://www.headsneedtoroll.org/) . . . looks to have a pretty good stated mission[
](http://www.headsneedtoroll.org/)
* [Vote Apathy Party 08](http://www.apathyparty08.com/) because at least I'm honest.
* Just discovered [Utah Phillips](http://www.utahphillips.org/) upon hearing an interview with him after his death on May 23
* "Trick or Treatment? Alternative Medicine On Trial" by Simon Singh ([Amazon](http://www.amazon.com/Trick-Treatment-Alternative-Medicine-Trial/dp/0593059042))
**Technical blah**
* For some "brilliant" explanations of why most science is completely wrong, [Louis Savain's site](http://www.rebelscience.org/Crackpots/notorious.htm) is a good reference
* You can score the site on [The crackpot index](http://math.ucr.edu/home/baez/crackpot.html) by John Baez ("A simple method for rating potentially revolutionary contributions to physics")
* [The Join-Calculus](http://moscova.inria.fr/join/index.shtml) from [INRIA](http://www.inria.fr) in France - "...a process calculus. It provides a simple support for distributed programming."
* [JoCaml](http://jocaml.inria.fr/) from the same place; basically [Objective Caml](http://caml.inria.fr/ocaml/) plus Join-Calculus
* INRIA also made [SciLab](http://www.scilab.org/) which is quite useful as a free tool for numerical computation, particularly if you hate MATLAB.
* [uClinux](http://www.uclinux.org/) - embedded Linux/Microcontroller project, for MMU-less systems... website is very slow as of late for some reason
* [ELKS](http://elks.sourceforge.net/) (Embeddable Linux Kernel Subset) - in case you really want to run a subset of Linux on an Intel 8086, 8088, 80186, 80188, 80286, 386 in V86 mode, or Psion SIBO
* [JLime](http://www.jlime.com/) - Jornada Linux Mobility Edition, which runs quite well on some HP Jornadas, like the 680, which is good in cases like mine when the included WinCE is one giant pile of fail

View File

@@ -0,0 +1,72 @@
---
author: Chris Hodapp
comments: true
date: 2008-06-07 18:24:56+00:00
layout: post
slug: notes-20080601-20080607
title: Notes 2008.06.01 - 2008.06.07
wordpress_id: 88
categories:
- Scratch
tags:
- apps
- books
- programming
---
**Technical stuff**
* [Red Hill Technology](http://www.redhill.net.au/) - decent articles pertaining a lot to old x86 hardware
* [TRIPS](http://www.cs.utexas.edu/~trips/) (utexas again) - "developing a new class of technology-scalable, power efficient, high-performance microprocessor architectures called EDGE (Explicit Data Graph Execution) architectures." and I've got at least one technical paper that's been on my computer for over a year that I've put off reading somehow
**Programs and stuff**
* [Xournal](http://xournal.sourceforge.net/) - " Xournal is an application for notetaking, sketching, keeping a journal using a stylus."; open source, of course, and maybe I can make it run on my Jornada
* [OPIE ](http://opie.handhelds.org/)- Open Palmtop Integrated Environment... some sort of interface for smaller devices; I tried it on my Jornada and found it uselessly slow, but kinda neat
* [GPE](http://gpe.handhelds.org/) - GPE Palmtop Environment, which might be a better option than OPI
* [BlenderCAD](http://projects.blender.org/projects/blendercad/) - "a Blender script created with the aim of expand the functionality of Blender, so that it could be used for the Computer Aided Drawing." ...haven't tried it but it might be worth it
* [GNU Radio](http://www.gnu.org/software/gnuradio/) - the GNU software radio; can be combined with minimal hardware (like the [USRP](http://www.ettus.com/)) "allows the construction of radios where the actual waveforms transmitted and received are defined by software," which is probably a good way to totally piss off the FCC
**Books**
* "Tainting Evidence: Inside The Scandals At The FBI Crime Lab" by JF Kelly and PK Wearne ([Amazon](http://www.amazon.com/Tainting-Evidence-Inside-Scandals-Crime/dp/0743236416))
* "Confessions of a Record Producer - How to Survive the Scams and Shams of the Music Business" by Moses Avalon ([Amazon](http://www.amazon.com/Confessions-Record-Producer-Survive-Business/dp/0879308745/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1212861002&sr=8-1))
* "Rainbow Painting: A Collection of Miscellaneous Aspects of Development and Completion" by Tulku Urgyen Rinpoche ([Amazon](http://www.amazon.com/Rainbow-Painting-Collection-Miscellaneous-Development/dp/9627341223)) - was recommended very highly by a program I listened to, related to Buddhism and meditation
**Political**
* [The Memory Hole](http://thememoryhole.org/) rescuing knowledge, freeing information - "The Memory Hole exists to preserve and spread material that is in danger of being lost, is hard to find, or is not widely known.... The emphasis is on material that exposes things that we're not supposed to know (or that we're supposed to forget)."
* [Cryptome](http://cryptome.org/) - "Cryptome welcomes documents for publication that are prohibited by governments worldwide, in particular material on freedom of expression, privacy, cryptology, dual-use technologies, national security, intelligence, and secret governance -- open, secret and classified documents -- but not limited to those."

View File

@@ -0,0 +1,118 @@
---
author: Chris Hodapp
comments: true
date: 2008-06-18 03:24:08+00:00
layout: post
slug: 20080607-20080617-yay-notes
title: 2008.06.07 - 2008.06.17, yay notes
wordpress_id: 89
categories:
- Scratch
tags:
- political
- programming
---
**Potentially political**
* [Meetup](http://www.meetup.com/) - find groups of a given topic or interest, near whatever location you give... or "Get on the Internet to get off the Internet
* [Legal Rights of Photographers](http://www.kantor.com/blog/2005/12/legal-rights-of-photographers/) by Andrew Kantor  (or [this PDF](http://www.kantor.com/blog/Legal-Rights-of-Photographers.pdf)) - very informative and helpful to know
* [The Photographer's Right](http://www.krages.com/phoright.htm) flyer by Bert P. Krages II, which is actually what I was trying to find when I found the link from Andrew Kanto
* "The Sum of Our Days: A Memoir" by Isabel Allende ([Amazon](http://www.amazon.com/Sum-Our-Days-Memoir/dp/006155183X))
* Local indie band, "[Bad Veins](http://www.myspace.com/badveins)" - my friend Carolyn wrote their name down a few years ago and told me to check the band out, and I stuck the piece of paper in a folder and forgot about it... then coincidentally when I finally looked them up online, realized I had already read an article about them months prior in Citybeat
**Pretty obviously political**
* [The Ruckus Society](http://www.ruckus.org/) - "provides environmental, human rights, and social justice organizers with the tools, training, and support needed to achieve their goals."
* [Free Press](http://www.freepress.net/) - nonpartisan organization working for media reform
* "The New Media Monopoly" by Ben H. Bagdikian ([Amazon](http://www.amazon.com/New-Media-Monopoly-Ben-Bagdikian/dp/0807061875))
* [Daily Kos](http://dailykos.com/) - "State of the Nation",
**Technology/electronics**
* [Arduino](http://www.arduino.cc/) - "an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software." Can be purchased pre-assembled or built by hand; software and CAD files are available at the site.
* [FreeIO](http://freeio.org/) - "Free Hardware Design Resources for the Free Software Community" though looks slightly dead
* [Gallium3D](http://www.tungstengraphics.com/wiki/index.php/Gallium3D) - "Tungsten Graphics' new architecture for building 3D graphics drivers."; only interesting to me because it might mean better Linux drivers for 3D graphics cards.
* [BAZIX One Chip MSX](http://www.bazix.nl/onechipmsx.html) - apparently implements some computer called the MSX, and does it using an Altera FPGA... I don't know
* [Hypercomputing HC-62](http://www.starbridgesystems.com/hypercomputing/HC-62/) - just some ridiculously fast computer with 36 GB of RAM and eleven FPGAs
* [Holografika](http://holografika.com/) - true 3D holographic display, visible with naked eye, so the site claims (and has videos to show)
* [Astak Mentor](http://www.astak.com/e-book.html) ebook reader - epaper-based, claimed to get 8000 pages per charge, support TXT, PDF, RTF, HTML, on a WinCE-based OS, with SD expansion card and wireless; there is a 5" version (800x600) should be $200, 9.7" (1280x825) for $350. Should be available Real Soon Now(tm).
* [iRex iLiad](http://www.irextechnologies.com/products/iliad) looks to have better specs and it is Linux-based, however it's also $600-$700 (but it's actually for sale)
* [Graphics Gems](http://www.glassner.com/andrew/writing/books/gems.htm) by Andrew Glassner - a set of books I should probably read eventually so I stop reinventing the wheel every time I program anything
**Software**
* [serdisplib](http://serdisplib.sourceforge.net/) - library to drive serial displays with built-in controllers (like the Optrex LCDs I messed around with at work)
* [ACML (AMD Core Math Library)](http://developer.amd.com/cpu/libraries/acml/Pages/default.aspx) - heavily optimized routines for [LAPACK](http://www.netlib.org/lapack/), [BLAS](http://www.netlib.org/blas/), FFT, transcendental & random number generation, utilizing SIMD instructions available on AMD CPU
* Similar - [SIMDx86](http://simdx86.sourceforge.net/) - optimized SIMD library for x86 (I don't think it does x86-64)
* [FBReader](http://fbreader.org/) - ebook reader for Linux/Windows, intended for portable devices. Handles [Plucker](http://www.plkr.org/) which I found really useful on Palm
* [sdtcon](http://sdtcon.sourceforge.net/) - "Simple and secure remote access over SSH... provides easy to configure, easy to use, secure remote and out of band access to systems and devices inside a private LAN or management network."; works via SSH and Java on Linux/Windows
* [FreeRTOS](http://www.freertos.org/) - free, portable, open source, mini realtime kernel for embedded systems, like ARM7, ARM9, Cortex-M3, MSP430, MicroBlaze
* [DjVu](http://djvu.org/) - digital document format with very high compression and quality for scanned documents or photographs... too bad it's not nearly as well-supported as JPEG and other raster formats, lossy or otherwise
* [C optimisation tutorial](http://www.abarnett.demon.co.uk/tutorial.html) - from 1998 but still pretty relevant
* [DSP DesignLine](http://www.dspdesignline.com/) - lots of useful articles and technical papers about programming for DSPs (such as [this one](http://www.dspdesignline.com/showArticle.jhtml;jsessionid=N1PJTSHS1PDP2QSNDLPSKHSCJUNN2JVN?articleID=197006981&queryText=c+code) about Programming and Optimizing C Code)

View File

@@ -0,0 +1,116 @@
---
author: Chris Hodapp
comments: true
date: 2008-07-10 03:35:24+00:00
layout: post
slug: 20080618-20080709-really-overdue-notes
title: 2008.06.18 - 2008.07.09, really overdue notes
wordpress_id: 91
categories:
- Scratch
tags:
- Hardware
- hippies
- programming
---
**Hardware**
* [http://www.ucapps.de/](http://www.ucapps.de) - "Non-commercial DIY Projects for MIDI Hardware Geeks"
* [http://midibox.org/](http://midibox.org/) - Looks like a blog about various other MIDI-related DIY projects
* [Nvidia Tegra](http://gizmodo.com/5012159/nvidia-tegra-all+in+one-mobile-processors-aim-to-nuke-intels-atom-promise-30-hours-hd-playback) -  "features a GPU, media processor, system memory, peripherals and a CPU all in one ultra-low power chip, smaller than a US dime (10-cent piece)."
* [Ethernet Mini Board](http://futurlec.com/Mini_Ethernet.shtml)
**Geek Articles/Software**
* [An Interview with the Old Man of Floating-Point](http://www.cs.berkeley.edu/~wkahan/ieee754status/754story.html) (William Kahan)
* [Numerical Workbenches, pt. III](http://linuxgazette.net/issue71/spiel.html) (Christoph Spiel) - plotting in [GNU Octave](http://www.gnu.org/software/octave/), [Scilab](http://www.scilab.org/), and [Tela](http://www.ava.fmi.fi/prog/tela.html)
* [Scilab lecture notes](http://math.unipune.ernet.in/free%20maths/scilab-maxima-doc/engr2200_lecture4scilab.txt) from University of Pune
* [Basics of Scilab Control Toolbox](http://www.wolffdata.se/scilab/controltools1.html)
* [freemind](http://freemind.sourceforge.net/) - "is a premier free mind-mapping software written in Java."... I could probably benefit a lot by using this properly.
* [Art of Illusion](http://www.artofillusion.org/) by Peter Eastman - "Art of Illusion is a free, open source 3D modelling and rendering studio." . . . looks very powerful and capable; another manual [here](http://www.housepixels.com/aoimanual/contents.html)
* [xpra](http://partiwm.org/wiki/xpra) - "persistent remote applications" for X; think like GNU Screen, or like a remote application rather than a remote desktop
* [Scale](http://www-ali.cs.umass.edu/Scale/) - Scalable Compiler for Analytical Experiments; right now, a research/instructional compiler (open source, Java) used mainly for generating code for the [TRIPS](http://www.cs.utexas.edu/~trips/) architecture
* [raw Architecture Workstation](http://cag.csail.mit.edu/raw/purpose/) - project at MIT for "simple, wire-efficient multicore architecture that scales with increasing VLSI gate densities"... tiled, multicore, highly parallel
* [Sun Labs Lively Kernel](http://research.sun.com/projects/lively/) - positioned as a Flash alternative for the iPhone, for instance (interview with creator Dan Ingalls [here](http://twit.tv/floss29))
* [The Sentinel](http://en.wikipedia.org/wiki/The_Sentinel_%28computer_game%29) - old computer game that was notable for generating its levels procedurally
* [.kkrieger](http://en.wikipedia.org/wiki/.kkrieger) - procedural generation taken to an extreme, from [.theprodukkt](http://www.theprodukkt.com/kkrieger)
**Hippie Stuff**
* [MoBo Bicycle Coop](http://mobobicyclecoop.org/) - "The MoBo Bicycle Co-op is a non-profit, volunteer-run collective dedicated to providing every member of the Tri-State area access to bicycles, maintenance, and education." (also [Myspace site](http://www.myspace.com/mobobicyclecoop))
* [AskWish](http://www.askwish.com/) -
* [Hegelian dialectic](http://en.wikipedia.org/wiki/Dialectic#Hegelian_dialectic) - remind me to read this in detail and find why it pertains to politics
**Hippie Geek Stuff**
* [Owner-free Filesystem](http://wiki.offdev.org/Main_Page) - "distributed filesystem in which everything is stored in reference to randomized data blocks" and bound to be soon pissing off a legal system near you
* [What Colour are your bits?](http://ansuz.sooke.bc.ca/lawpoli/colour/2004061001.php) - relevant to intellectual property somehow but I haven't read it yet.
* [Traffic Waves](http://www.amasci.com/amateur/traffic/traffic1.html) - "sometimes one driver can vastly improve traffic."
* ["Big and Bad"](http://www.gladwell.com/2004/2004_01_12_a_suv.html) - Malcolm Gladwell's opinions of SUVs and their marketing. (same Malcolm Gladwell who wrote [Tipping Point](http://www.gladwell.com/tippingpoint/) though I didn't make this connection when I read the article)
**Food**
* [http://www.tonychor.com/archive/000443.html](http://www.tonychor.com/archive/000443.html) . . . I now know that it's better to cook bacon in the oven.
* [Jewish Purist's Bagels](http://www.masterstech-home.com/The_Kitchen/Recipes/Vegetarian_Recipes/JewishPuristsBagels.html)

View File

@@ -0,0 +1,188 @@
---
author: Chris Hodapp
comments: true
date: 2008-07-26 15:11:54+00:00
layout: post
slug: 20080710-20080726-debris
title: 2008.07.10 - 2008.07.26 debris
wordpress_id: 92
categories:
- Scratch
tags:
- Hardware
- Music
---
**Food-related
**
* [Chai recipe I tried](http://www.odie.org/chai/rec/rec104.html)
* [Using fresh and ground ginger](http://www.seedsofknowledge.com/ginger.html) - which I looked up because I had a lot of ginger root left over than just the 1/4" that I used for the chai
* [Wikibooks cookbook](http://en.wikibooks.org/wiki/Cookbook) - I don't know much of what else is on it, but my recipe for hardtack came from here.
* [Stuff to do with cloves](http://herbal-skin-care-products.blogspot.com/2008/05/clove.html) which doesn't really belong here because these are mostly medicinal uses
**Music**
* [The Future Freaks Me Out](http://en.wikipedia.org/wiki/The_Future_Freaks_Me_Out) - album from a band my friend Shannon likes
* [Jamglue](http://www.jamglue.com/) - remixing for the masses... I haven't looked at it in much detail. but Corina uses it
* [John Walsh](http://www.myspace.com/americasmostpositive) - local (as in Cincinnati) punk/hardcore band that Joc likes
* [The Seedy Seeds](http://www.theseedyseeds.com/) (and also [here](http://www.myspace.com/theseedyseeds) on Myspace) - another local band (electronica?) that Joc likes
**Shiny stuff**
* [Dafont ](http://www.dafont.com/)- site full of categorized fonts for download (free for personal use)
**Books/Authors/Literature**
* [Paul Ekman](http://www.paulekman.com/), "cutting edge behavorial science for real world applications" with some downloadable articles
* [The Silent Language](http://www.amazon.com/Silent-Language-Edward-T-Hall/dp/0385055498) and [The Hidden Dimension](http://www.amazon.com/Hidden-Dimension-Edward-Twitchell-Hall/dp/0844665525/) by Edward T. Hall . . . pertains to non-verbal communication and emotions
* Mentioned by Meredith and probably directed to a female audience but maybe still worth a look: [Memory Keeper's Daughter](http://www.amazon.com/Memory-Keepers-Daughter-Kim-Edwards/dp/0143037145) and [The Fall of a Sparrow](http://www.amazon.com/FALL-SPARROW-NOVEL-Robert-Hellenga/dp/0684850273) and [The Picture of Dorian Grey](http://www.gutenberg.org/dirs/etext94/dgray10h.htm) and some books by an "up and author" Emily Giffin: [Something Blue](http://www.amazon.com/Something-Blue-Emily-Giffin/dp/0312323859), [Something Borrowed](http://www.amazon.com/Something-Borrowed-Emily-Giffin/dp/031232118X), and [Love the One You're With](http://www.amazon.com/Love-One-Youre-Emily-Giffin/dp/0312348673)
* [Fart Proudly: Writings of Benjamin Franklin You Never Read in School](http://www.amazon.com/gp/product/1583940790/)
* Like [this one](http://teachingamericanhistory.org/library/index.asp?document=470) about how Science should find a way to make farts smell better.
**Hippie & Political Stuff**
* Joc showed me this: [Freecycle](http://www.freecycle.org/) - "It's a grassroots and entirely nonprofit movement of people who are giving (& getting) stuff for free in their own towns. It's all about reuse and keeping good stuff out of landfills."
* [The Problem with Music](http://www.negativland.com/albini.html) by Steve Albini
* [Courtney Love's](http://archive.salon.com/tech/feature/2000/06/14/love/print.html) commentary on record label profits, Napster, music, and piracy
* [Order of Death](http://youtube.com/watch?v=rdi8R3vXV-I) on Youtube - someone told me I should watch it. I haven't yet. There's a high chance it's complete BS.
**Software stuff**
* [Bart's way to create bootable CDs](http://www.nu2.nu/bootcd/) - very handy
* [Squeak](http://www.squeak.org/) - VM (open source) implementing Smalltalk  (this [FLOSS Weekly](http://twit.tv/floss29) talks about it)
* [Seaside](http://www.seaside.st/) - "framework for developing sophisticated web applications in Smalltalk"  (this [FLOSS Weekly](http://twit.tv/floss21) talks about it as well)
* [Squeak by Example](http://www.iam.unibe.ch/~scg/SBE/) - pretty good book (available as a PDF for free, or as a printed copy from lulu.com for $20.10)
* [Early History of Smalltalk](http://gagne.homedns.org/~tgagne/contrib/EarlyHistoryST.html) by Alan Kay - it is from 1993, but is still a very in-depth paper
* [Smalltalk: Getting the Message](http://www.chronos-st.org/Smalltalk-Getting-the-Message.html) - article more focused on the "why" and "how" of Smalltalk than its history
* [SliTaz](http://www.linux.com/feature/140573) - a Linux distro designed to run out of RAM and still have a usable desktop; current version is only about 25 MB
* [Rocks Clusters](http://www.rocksclusters.org/wordpress/) - a CentOS-based Linux distro designed to make building and managing clusters a lot easier (mentioned in this [FLOSS Weekly](http://twit.tv/floss30))
* [Webconverger](http://webconverger.com/) - "open source web kiosk", or basically a Linux distro designed to boot quickly into Firefox
* [VR Juggler Suite](http://www.vrjuggler.org/) - some sort of open source virtual reality suite
* [Englab](http://englab.sourceforge.net/) - open source mathematical platform, similar to MATLAB, in very early versions right now
* [Quotes about C and C++](http://www.sysprog.net/quotec.html) and [Programming Quotes](http://www.gdargaud.net/Humor/QuotesProgramming.html) which are mostly good for being funny rather than useful, or for pissing people off
**Hardware stuff (DIYish)**
* [Making a solar baker from an abandoned satellite dish](http://www.backyardnature.net/j/solardsh.htm)
* [LyngSat](http://www.lyngsat.com/) - free satellite channels to receive, in case you wanted something else to do with that satellite dish
* [Journal](http://slashdot.org/~evilviper/journal/189083) from evilviper on Slashdot, also about FTA satellite reception
* [Atmel AVR ATmega16 / ATmega32 programmer](http://www.captain.at/electronics/atmel-programmer/) - needs parallel port and ATmega16
* [Really simple AVR ISP programmer for ATmega128](http://www.scienceprog.com/simplest-128-atmega-programmer/) - uses just parallel port and a few resistors
**Hardware stuff (non-DIY-unless-you-have-a-fab-or-a-CNC)**
* [Loongson](http://en.wikipedia.org/wiki/Loongson) - general-purpose CPU made at Chinese Academy of Sciences; MIPS-compatible and used in some small devices like [this](http://www.linuxdevices.com/news/NS8003782690.html)
**Research**
* [3D holographic display](http://blog.wired.com/gadgets/2008/06/usc-lab-creates.html) at USC (uses projector + rapidly rotating mirror)
* [Lest We Remember:](http://citp.princeton.edu/memory/) Cold Boot Attacks on Encryption Keys  -  research from Princeton about how information can be recovered from memory after a system is powered off, and how to utilize this to defeat most encryption systems because they leave their keys in memory.
**Video game-related**
* [FIFE engine](http://www.fifengine.de/) - open source 2D engine designed for isometric and top-down views
* [XGameStation](http://www.xgamestation.com/) video game development kit - looks like they have various kits for programming games, old-school style, and a lot of user-submitted programs
*

View File

@@ -0,0 +1,154 @@
---
author: Chris Hodapp
comments: true
date: 2008-08-04 04:10:45+00:00
layout: post
slug: 20080726-20080803-stuff
title: 2008.07.26 - 2008.08.03 stuff
wordpress_id: 95
categories:
- Scratch
tags:
- electronics
- food
- Music
- politics
- programming
---
**Music**
* [Kaskade](http://www.myspace.com/kaskademusic) - House/electronica artist I came across many times on [imeem](http://www.imeem.com/)... was good for calming me down while doing homework[
](http://www.imeem.com/)
* ["5th & Avenida" by Afterlife](http://www.imeem.com/groups/rGPu33gx/music/ftln18R0/afterlife_5th_avenida/) - an ambient track I liked... it's on "Café del Mar, Volumen Cuatro" ([Amazon](http://www.amazon.com/Caf%C3%A9-del-Mar-Vol-4/dp/B00000JZO3))
* ["100 Billion Stars" by Lux](http://x.imeem.com/rtgRivRc3j) - another ambient track I liked, from "Cafe del Mar, Volume 8" ([Amazon](http://www.amazon.com/Cafe-Del-Mar-Various-Artists/dp/B00005LNH3))
* ["Alive" by Mads Arp with Julie Harrington](http://www.imeem.com/anniebettyblue/music/xEHhE7nf/mads_arp_featuring_julie_harrington_alive/) - yet another, from "Cafe del Mar Dreams, Vol. 4"  ([Amazon](http://www.amazon.com/Caf%C3%A9-del-Mar-Dreams-Vol/dp/B000H5UKHG/ref=sr_1_1?ie=UTF8&s=music&qid=1217798510&sr=1-1))
* [Cafe del Mar](http://en.wikipedia.org/wiki/Caf%C3%A9_del_Mar), since I didn't realize all those songs came from the same set of albums until I looked them up
**Food**
* [The Black Beast](http://www.chocolatebytes.com/the-black-beast/) - my friend Jessica made this flourless cake and it's pretty supremely awesome
**Research**
* ["The Limits of Quantum Computers" by Scott Aaronson (draft)](http://www.scottaaronson.com/writings/limitsqc-draft.pdf) - or, why articles professing how quantum computers can do anything are complete bullshit
* [Rendering for an Interactive 360-degree Light Field Display](http://gl.ict.usc.edu/Research/3DDisplay/)
* [From RenewableEnergyWorld:](http://www.renewableenergyworld.com/rea/news/story?id=53145) More efficient way to convert waste heat to electricity, from research at Ohio State University
* [arxiv draft](http://arxiv.org/abs/0805.2781) - Funky chemical bonding that happens at very high pressures (officially, "Tetrahedral clustering in molten lithium under pressure")
**Political & hippie stuff**
* ["In Debt We Trust" by Danny Schechter](http://www.indebtwetrust.org/) - film about the national and personal debt crisis in the US (trailer [here](http://video.google.com/videoplay?docid=8816019997709201699))
* ["If This Is a Man" by Primo Levi](http://en.wikipedia.org/wiki/If_This_Is_a_Man) - novel by an Italian author, inspired by his time in Auschwitz during WW2
* ["No Tech Hacking" by Johnny Long](http://www.amazon.com/No-Tech-Hacking-Engineering-Dumpster/dp/1597492159) (Amazon) - "A guide to social engineering, dumpster diving, and shoulder surfing."
* ["Little Brother" by Cory Doctorow](http://craphound.com/littlebrother/) - novel, available freely online if you so desire
**Programming & computerish crap
**
* [Papers about Self and OO](http://self.sourceforge.net/papers/papers.shtml) - I haven't read any of these, but I should
* [Bad Mojo](http://en.wikipedia.org/wiki/Bad_Mojo) - some pretty well-reviewed adventure/puzzle game from 1996 which happens to run on DOS/Windows/Mac
* [The not-so-short introduction to LaTeX 2e](http://tobi.oetiker.ch/lshort/lshort.pdf) - PDF about [LaTeX](http://www.latex-project.org/)
* [Kile](http://kile.sourceforge.net/) - integrated LaTeX environment
* [XeTeX](http://scripts.sil.org/xetex) - a merging of [TeX](http://en.wikipedia.org/wiki/TeX) with Unicode and modern font technologies
* [Apache FOP](http://xmlgraphics.apache.org/fop/) - "print formatter driven by XSL formatting objects (XSL-FO) and an output independent formatter." from the [Apache XML Graphics Project](http://xmlgraphics.apache.org/)
* [Hercules 390](http://www.hercules-390.org/) - The Hercules System/370, ESA/390, and z/Architecture Emulator... incidentally, [TRON Guy](http://www.youtube.com/watch?v=3609OtM138c) is in charge of the project
* [The LiveCD List](http://www.frozentech.com/content/livecd.php) from FrozenTech - Table of info about Linux distros available as LiveCDs
* [INSERT](http://www.inside-security.de/insert_en.html) - the Inside Security Rescue Toolkit, a Linux distro that comes with various tools for rescue and recovery; it's a 60 MB download so it works well as a LiveCD or USB-stick
* [Open64](http://www.open64.net/) - the Open Research Compiler, used originally on Itanium and now on Nvidia [CUDA](http://www.nvidia.com/cuda); it is under GPL
* [BrookGPU](http://graphics.stanford.edu/projects/brookgpu/) - "Brook for GPUs is a compiler and runtime implementation of the [Brook](http://sourceforge.net/projects/brook) stream program language for modern graphics hardware."
* [OpenCL](http://en.wikipedia.org/wiki/OpenCL) - "a language for programming heterogeneous data and task parallel computing across GPUs and CPUs."; initial implementation is on [LLVM](http://llvm.org/) (Low Level Virtual Machine) and [clang](http://clang.llvm.org/)
**Electronics**
* [LM317](http://en.wikipedia.org/wiki/LM317) - According to Cowclops, this variable linear voltage regulator can be a good way to limit current and voltage for charging an SLA.
* [JOP: A Tiny Java Processor](http://www.jopdesign.com/) - A hardware implementation of the Java Virtual Machine; it can be put onto a low-cost FPGA, so the site claims, with the VHDL source (which is GPLed)
* [OpenPCD](http://www.openpcd.org/) - Open RFID Reader for 13.56 MHz; site provides the schematic, PCB layout, Gerber files, bill of material, and some software
* [OPEX](http://www.atmanecl.com/EnglishSite/opex.htm) - A "Unique Operating System" for the AVR microcontroller
* [Use, Abuse, and Misuse of Amplifiers](http://www.national.com/onlineseminar/2002/amps/transcript.html) by Bob Pease - online seminar from National Semiconductor (or "webinar" if you prefer... which I don't); beware, page is quite large
* [Operational amplifier usage](http://www.national.com/an/AN/AN-31.pdf) (also from National Semiconductor)... handy for stuff to do with op amps.
**WTF?**
* [The Roommate Files](http://www.wyseguys.com/default.asp?pg=roommate) - This will put to shame any story you have about bad roommates.

View File

@@ -0,0 +1,212 @@
---
author: Chris Hodapp
comments: true
date: 2008-08-22 04:15:51+00:00
layout: post
slug: 20080804-20080821-more-technical-blah
title: 2008.08.04 - 2008.08.21, more technical blah
wordpress_id: 97
categories:
- Scratch
tags:
- flamewars
- food
- mind
- Music
- politics
- sleep
---
**Ideas ranging between "unconventional" and "BS"
**
* [Uberman's Sleep Schedule](http://www.kuro5hin.org/story/2002/4/15/103358/720) if you are insane enough and need the extra time
* [Live Longer: The One Anti-Aging Trick that Works](http://www.livescience.com/health/080708-fountain-of-youth.html) (no, "live longer" is not the trick, it's caloric restriction)
* [How Your Inner Athlete Makes You Smarter](http://news.yahoo.com/s/livescience/20080806/sc_livescience/howyourinnerathletemakesyousmarter)
* [Top 10 Mysteries of the Mind](http://www.livescience.com/health/top10_mysteriesofthemind-1.html)
* [Collected Writing of Don DeGracia](http://www.geocities.com/ddegraci/) - pertains to lucid dreams & astral projection. I originally found his writings on a BBS in about 1999, and the files I found were from Compuserve in 1994. Wow.
* Software for binaural beating: [binaural](http://sourceforge.net/projects/binaural), [sbagen](http://sourceforge.net/projects/sbagen), [AutoZen](http://freshmeat.net/projects/autozen/)
**Political stuff**
* [Corporate Swine](http://corporateswine.net/) - certain companies, and why they suck.
* [They Rule](http://www.theyrule.net/) - "They Rule aims to provide a glimpse of some of the relationships of the US ruling class." The page is almost all Flash-based, but given its interface I don't see how else it could have been done. Check it out.
* [SaveNetRadio](http://www.savenetradio.org/)
**Food**
* [The cottage cheese page](http://www.stumptuous.com/cms/displayarticle.php?aid=23) - more things to make with cottage cheese than I thought was possible
* [Kalyn's Kitchen](http://kalynskitchen.blogspot.com/) - a blog with lots of colorful pictures... oh, and recipes
**Music**
* [Netlabels collection](http://www.archive.org/details/netlabels) at Internet Archive; "This collection hosts complete, freely downloadable/streamable, often Creative Commons-licensed catalogs of 'virtual record labels'."
* [Discogs](http://www.discogs.com/) - lots of information on music from obscure labels and artists
* [Tangerine Dream](http://en.wikipedia.org/wiki/Tangerine_Dream) - I wrote this band down in 2005 and I haven't listened to them yet
* ["My Freedom" by Beat Foundation](http://www.imeem.com/groups/rGPu33gx/music/f-kqrsX2/beat_foundation_my_freedom/) - yet another ambient (or chillout?) track I liked, from Cafe Del Mar: Ibiza vol. 3 ([Amazon](http://www.amazon.com/Caf%C3%A9-del-Mar-Ibiza-Vol/dp/B00000JWQ1))
**Literature and Other Stuff With Words**
* ["Mysterious Stranger"](http://www.shsu.edu/~eng_wpf/authors/Twain/Mysterious-Stranger.htm) by Mark Twain
* and a very creepy claymation version [here](http://www.youtube.com/watch?v=PodRqjeUBjw)
* ["The War Prayer"](http://www.ntua.gr/lurk/making/warprayer.html) also by Mark Twain
**Technical Stuff**
* [SynDEx](http://www-rocq.inria.fr/syndex/) from INRIA - "a system level CAD software based on the "algorithm- architecture adequation" (AAA) methodology, for rapid prototyping and optimizing the implementation of distributed real-time embedded applications onto "multicomponent" architectures."
* [Data visualization tools for Linux](http://www.ibm.com/developerworks/linux/library/l-datavistools/) - covers [GnuPlot](http://www.gnuplot.info/), [Octave](http://www.gnu.org/software/octave/), [Scilab](http://www.scilab.org/), [MayaVi](http://mayavi.sourceforge.net/), [Maxima](http://maxima.sourceforge.net/), [OpenDX](http://www.opendx.org/)
* [gnuplot tips](http://t16web.lanl.gov/Kawano/gnuplot/index-e.html) & not so frequently asked questions
* [memcached](http://www.danga.com/memcached/) - "a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load."
* [BeOS bootdisk collection](http://bootdisks.beuser.de/) which I have no idea if I'll ever use but here it is
* [Thesis paper](http://www.erights.org/talks/thesis/index.html) from Mark Samuel Miller (Robust Composition: Towards a Unified Approach to Access Control and Concurrency Control)
* Another [thesis paper](http://publications.csail.mit.edu/lcs/specpub.php?id=773), by D. P. Reed (Naming and Synchronization in a Decentralized Computer System)
* [P2P-Radio](http://p2p-radio.sourceforge.net/) - Internet radio distributed via peer-to-peer means
* [PGP Digital Timestamping Service](http://www.itconsult.co.uk/stamper.htm)
* [Manent](http://freshmeat.net/projects/manent) - algorithmically strong backup and archival program
* [DSPACE](http://www.dspace.org/) - an open source solution for accessing, managing, and preserving scholarly works
**Shiny Technical Stuff**
* [Project Looking Glass](http://www.sun.com/software/looking_glass/) from Sun Microsystems
* [Videos](http://www.croquetconsortium.org/index.php/Screenshots/Videos) of Croquet from Croquet Consortium
* [LaTeX Beamer Class](http://latex-beamer.sourceforge.net/) - something for making presentations in LaTeX
* [http://www.visualcube.org/](http://www.visualcube.org/) - 3D volumetric display with 6x6x6 voxels
**Electronics/Programming/Lower-level**
* More FPGA stuff - [Xilinx USB/Parallel JTAG cables on Linux without proprietary kernel modules](http://rmdir.de/~michael/xilinx/)
* [OpenOCD](http://openocd.berlios.de/web/) - Open on-chip debugger, ISP, boundary scan
* [Objective C & programming musics](http://jaortega.wordpress.com/category/objective-c/) at another wordpress blog
* [GNUstep mini tutorials](http://www.gnustep.it/nicola/Tutorials/index.html)
* [Implementing an Interpreter; or, Going Fast Without Writing Code](http://www.sidhe.org/~dan/presentations/Parrot_Implementation.pdf) - good presentation on the [Parrot Virtual Machine](http://www.parrotcode.org/)
* [Perl 6 and the Parrot Virtual Machine](http://www.cs.helsinki.fi/u/pohjalai/k05/okk/seminar/Fagerholm-Parrot.pdf)
* Ken Silverman's [voxel engine](http://advsys.net/ken/voxlap.htm) with source code available
**Flame Wars about technical stuff
**
* [On the Thesis that X is Big/Bloated/Obsolete and Should Be Replaced ](http://linuxfinances.info/info/xbloat.html)because I've heard that too many times
* [BSD vs. Linux](http://www.over-yonder.net/~fullermd/rants/bsd4linux/bsd4linux1.php)
* ["He Who Controls the Bootloader"](http://www.birdhouse.org/beos/byte/30-bootloader/) by Scot Hacker (it's from 2001)
* [Essay](http://lists.essential.org/info-policy-notes/msg00005.html) by Jean-Louis Gassee (of BeOS fame) on why PC makers don't sell non-MS stuff
* [Article](http://www.theregister.co.uk/2001/08/31/jean_louis_gass_233_e/) on a similar matter
**Games**
* [Interview with Wendell Hicken](http://arstechnica.com/articles/culture/scorched.ars), creator of [Scorched Earth](http://scorch.classicgaming.gamespy.com/) which is only one of my favorite games ever
* [Outcast](http://en.wikipedia.org/wiki/Outcast_(game)#Technology) - some voxel-based engine that was very well-done, apparently

View File

@@ -0,0 +1,108 @@
---
author: Chris Hodapp
comments: true
date: 2008-09-27 04:08:24+00:00
layout: post
slug: 20080822-20080926-or-something-like-that
title: 2008.08.22 - 2008.09.26 or something like that
wordpress_id: 99
categories:
- Scratch
tags:
- Hardware
---
**Reference stuff**
* [National Criminal Justice Reference Service](http://ncjrs.gov/) - good collection of papers and resources from the DOJ
* [Secrecy News](http://www.fas.org/blog/secrecy/) - "Secrecy News from the FAS Project on Government Secrecy", [FAS](http://www.fas.org/)=Federation of American Scientists
* [Stanford Engineering Everywhere](http://see.stanford.edu/SEE/Courses.aspx) - free online courses from Stanford in CS, AI, and Linear Systems & Optimization; includes transcripts and video lectures
* ["Life Incorporated"](http://rushkoff.com/books/life-incorporated/) by Doug Rushkoff, or "How We Traded Meaning for Markets, Society for Self Interest, and Citizenship for Customer Service."
* ["Fooled by Randomness"](http://www.amazon.com/Fooled-Randomness-Hidden-Chance-Markets/dp/0812975219/ref=ed_oe_p) by Nassim Nicholas Taleb, or "The Hidden Role of Chance in Life and in the Markets"
**Technical stuff**
* [Creating DjVu documents in Linux howto](http://www.bcri.ucc.ie/~vk1/djvu-HOWTO.html)
* [Kicad libraries converted from EAGLE](http://library.oshec.org/)
* [pfSense](http://www.pfsense.com/) - "free, open source customized distribution of [FreeBSD](http://www.freebsd.org/) tailored for use as a firewall and router."
* [How to apply color curves in ImageMagick](http://www.imagemagick.org/Usage/color/#curves) - came in handy for optimizing files from massive numbers of scans before DjVu conversion
* [Internetworking Technology Handbook](http://www.cisco.com/en/US/docs/internetworking/technology/handbook/ito_doc.html) from Cisco - lots of freely available guides
* [FreeMind](http://freemind.sourceforge.net/) - a free [mind-mapping](http://en.wikipedia.org/wiki/Mind_map) program written in Java. I haven't used it much yet, but it looks really useful.
* [Mathesaurus](http://mathesaurus.sourceforge.net/) - quick reference for switching to open-source mathematical computation environments for computer algebra, numeric processing and data visualisation (e.g. MATLAB to Octave/SciLab/Python+Numpy)
* [Advice in Mini-ITX](http://myreader.co.uk/msg/10238071.aspx) - mailing list conversation
* [KolibriOS](http://www.kolibrios.org/) - OS for x86 written in assembly; runs on one floppy; a fork of MenuetOS. This runs well in VirtualBox.
**Music, demoscene, and other shiny stuff**
* [Future Crew - Second Reality](http://www.youtube.com/watch?v=8G_aUxbbqWU) - very impressive demo from 1993 (actual program for DOS [here](http://www.pouet.net/prod.php?which=63))
* [ChibiTracker](http://www.chibitracker.com/) - portable Impulse Tracker clone (i.e. "a small, compact music composing application that is easy to learn and powerful enough to sound good"); GPLed and runs on Windows, Linux, MacOS, BSD, and BeOS
* [Map of Science](http://mapofscience.com/) - trying to visualize connections between various sciences... Flash-based and interactive and kinda neat
**Miscellaneous**
* [10 Steps to Becoming Enlightened](http://www.ascendedbeings.com/forums/index.php?showtopic=3&mode=threaded) (yeah, slightly lofty title)
* [List of Fallacious Arguments](http://www.don-lindsay-archive.org/skeptic/arguments.html)
* [38 Ways to Win an Argument](http://www.searchlores.org/schopeng.htm) - from Schopenhauer's "The Art of Controversy" (which can be found [here](http://ebooks.adelaide.edu.au/s/schopenhauer/arthur/controversy/))
* [The Happiness Project](http://happiness-project.com/) - read about this in Citybeat; "I recount some of my adventures and insights as I grapple with the challenge of being happier," from an author before the release of her book by the same name in late 2009.
* [Intelius](http://www.intelius.com/) - People search, free and apparently pretty good
**Religious**
* [Major Writings of Nichiron Daishonin](http://nichiren.info/gosho.html)

View File

@@ -0,0 +1,156 @@
---
author: Chris Hodapp
comments: true
date: 2008-11-09 17:33:09+00:00
layout: post
slug: 20080926-20081109-really-overdue-stuff
title: 2008.09.26 - 2008.11.09, really overdue stuff
wordpress_id: 101
categories:
- Scratch
tags:
- books
- economics
- electricity
- graphics
- linux
- Music
- networking
- programming
---
**Linux**
* [http://www.spencerstirling.com/computergeek/powersaving.html](http://www.spencerstirling.com/computergeek/powersaving.html) - "Saving Energy in Linux" from Spencer Stirling
* [PowerTOP](http://www.lesswatts.org/projects/powertop/) - tool to assist with such energy-saving (on Intel boxes at least) by telling how well hardware power-saving is utilized and which software is causing problems
* [Improving Boot Time on a General Linux Distro](http://blog.crozat.net/2008/09/improving-boot-time-on-general-linux.html) from Frederic Crozat
* [Handy One-Liners for sed](http://student.northpark.edu/pemente/sed/sed1line.txt) from Eric Pement... I used the venerable [sed](http://www.grymoire.com/Unix/Sed.html) extensively at work to un-screw-up CSV files
* [MediaTomb](http://mediatomb.cc/) - an open source UPnP media server with a web interface; my coworker Uriah said he used this to stream things to his PS3 from his Linux box
**Graphics**
* [MeshLab](http://meshlab.sourceforge.net/) - free 3D triangular mesh processing software
* [Caustics Mapping](http://graphics.cs.ucf.edu/caustics/) from UCF
**Networking**
* [A Look at NoMachine NX](http://www.gnome.org/~markmc/a-look-at-nomachine-nx.html) - I discovered NX performs better for remote access than anything else I've tried (i.e. RDP, X11, VNC, and straight SSH+screen if you happen to need GUI), particularly over slow links. Unfortunately, it doesn't handle links with 93% packet loss very well.
* [Quagga Routing Suite](http://www.quagga.net/) - GPLed routing software for IPv4/IPv6 that handles a number of routing-related protocols (a list of them is [here](http://www.quagga.net/docs/docs-info.php#SEC5))
* [Yersinia](http://www.yersinia.net/) - network tool designed to take advantage of some weaknesses in different network protocols... I haven't used this but the guys from cinci2600 did a presentation with it
* [Etherboot/gPXE booting](http://etherboot.org/wiki/index.php) - an open source network bootloader, providing a direct replacement for many proprietary PXE ROMs. I have yet to try this.
* [LTSP, Linux Terminal Server Project](http://www.ltsp.org/) - adds thin-client support to Linux servers, so thin clients or dumpster PCs can be used for something useful within a school or business.
**Programming/general computer stuff**
* ["Roles Before Objects"](http://g.oswego.edu/dl/rp/roles.html) by Doug Lea - some sort of pattern for software development, particularly for "organizing activities that separate object-independent from object-dependent matters"
* ["10 Amazingly Alternative Operating Systems etc."](http://royal.pingdom.com/2008/09/26/10-amazingly-alternative-operating-systems-and-what-they-could-mean-for-the-future/) - maybe overly prophetic and lofty, but a good article nonetheless
* [Twibright Optar](http://ronja.twibright.com/optar/) - OPTical ARchiver, a codec for encoding data on paper; it gets about 200 KB per page at 200 DPI which is reliable for most paper, and contains some pretty heavy error correction. This might be neat for long-term archival purposes of smaller data.
**Other projects**
* [MAgtALo](http://occam.computing.dundee.ac.uk/arg/?page_id=14) (MultiAgent Argumentation, Logic and Opinion) - a prototype tool for virtual round-table meetings. I don't really know much about this. I just read about it in some IEEE publication I found on the ground.
* [LibriVox](http://librivox.org/) - free audiobooks from the public domain
* [Geographic British Isles](http://www.geograph.org.uk/) - a project aiming to collect geographically representative photographs of every square kilometer of Great Britain and Ireland
**Electricity**
* ["High Voltage Sparks and Arcs"](http://capturedlightning.com/frames/longarc.htm) - My friend Mark found this, and it has a collection of videos and photos of some pretty spectacular incidents at high voltages. The only casualties are machines, if you are worried.
* [How Transistors REALLY Work](http://amasci.com/amateur/transis.html), from William Beaty who is annoyed at the way many textbooks teach transistors to students
**Music**
* [Lunar](http://lunarmusic.net/) - an artist Jeremy likes, self-described as "An eclectic blend of electronica, rock, dance, ambient, drum 'n' bass and classical." They have two albums available for free download as of now.
**Tinfoil hat stuff**
* Money Masters: How International Bankers Gained Control of America ([Google Video link](http://video.google.com/videoplay?docid=-515319560256183936))... I don't know what to think of this, but I did watch it.
* [Maltego](http://www.paterva.com/maltego/): "Maltego is an [open source intelligence](http://en.wikipedia.org/wiki/Open_source_intelligence) and forensics application. It allows for the mining and gathering of information as well as the representation of this information in a meaningful way."
**Economics of the non-tinfoil-hat variety**
* ["Where to put your money if it's just sitting in a checking account"](http://www.spoofee.com/forums/showthread.php?t=26285)
* [ABSEL](http://absel.org/) - Association for Business Simulation and Experiential Learning; "professional association whose purpose is to develop and promote the use of experiential techniques and simulations in the field of business education and development"
* [M.U.L.E.](http://en.wikipedia.org/wiki/M.U.L.E.) - an early video game that was praised for its elements of economic simulation
* The Progress Paradox: How Life Gets Better While People Feel Worse, by Gregg Easterbrook ([Amazon link](http://www.amazon.com/Progress-Paradox-Better-While-People/dp/0679463038))
**Other stuff**
* [Anti-pattern](http://en.wikipedia.org/wiki/Anti-pattern) - something that distinguishes itself from a conventional bad idea or bad practice in a particular way; "Some repeated pattern of action, process or structure that initially appears to be beneficial, but ultimately produces more bad consequences than beneficial results."
<!-- more -->

View File

@@ -0,0 +1,13 @@
---
author: Chris Hodapp
comments: true
date: 2009-04-21 01:32:16+00:00
layout: post
slug: '20090420'
title: 2009.04.20
wordpress_id: 105
categories:
- Scratch
---
2009.04.20 - If I am lucky, then this text file is being posted from the commandline via blogpost from http://srackham.wordpress.com and possibly screwed-up by being processed first by AsciiDoc which I have not yet bothered to learn.

View File

@@ -0,0 +1,14 @@
---
author: Chris Hodapp
comments: true
date: 2009-04-21 02:28:02+00:00
layout: post
slug: 20090420b
title: 2009.04.20b
wordpress_id: 107
categories:
- Scratch
---
* This hopefully occurs in a bulleted list.
* This hopefully is a URL: [http://www.methods.co.nz/asciidoc/asciidoc.css-embedded.html](http://www.methods.co.nz/asciidoc/asciidoc.css-embedded.html)

View File

@@ -0,0 +1,28 @@
---
author: Chris Hodapp
comments: true
date: 2009-04-26 16:52:02+00:00
layout: post
slug: 20090426-2
title: 2009.04.26
wordpress_id: 137
categories:
- Scratch
tags:
- graphics
- log
---
* * *
## log
* Here is the first post made to my Wordpress in an automated way…
* I guess here is where I put "Hello, world" and for once it's actually kind of accurate because the post is going where the world can see it.
* So, uh, _Hello, world_
* * *
## log,graphics
* [http://www.pcper.com/article.php?aid=532&type=overview](http://www.pcper.com/article.php?aid=532&type=overview) (John Carmack on id Tech 6, Ray Tracing, Consoles, Physics and more)

View File

@@ -0,0 +1,13 @@
---
author: Chris Hodapp
comments: true
date: 2009-04-26 16:02:02+00:00
layout: post
slug: '20090426'
title: 2009.04.26
wordpress_id: 109
categories:
- Scratch
---
2009.04.20 == log * If I am lucky, then this text file is being posted from the commandline via blogpost from [http://srackham.wordpress.com](http://srackham.wordpress.com) and possibly screwed-up by being processed first by AsciiDoc which I have not yet bothered to learn.

View File

@@ -0,0 +1,57 @@
---
author: Chris Hodapp
comments: true
date: 2009-04-27 12:53:16+00:00
layout: post
slug: 20090426-3
title: 2009.04.26
wordpress_id: 139
categories:
- Scratch
tags:
- blogs
- books
- graphics
- links
- log
- notes
---
* * *
## log
* Here is the first post made to my Wordpress in an automated way…
* I guess here is where I put "Hello, world" and for once it's actually kind of accurate because the post is going where the world can see it.
* So, uh, _Hello, world_
* Well, damn, my program has a bug that makes it impossible to post more than one entry per day. It's a very obvious bug, too.
* * *
## log,graphics
* [http://www.pcper.com/article.php?aid=532&type=overview](http://www.pcper.com/article.php?aid=532&type=overview) (John Carmack on id Tech 6, Ray Tracing, Consoles, Physics and more)
* * *
## log,graphics,links,blogs
* [http://www.tanashabitat.com/](http://www.tanashabitat.com/) (Tana's Habitat - a site Jane recommended for useful information about living on your own. It looks far more suited to her gender than to mine, but it still has some good advice.)
* * *
## log,graphics,links,blogs,notes,technobabble
* [Perl 6](http://dev.perl.org/perl6/) has two main interpreters:
* [Rakudo Perl](http://rakudo.org/) which uses [Parrot VM](http://www.parrot.org/) and PGE
* [Pugs](http://www.pugscode.org/) which uses [Haskell](http://haskell.org/) (and [Hugs](http://haskell.org/hugs/) or [GHC](http://haskell.org/ghc/))
* Stuff about [Erlang](http://erlang.org/) I should remember:
* shared-nothing, async message passing
* single assignment
* strict or eager evaluation (as compared to lazy evaluation like in Haskell)
* * *
## log,graphics,links,blogs,notes,technobabble,books
* [http://www.truly-free.org/](http://www.truly-free.org/) - The Burgomeister's Books, a large library of ebooks; you have a borrowing quota but items are downloadable and in open formats

View File

@@ -0,0 +1,58 @@
---
author: Chris Hodapp
comments: true
date: 2009-04-28 12:13:00+00:00
layout: post
slug: 20090426-4
title: 2009.04.26
wordpress_id: 141
categories:
- Scratch
tags:
- blogs
- books
- graphics
- links
- log
- notes
---
* * *
## log
* Here is the first post made to my Wordpress in an automated way…
* I guess here is where I put "Hello, world" and for once it's actually kind of accurate because the post is going where the world can see it.
* So, uh, _Hello, world_
* Well, damn, my program has a bug that makes it impossible to post more than one entry per day. It's a very obvious bug, too.
* * *
## log,graphics
* [http://www.pcper.com/article.php?aid=532&type=overview](http://www.pcper.com/article.php?aid=532&type=overview) (John Carmack on id Tech 6, Ray Tracing, Consoles, Physics and more)
* * *
## log,graphics,links,blogs
* [http://www.tanashabitat.com/](http://www.tanashabitat.com/) (Tana's Habitat - a site Jane recommended for useful information about living on your own. It looks far more suited to her gender than to mine, but it still has some good advice.)
* * *
## log,graphics,links,blogs,notes,technobabble
* [Perl 6](http://dev.perl.org/perl6/) has two main interpreters:
* [Rakudo Perl](http://rakudo.org/) which uses [Parrot VM](http://www.parrot.org/) and PGE
* [Pugs](http://www.pugscode.org/) which uses [Haskell](http://haskell.org/) (and [Hugs](http://haskell.org/hugs/) or [GHC](http://haskell.org/ghc/))
* Stuff about [Erlang](http://erlang.org/) I should remember:
* shared-nothing, async message passing
* single assignment
* strict or eager evaluation (as compared to lazy evaluation like in Haskell)
* * *
## log,graphics,links,blogs,notes,technobabble,books
* [http://www.truly-free.org/](http://www.truly-free.org/) - The Burgomeister's Books, a large library of ebooks; you have a borrowing quota but items are downloadable and in open formats
* [http://www.storyofstuff.com](http://www.storyofstuff.com) - The story of stuff - a flash video Joc sent me; it's kind of long

View File

@@ -0,0 +1,67 @@
---
author: Chris Hodapp
comments: true
date: 2009-05-01 12:10:59+00:00
layout: post
slug: '20090430'
title: 2009.04.30
wordpress_id: 147
categories:
- Scratch
tags:
- blogs
- books
- comic
- graphics
- links
- log
- notes
---
* * *
## log
* Here is the umpteenth post made to my Wordpress in an automated way…
* I guess here is where I put "Hello, world" and for once it's actually kind of accurate because the post is going where the world can see it.
* So, uh, _Hello, world_
* Did I fix my idiotic bugs yet?
* * *
## graphics
* [http://www.pcper.com/article.php?aid=532&type=overview](http://www.pcper.com/article.php?aid=532&type=overview) (John Carmack on id Tech 6, Ray Tracing, Consoles, Physics and more)
* * *
## links,blogs
* [http://www.tanashabitat.com/](http://www.tanashabitat.com/) (Tana's Habitat - a site Jane recommended for useful information about living on your own. It looks far more suited to her gender than to mine, but it still has some good advice.)
* * *
## notes,technobabble
* [Perl 6](http://dev.perl.org/perl6/) has two main interpreters:
* [Rakudo Perl](http://rakudo.org/) which uses [Parrot VM](http://www.parrot.org/) and PGE
* [Pugs](http://www.pugscode.org/) which uses [Haskell](http://haskell.org/) (and [Hugs](http://haskell.org/hugs/) or [GHC](http://haskell.org/ghc/))
* Stuff about [Erlang](http://erlang.org/) I should remember:
* shared-nothing, async message passing
* single assignment
* strict or eager evaluation (as compared to lazy evaluation like in Haskell)
* Stuff about Smalltalk I should remember:
* ["Messaging" is more important than "objects"](http://lists.squeakfoundation.org/pipermail/squeak-dev/1998-October/017019.html)
* * *
## books
* [The Burgomeister's Books](http://www.truly-free.org/), a large library of ebooks; you have a borrowing quota but items are downloadable and in open formats
* [The story of stuff](http://www.storyofstuff.com), a flash video Joc sent me; it's kind of long but worth the watch
* * *
## comic
* [This Modern World](http://thismodernworld.com/) by Tom Tomorrow - a webcomic and blog I first came across in Citybeat, but came across by accident later

View File

@@ -0,0 +1,40 @@
---
author: Chris Hodapp
comments: true
date: 2009-05-02 11:59:57+00:00
layout: post
slug: '20090501'
title: 2009.05.01
wordpress_id: 149
categories:
- Scratch
tags:
- Hardware
- local
- software
---
* * *
## software
* [Finnix](http://www.finnix.org/), 'Finnix is a self-contained, bootable Linux CD distribution ("LiveCD") for system administrators, based on Debian testing"; I came across this while looking at what common distros were out there for PowerPC since I recently acquired an iBook.
* [Open64](http://www.open64.net/), the Open Research Compiler, "an open source, optimizing compiler for the Intel IA-64 (Itanium), AMD Opteron and Intel IA-32e architecture"
* [GCC UPC](http://www.intrepid.com/upc.html) - extensions to GCC to provide a compilation and execution environment for [Unified Parallel C](http://upc.gwu.edu/)
* "UPC is an extension of the C programming language designed for high-performance computing on large-scale parallel machines, including those with a common global address space (SMP and NUMA) and those with distributed memory (eg. clusters)."
* * *
## local
* [http://hackerspaces.org/wiki/Cincinnati](http://hackerspaces.org/wiki/Cincinnati) - Hackerspace wiki for the currently-under-heavy-development Cincinnati Hackerspace
* Also [http://cincinnatihackspace.wikispaces.com/](http://cincinnatihackspace.wikispaces.com/)
* * *
## hardware
* Awesome MIPSy stuff:
* Lemote Fulong miniPC ([Linuxdevices story](http://www.linuxdevices.com/news/NS8003782690.html)) - powered by a 666 MHz Loongson 2E
* Rather similar to the $150 YellowSheepRiver "Municator" ([Another Linuxdevices story](http://www.linuxdevices.com/news/NS6301677114.html)) based on a 500 MHz 64-bit Godson-2
* [Lemote YeeLoong](http://www.lemote.com/english/yeeloong.html), a laptop with completely free software (including BIOS and firmware) and a power usage of about 12W, based on an 800 MHz Loongson 2F; Richard Stallman supposedly uses one of these

View File

@@ -0,0 +1,27 @@
---
author: Chris Hodapp
comments: true
date: 2009-05-04 11:54:41+00:00
layout: post
slug: '20090503'
title: 2009.05.03
wordpress_id: 151
categories:
- Scratch
tags:
- education
- software
- video
---
* * *
## software,education
* [Scratch](http://scratch.mit.edu/): "Scratch is a new programming language that makes it easy to create your own interactive stories, animations, games, music, and art--and share your creations on the web. Scratch is designed to help young people (ages 8 and up) develop 21st century learning skills."
* * *
## video
* [Dr. Horrible's Sing-Along Blog](http://www.hulu.com/watch/28343/dr-horribles-sing-along-blog#s-p1-st-i0) - I don't know what this is but my friend Patrick tells me I should watch it.

View File

@@ -0,0 +1,71 @@
---
author: Chris Hodapp
comments: true
date: 2009-06-15 12:06:08+00:00
layout: post
slug: 2009-06-14-4
title: 2009.06.14
wordpress_id: 162
categories:
- Scratch
tags:
- article
- diy
- food
- game
- geometry
- links
- log
- motivational
- photography
- practical
---
* * *
## log
* Well, after my computer exploded and my hard drive became an orphan, I finally built a working computer again and fixed up my scripts so they didn't suck. Now I shall attempt to post the giant piles of stuff that have accumulated.
* * *
## diy,links
* [The Repair Manifesto](http://www.boingboing.net/2009/03/03/repair-manifesto.html) from Platform 21 - worth thinking about.
* * *
## motivational,practical
* [Twelve Steps to Practical Problem Solving](http://www.heifer.org/site/c.edJRKQNiFiG/b.3955149/) by Paul Polak
* [No Nonsense Self-Defense](http://nononsenseselfdefense.com/) - This is a helpful site. The author gives a vast collection of useful, well-informed articles about self-defense - and why too much of martial arts completely misses the point of it.
* * *
## food,photography
* [http://www.tastespotting.com/](http://www.tastespotting.com/) - My friend Cassie sent me this link. In its own words: "Think of TasteSpotting as a highly visual potluck of recipes, references, experiences, stories, articles, products, and anything else that inspires exquisite taste."
* * *
## game,geometry
* [The eyeballing game](http://woodgears.ca/eyeball/about.html) - Another link from Cassie… it's a Flash game that's sort of interesting, related to one's ability to eyeball something and tell if it's straight
* [Nomic Game](http://c2.com/cgi/wiki?NomicGame) - A paperwork table game that looks a bit complex to actually play. The object of the game is to change the rules of the game.
* * *
## article
* [The Score: How childbirth went industrial](http://www.newyorker.com/archive/2006/10/09/061009fa_fact?currentPage=all) - An article in The New Yorker giving a (critical) opinion of why C-section is used so often. Interesting read.
* [Perils of pop philosophy](http://www.juliansanchez.com/2009/06/01/perils-of-pop-philosophy/)
* Probably related to [Dunning-Kruger effect](http://en.wikipedia.org/wiki/Dunning-Kruger_effect) - "…people reach erroneous conclusions and make unfortunate choices but their incompetence robs them of the metacognitive ability to realize it"
* [The Zen of Drinking Alone](http://www.moderndrunkardmagazine.com/issues/03_03/03-03_zen_drinking_alone.htm) from Modern Drunkard Magazine. I can't say I've ever heard of Modern Drunkard before, but this is a surprisingly cogent article about the value of… drinking alcohol alone, or "using alcohol to find your inner monkey".
* Well, more of an essay than an article… [On Liberty](http://www.bartleby.com/130/) by John Stuart Mill is something I should probably read at some point
* * *
## music
* [Jake Speed and the Freddies](http://www.freddiesmusic.com/) - just saw them at the Southgate House and was extremely impressed, despite that ordinarily I'd never listen to "folk blues" voluntarily.
* [StumbleAudio](http://www.stumbleaudio.com/) - I don't really know what this is. but I wrote it down, so maybe it's good. "Guide to discovering music and sharing great new music."

View File

@@ -0,0 +1,51 @@
---
author: Chris Hodapp
comments: true
date: 2009-06-15 12:06:26+00:00
layout: post
slug: 2009-06-14-5
title: 2009.06.14
wordpress_id: 164
categories:
- Scratch
tags:
- apps
- cheatsheet
- editor
- hack
- links
- linux
- programming
- scheme
- wii
---
* * *
## technobabble,links
* [http://www.cbkihong.com/index.pl?op=perltut](http://www.cbkihong.com/index.pl?op=perltut) - A tutorial on Perl from Bernard Chan that I found helpful
* * *
## apps,linux
* [http://www.linux.com/archive/feature/116353](http://www.linux.com/archive/feature/116353) - Article on [Siag Office](http://freshmeat.net/projects/siagoffice/) for those who don't feel like using any remotely mainstream office applications
* * *
## editor,cheatsheet
* [http://www.viemu.com/vi-vim-cheat-sheet.gif](http://www.viemu.com/vi-vim-cheat-sheet.gif) - A Vim cheat sheet that is essential to me.
* * *
## programming,scheme
* [Is Scheme Faster than C?](http://www.cs.indiana.edu/~jsobel/c455-c511.updated.txt) - An oldish article about some interesting performance benefits found in Scheme
* * *
## hack,wii
* [http://www.smoothboard.net/](http://www.smoothboard.net/) - Interesting thing from my friend Lincoln. It uses a Wii remote, IR transmitter, and PC (with Bluetooth) to "Transform your screen into a user-friendly interactive whiteboard with Smoothboard."

View File

@@ -0,0 +1,28 @@
---
author: Chris Hodapp
comments: true
date: 2009-06-23 07:07:44+00:00
layout: post
slug: '2009-06-15'
title: 2009.06.15
wordpress_id: 178
categories:
- Scratch
tags:
- apps
- photography
- video
---
* * *
## video,apps
* [MediaCoder](http://mediacoder.sourceforge.net/) - "a free universal batch media transcoder, which nicely integrates most popular audio/video codecs and tools into an all-in-one solution." Only natively works on Windows, but came in handy trying to re-encode some video at work after I found that fixounet.free.fr/avidemux/ liked to either crash or screw up the encode (on Windows at least as I know I've used it without problems on Linux)
* [CamStudio](http://camstudio.org/) - An open source screen recorder (screencast?) application. Only works on Windows, but works pretty well.
* * *
## photography,apps
* [http://www.linux.com/archive/feature/58887](http://www.linux.com/archive/feature/58887)

View File

@@ -0,0 +1,21 @@
---
author: Chris Hodapp
comments: true
date: 2009-06-23 07:07:55+00:00
layout: post
slug: '2009-06-16'
title: 2009.06.16
wordpress_id: 180
categories:
- Scratch
tags:
- Music
---
* * *
## music
* Saw these two at Rohs Street Cafe and was very impressed:
* [http://www.myspace.com/hickoryrobot](http://www.myspace.com/hickoryrobot)
* www.myspace.com/thehappymaladies

View File

@@ -0,0 +1,16 @@
---
author: Chris Hodapp
comments: true
date: 2009-06-23 07:08:03+00:00
layout: post
slug: '2009-06-18'
title: 2009.06.18
wordpress_id: 182
categories:
- Scratch
tags:
- photography
- rant
---
No Content Found

View File

@@ -0,0 +1,204 @@
---
author: Chris Hodapp
comments: true
date: 2009-06-23 07:31:07+00:00
layout: post
slug: '2009-06-19'
title: 2009.06.19
wordpress_id: 186
categories:
- Scratch
tags:
- apps
- photography
---
* * *
## apps,photography
* So, Im on a quest to find a photo organization tool for Linux (or, on a later note, for any OS) that does some things like…
* Allow me to apply metadata to images, like comments and groups and tags (preferably hierarchical)
* Store the metadata IN THE ACTUAL IMAGE, IN A STANDARD FORMAT. This also means it will probably need to support IPTC or XMP, preferably XMP. (No, shut up about GQview, it doesnt cut it.)
* Allow me to set metadata as a batch operation. I am thoroughly uninterested in having to manually go through the process of setting metadata for each individual image. And when I say "batch operation", "batch" really needs to be more generic than "all files in a directory." (No, shut up about scripting it with [ExifTool](http://www.sno.phy.queensu.ca/~phil/exiftool/) or [Exempi](http://libopenraw.freedesktop.org/wiki/Exempi) or [Exiv2](http://www.exiv2.org). Yes, they can edit XMP data on groups of files, but scripting doesnt cut it as a solution unless someone can show me how to make this integrate with a GUI.)
* Here are the apps recommended thus far:
* [digiKam](http://www.digikam.org)
* [F-Spot](http://f-spot.org/)
* [imgSeek](http://www.imgseek.net/)
* [Picasa](http://picasa.google.com/)
* [GQview](http://gqview.sourceforge.net/)
* [KPhotoAlbum](http://www.kphotoalbum.org/)
* [gThumb](http://gthumb.sourceforge.net/)
* [GwenView](http://gwenview.sourceforge.net/)
* [Mapivi](http://mapivi.sourceforge.net/)
* [LightZone](http://www.lightcrafts.com/linux/)
* [Razuna](http://www.razuna.org/)
* [Lightroom](http://www.adobe.com/products/photoshoplightroom/)
* [PicaJet FX](http://www.picajet.com)
* And my responses thus far:
* digiKam:
* Has a pretty nice UI (though overdone sometimes)
* The built-in editing features and plugins are handy and quick. Im kind of cheating here because Im already pretty familiar with digiKam.
* Searching capabilities are pretty good.
* Only wants to edit IPTC/XMP metadata one image at a time.
* All its metadata (besides IPTC/XMP that you do one image at a time) is stored in an SQLite database, not in the image
* Interface can get pretty slow sometimes.
* imgSeek:
* The interface works okay but its a little clumsy, and sometimes things are slow (I loaded about 10K pictures).
* Finding pictures based on similarity to other pictures or to a hand-drawn image is an interesting feature.
* The grouping/batching features are powerful, but a bit slow.
* I am unsure if imgSeek lets me add IPTC or XMP data easily.
* There is no easy way I can see to search based on date.
* F-Spot:
* Im told the IPTC/XMP support in this isnt that great.
* I have yet to try this program.
* LightZone:
* This is proprietary, but they have a 30-day trial.
* "Linux users will especially enjoy access to the new LightZone Relight Tool l which can achieve HDR effects from a single negative revealing hidden HDR detail in both the highlights and the shadows, using just a single exposure. For instance, youll see both saturated colors of a sunset and bright detail in the face of a back lit subject that was formerly lost. Achieving such stunning results from a single exposure without LightZone would require multiple flashes, reflectors and shades at the time the photographif it could be possible at all." . . . sorry, but if you honestly believe this, you dont have the slightest understanding what HDR is. Oh well, its all marketing.
* Having tried this software, I cannot see any batch metadata editing capability, or any reason why Id want to pay for this.
* PicaJet FX:
* This is proprietary with a 15-day trial.
* I tried this software and could not find any batch-editing features for XMP.
* Lightroom
* This is the expensive stuff from Adobe ($300, but theres a 30-day trial). Some people in #photogeeks on Freenode recommended it.
* This is a "workflow app designed for professional photographers" and its from Adobe. If anything at al supports XMP batch-editing, and a billion other features, this would have to be it.
* Razuna
* I dont know. This is an open source, web-based Digital Asset Management application.
* It looks very nice (check out the videos there), but I dont think its what I need for this task.
* Any application I failed to mention: I either ignored it on the basis of provided specifications, or I ignored it because Im just too lazy.

View File

@@ -0,0 +1,140 @@
---
author: Chris Hodapp
comments: true
date: 2009-07-22 02:22:28+00:00
layout: post
slug: '2009-07-21'
title: 2009.07.21
wordpress_id: 188
categories:
- Scratch
tags:
- books
- games
- historical
- links
- lit
- local
- programming
- software
- video
---
* * *
## local,links
* [Queen City Discovery](http://queencitydiscovery.blogspot.com/) - An interesting blog about urban exploration in Cincinnati that some guys in [Hive13](http://www.hive13.org/) told me about
* Amidst a pile of other new-age and holistic bullshit in some free magazine, I miraculously discovered an ad for the "Uptown Farmers Market" at Garden Park - 3581 W. Galbraith Road, Fridays 12-7, Saturdays 10-2, 513-238-6616
* In trying to find a record that this existed, I came across the [Central Ohio River Valley Local Foods Guide](http://www.eatlocalcorv.org/) (which does indeed acknowledge that this market exists).
* * *
## programming
* [MapReduce](http://en.wikipedia.org/wiki/MapReduce) - I dont care what your opinion of MapReduce is or how much it might suck, I am just putting this here so I will encounter it later and remember that it exists.
* [Epigrams on Programming from Alan Perlis](http://www-pu.informatik.uni-tuebingen.de/users/klaeren/epigrams.html) - Written in 1982 but still pretty true.
* * *
## software
* [Vanish: Self-Destructing Digital Data](http://vanish.cs.washington.edu/) - Pretty clever.
* * *
## video,books
* [Dan Ariely asks, Are we in control of our own decisions?](http://www.ted.com/talks/dan_ariely_asks_are_we_in_control_of_our_own_decisions.html) - A video of a talk from this guy, whos also the author of the book Predictably Irrational ([here?](http://www.amazon.com/Predictably-Irrational-Hidden-Forces-Decisions/dp/006135323X) the [official website](www.predictablyirrational.com) looks gone)
* [Nudge: Improving Decisions About Health, Wealth, and Happiness](http://www.amazon.com/Nudge-Improving-Decisions-Health-Happiness/dp/0300122233) ** Not sure why I wrote this down. I havent read it.
* [the deliberate dumbing down of america](http://www.deliberatedumbingdown.com/) by Charlotte Thomson Iserbyt - I have not yet read this but it looks good. PDF is available [here](http://www.deliberatedumbingdown.com/MomsPDFs/DDDoA.sml.pdf).
* * *
## games
* [Balance of Power](http://en.wikipedia.org/wiki/Balance_of_Power_%28video_game%29) - A geopolitics game by Chris Crawford (also with his interesting essay/article [here](http://www.erasmatazz.com/library/Balance%20of%20Power.txt)).
* * *
## lit,historical
* [We the People Network](http://www.wtpnet.org/library) - I was searching for an image of the Declaration of Independence here and discovered they have rather high-resolution scans (like, the Declaration is 63 megapixels) of that and many other historical documents too.

View File

@@ -0,0 +1,201 @@
---
author: Chris Hodapp
comments: true
date: 2009-08-14 02:31:59+00:00
layout: post
slug: '2009-08-12'
title: 2009.08.12
wordpress_id: 190
categories:
- Scratch
tags:
- books
- food
- games
- hippie
- linux
- paranoia
- programming
- software
- videos
- web
---
* * *
## videos,paranoia
* [Here](http://video.google.com/googleplayer.swf?docId=-4097602514885833865) and [here](http://video.google.com/googleplayer.swf?docId=6014022229458915912) - videos from Prof. James Duane and Officer George Bruch about why talking to the police is almost never a good idea.
* * *
## software
* [omploader](http://omploader.org/) - A place to upload files. It can also be done with a firefox extension or in a script.
* [Paperback](http://ollydbg.de/Paperbak/), from the [OllyDbg](http://www.ollydbg.de/) guy. This lets you store data on paper (about 500 KB for A4 at 600 DPI).
* * *
## web
* [HTML5 Canvas Experiment](http://9elements.com/io/?p=153) - Perhaps good for comparing different Javascript engines. It chokes on Firefox 3.5 on my Atom 330, but works well on 3.6.
* [drop.io](http://drop.io/) - A file sharing site which Wired mentioned because of its ability to set an expiration date on any file you upload. It also appears to have a collection of other, much cooler features for collaboration.
* * *
## programming,linux
* [Bash cures cancer](http://bashcurescancer.com) - Some helpful stuff for commandline Unix/Linux. It seems to have not been updated in about a year though.
* [Learn You a Haskell for Great Good!](http://learnyouahaskell.com/) - My friend Lincoln showed me this. Its a decent Haskell tutorial with some very oddball illustrations.
* [How to Design Programs](http://www.htdp.org/2003-09-26/) - A book, freely available online, which teaches software design using Scheme (or is it [DrScheme](http://www.drscheme.org/)?)
* [How to Design Worlds](http://world.cs.brown.edu/): Interactive Programming in DrScheme - Another freely available book from the same guys that made HtDP, but this one is about writing interactive applications using pure functional programming.
* * *
## games
* [Kongregate](http://www.kongregate.com/) - A large collection of rather addictive online Flash games.
* * *
## books
* [The Underground History of American Education](http://www.johntaylorgatto.com/underground/) by John Taylor Gatto; the full text is readable for free online. I havent read it, I just noted the link, so I can neither agree nor disagree with the contents of it.
* [Wishcraft](http://www.wishcraft.com/) by Barbara Sher; I came across this motivational book from [Havi Brooks](http://www.fluentself.com). I havent read this either, but I should at some point. Its free as a series of PDFs.
* * *
## food
* [Basic Beef Stew with Carrots and Mushrooms](http://find.myrecipes.com/recipes/recipefinder.dyn?action=displayRecipe&recipe_id=1142004) - made this last week and Im noting it here so I can find it later. No, I dont use bookmarks.
* * *
## hippie
* [Living on NST - Nomadic Standard Time](http://www.technomadia.com/2009/08/nst-nomadic-standard-time/) - Some post from "Tales from Technomadia".
* * *
## something
* [Seth Godins Blog](http://sethgodin.typepad.com/) - I cant remember why I saved this, but it looks like its full of thought-provoking articles.
* [The bandwidth-sync correlation…](http://sethgodin.typepad.com/seths_blog/2009/08/the-bandwidth-sync-correlation-thats-worth-thinking-about.html) is worth looking at.

View File

@@ -0,0 +1,23 @@
---
author: Chris Hodapp
comments: true
date: 2010-04-03 22:34:54+00:00
layout: post
slug: hacked-infrared-camera-attempt-1
title: 'Hacked infrared camera, attempt #1'
wordpress_id: 284
categories:
- Albums
- Project
- Technobabble
tags:
- fixphotos
---
[This page](http://geektechnique.org/index.php?id=254) at GeekTechnique discusses how most digital cameras are easily turned into infrared cameras by removing the IR blocking filter in front of the CCD, and replacing it with a filter that blocks visible light but passes IR. As luck would have it, exposed film negatives work very well as such a filter.
So I attempted this on my Kodak EasyShare CX6200, my first camera, which somehow still works after 6 years of abuse. It was surprisingly easy, minus the part where I had to manually resolder the coil which controls the shutter on the lens because it was attached by single hair-thin strands of uninsulated wire. But I digress...
gallery orderby="ID" (yeah, this is a relic from some Wordpress nonsense)
I think it's working well. It very clearly passes IR light because the IR pens for the Wii whiteboard showed up quite brightly; it blocks light from LCD monitors and passes sunlight, but red LEDs seem to show up a bit. Trying it on another camera with more manual controls, and perhaps with a sharper filter, might prove interesting.

View File

@@ -0,0 +1,31 @@
---
author: Chris Hodapp
comments: true
date: 2010-06-09 04:36:30+00:00
layout: post
slug: angry-rants-2010-summer-edition
title: Angry Rants, 2010 Summer edition
wordpress_id: 380
categories:
- rant
---
Apparently I have written a lot of angry rants this quarter while I was supposed to be studying. Since I'm throwing the paper away anyhow, I'll go ahead and put its contents here:
1. If its creators pay it little respect, do I really owe it any respect beyond this?
2. Every hour I work in the world of numbers, algorithms, and electronics convinces me further of the value of humans.
3. His refusal to play your game does not mean he is stupid. The fact that he is playing some other game does not mean he is stupid. His neglect of what is a high priority for you does not mean he is stupid. His focus is a separate context from your chosen context does not mean he is stupid. His rank in your game does not mean he is stupid. 99% of your definitions of "stupid" consist of defining part of you as a standard and then labeling everything else that falls short. Why not, instead of dismissing it all, you pull your head out of your ass and learn how people actually behave? I don't want you to regard all people as equal and correct in their own way or all with equally valid viewpoints or engage in any other pointless exercise in vague relativism. I want you, when you think you're surrounded by idiots, to take a good, hard look at how contrived and confused your own definition of "idiot" is, instead of just putting up another brick in the wall that closes off your mind further.
4. Your game is a game, not reality. Go ahead and judge people on their ability to play, but recognize it for what it is instead of insisting that the game is some sort of universal truth.
5. Use abrasive speech that wears through a person's ignorance, and expect a backlash as though you'd shredded that person's clothes off.
6. It's pretty straightforward. When I see you judge a person by one facet of their behavior, you have in your mind turned that person into a tiny fraction of one. I can't expect you to not have instincts or emotions, but I can expect you to carry about you a self-awareness that turns you from an instinctive, emotional animal into a rational human.
7. My realm of familiarity is a dead end.
8. Moment of clarity, drowned in a sea of distraction.
No, I have no idea what I meant.

View File

@@ -0,0 +1,25 @@
---
author: Chris Hodapp
comments: true
date: 2010-11-19 02:38:42+00:00
layout: post
slug: venue-222-rooftop
title: Venue 222 rooftop
wordpress_id: 421
categories:
- Photoblog
tags:
- cincinnati night photo
---
Gawd, it's been forever since I've posted. Seeing Mandy post wonderful pictures regularly at http://kalpanasutra.wordpress.com/ has been an inspiration, but alas, I am still incredibly lazy when it comes to blog posting. I'm working on it.
In the midst of an eggnog party at Venue 222 I found myself on the roof of the 5-story building, and I absolutely loved the view of downtown Cincinnati from up there.
[![](/wp_old/2010/11/20101113-DSC_1325-685x454.jpg)](/wp_old/2010/11/20101113-DSC_1325.jpg)
[![](/wp_old/2010/11/20101113-DSC_1330-685x348.jpg)](/wp_old/2010/11/20101113-DSC_1330.jpg)
[![](/wp_old/2010/11/20101113-DSC_1338-685x454.jpg)](/wp_old/2010/11/20101113-DSC_1338.jpg)
[![](/wp_old/2010/11/20101113-DSC_1339-685x454.jpg)](/wp_old/2010/11/20101113-DSC_1339.jpg)

View File

@@ -0,0 +1,58 @@
---
author: Chris Hodapp
comments: true
date: 2010-12-05 05:46:09+00:00
layout: post
slug: cyanotypes-first-attempt
title: Cyanotypes, first attempt
wordpress_id: 459
categories:
- Project
---
Having procrastinated for around a month, I finally got around to acquiring the chemicals for a standard cyanotype (I went with [digitaltruth.com](http://www.digitaltruth.com/)) and followed the method given in "The Book of Alternative Photographic Processes" by Christopher James, which my friend Lea loaned me. I started out with a 1/5 batch of each solution (thus 20 g ferric ammonium citrate & 100 mL water, and 8 g potassium ferricyanide & 100 mL water).
The book had wonderful, detailed instructions, most of which I ignored for now because I was just trying to get the feel of the cyanotype process...
* Sunshine was in short supply and it was snowing anyway, so I used someone's UV lamp instead. It doesn't provide very even lighting, but it looks plenty bright.
* The book said to let the individual chemical mixtures "ripen" for 24 hours before mixing them. I was too impatient to do this.
* I attempted all my prints on some crappy 8.5x11 paper that is flimsy and likely has some detrimental chemicals in it.
* I probably should have invested in some clothespins to hang things up to help them dry.
* I still don't have any dark glass containers to store the mixtures in, so I just coated a jar in a layer of tape.
* I don't know where to find a hake brush, so I used some (metal-free) foam brushes from the hardware store.
Dave from Hive13 already had a transparency on hand that he had used to burn an image for screenprinting, and I used that as my negative. It had only black-and-white, but I'll try with a negative with actual gray tones later.
The first attempt sort of worked and had a clear image exposed after about 20 minutes. I thought was a good first step since it indicated that I'd mixed the chemicals properly and that the UV light was sufficient. However, when I washed the paper in cold water, nothing at all remained. This looked to me like major underexposure, or a case of the paper just being unsuited to cyanotypes.
I tried again with a different image and exposed it a little longer, but results weren't much better. Some of the darkest areas developed to a very light, almost invisible blue. I looked to the textbook for advice on how long to expose, and it said to go until the darkest parts had exposed past blue to almost a silvery-gray sort of shade.
So I tried to follow that advice on the third attempt I made... actually, I wanted to expose it longer than I did, but I needed to get back home so I rushed it a little.
Here's the exposed, but not developed, print:
[![](/wp_old/2010/12/cyanotype0001-685x523.jpg)](/wp_old/2010/12/cyanotype0001.jpg)
The gradient in the top left is a strip of paper that I moved away at periodic intervals. I placed several strips of paper to the right but they were removed first and aren't visible here. The Hive13 logo also has a faint image to the left, probably from me moving the print early in the exposure and jolting the negative a little.
I developed the print (just rinsed it in cold water until the water ran clear) and let it dry for maybe 7 hours:
[![](/wp_old/2010/12/cyanotype0002-685x533.jpg)](/wp_old/2010/12/cyanotype0002.jpg)
There are a lot of artifacts here. The darker border might be from the edges of the acetate on the negative. The things in the top left are some etching on one of the plates of glass that I used to hold the negative. In the undeveloped print, the strip to the right of that has clearly visible steps of tone, and I find it a little weird that all of these developed to pure white, while areas that are all the same color in the undeveloped print turned into clearly different tones in the developed one. I probably should read up on how to control this better.
But all in all, I'm impressed with how it turned out after 3 tries.

View File

@@ -0,0 +1,21 @@
---
author: Chris Hodapp
comments: true
date: 2010-12-30 23:09:09+00:00
layout: post
slug: cyanotypes-better-results
title: Cyanotypes & better results
wordpress_id: 473
---
Lack of some amount of sunshine is rarely a problem here, it seems. I did this next cyanotype outdoors in very overcast light while it was snowing lightly. The snow was minor since a sheet of glass covered everything, and overcast light possibly was perfect because of how even and omnidirectional it was. The contrast that I got in this print surprised me; the dark areas just turned out so much darker than the last print.
[caption id="attachment_474" align="alignnone" width="530" caption="Same paper & solution, but exposed in overcast sunlight.  "][![](/wp_old/2010/12/20101206-cyanotype0003-530x685.jpg)](/wp_old/2010/12/20101206-cyanotype0003.jpg)[/caption]
I still had sensitizer left, so I decided to try some prints on fabric as well. These I exposed for almost 2 hours, maybe longer, under a 200 watt bulb. They didn't turn out as even as I'd like, but I was rushing things a bit and some spots of the towel weren't fully dry when I started exposing. However, I'm still impressed with how it turned out.
[caption id="attachment_475" align="alignnone" width="685" caption="Exposure on a towel from Target; exposed ~ 2 hours under 200 W bulb."][![](/wp_old/2010/12/20101212-CIMG0269-685x513.jpg)](/wp_old/2010/12/20101212-CIMG0269.jpg)[/caption]
[caption id="attachment_476" align="alignnone" width="685" caption="Same towel up close(ish)"][![](/wp_old/2010/12/20101212-CIMG0270-685x513.jpg)](/wp_old/2010/12/20101212-CIMG0270.jpg)[/caption]
Rob next door to the Hive loaned me a halftone negative he had (since I had nothing else on hand in the way of transparencies) and I made a few exposures of this, but had some problems with the highlights. I really should find some negatives that aren't monochrome (as this was, being a halftone image) so I can figure out how to get the tones right.

View File

@@ -0,0 +1,38 @@
---
author: Chris Hodapp
comments: true
date: 2010-12-30 22:46:22+00:00
layout: post
slug: macro-photography-attempts-1-and-2
title: 'Macro photography, attempts #1 and #2'
wordpress_id: 464
categories:
- Photoblog
- Project
---
I picked up some very cheap extension tubes and a reversing ring for my DSLR, hoping to do some macro photography with them. However, I sort of ignored that both my lenses default to having their apertures at their narrowest setting (rather than their largest, which for some reason I assumed) until instructed otherwise whether electronically or via the aperture lever. This made it a bit more difficult to do a lot of the shots. I have a 49 to 52 mm step-up ring coming in the mail which will let me use the old SMC Pentax 50mm lens, which has an aperture ring, but it appears to be on a slow boat from China so it's not coming anytime soon.
[caption id="attachment_465" align="alignnone" width="685" caption="Part of business card"][**![](/wp_old/2010/12/20101208-DSC_1517-685x454.jpg)**](/wp_old/2010/12/20101208-DSC_1517.jpg)[/caption]
[caption id="attachment_467" align="alignnone" width="685" caption="LCD monitor"][![](/wp_old/2010/12/20101208-DSC_1533-685x454.jpg)](/wp_old/2010/12/20101208-DSC_1533.jpg)[/caption]
[![](/wp_old/2010/12/20101208-DSC_1520-685x454.jpg)](/wp_old/2010/12/20101208-DSC_1520.jpg)
CFL
[caption id="attachment_468" align="alignnone" width="685" caption="Plastic edge in alligator clips"][![](/wp_old/2010/12/20101209-DSC_1535-685x454.jpg)](/wp_old/2010/12/20101209-DSC_1535.jpg)[/caption]
[![](/wp_old/2010/12/20101209-DSC_1539-685x454.jpg)](/wp_old/2010/12/20101209-DSC_1539.jpg)
Those same alligator clips
[caption id="attachment_470" align="alignnone" width="685" caption="PCB"][![](/wp_old/2010/12/20101209-DSC_1546-685x454.jpg)](/wp_old/2010/12/20101209-DSC_1546.jpg)[/caption]
[caption id="attachment_471" align="alignnone" width="685" caption="Solder pads"][![](/wp_old/2010/12/20101209-DSC_1550-685x454.jpg)](/wp_old/2010/12/20101209-DSC_1550.jpg)[/caption]

View File

@@ -0,0 +1,35 @@
---
author: Chris Hodapp
comments: true
date: 2011-06-10 03:45:07+00:00
layout: post
slug: first-attempt-at-slide-film
title: First attempt at slide film
wordpress_id: 487
categories:
- Photoblog
---
Having acquired a Nikon FE and some lenses quite inexpensively and verifying on some cheap Walgreen film that they did indeed work, I picked up some Fuji Velvia RVP50 from Cord Camera in Kenwood back in April (it was expensive compared to what Amazon would have charged, but I wasn't about to waste a trip to Kenwood over $10ish). I'd heard enough lavish praise lumped onto slide film, particularly Velvia for its fine grain and color, so I figured it was worth a try.
Few places left will process slide film but as luck has it I am really close to [Robin Imaging](http://www.robinimaging.com/) who still processes it (and, it sounds like, might be the only lab left in Cincinnati that does). I had them scan it as well and received a disc of 6 megapixel images which is decent (I'm told you can get much higher resolution than that out of a fine-grained film, but I'm not complaining).
While, somewhat stupidly, I don't have a slide projector yet and so I've only seen the scans and the 35mm slides themselves, I still am very impressed with the results.
[caption id="attachment_495" align="alignnone" width="685" caption="Cincinnati (Over-the-Rhine specifically) near Vine"][![](/wp_old/2011/06/20110606-20-008-685x454.jpg)](/wp_old/2011/06/20110606-20-008.jpg)[/caption]
[caption id="attachment_494" align="alignnone" width="685" caption="Vine Street in about the same area"][![](/wp_old/2011/06/20110606-20-007-685x454.jpg)](/wp_old/2011/06/20110606-20-007.jpg)[/caption]
Sadly, my favorite image of the bunch is also the only one where I managed to advance the film wrong:
[caption id="attachment_493" align="alignnone" width="685" caption="E. Liberty & Walnut. I love how well the film brought out the color."][![](/wp_old/2011/06/20110606-20-006-685x454.jpg)](/wp_old/2011/06/20110606-20-006.jpg)[/caption]
[caption id="attachment_492" align="alignnone" width="454" caption="Downtown someplace for Taste of Cincinnati"][![](/wp_old/2011/06/20110606-20-005-454x685.jpg)](/wp_old/2011/06/20110606-20-005.jpg)[/caption]
[caption id="attachment_491" align="alignnone" width="685" caption="Obligatory country road shot, this one in Indiana near 56 & 156"][![](/wp_old/2011/06/20110606-20-004-685x454.jpg)](/wp_old/2011/06/20110606-20-004.jpg)[/caption]
[caption id="attachment_490" align="alignnone" width="685" caption="56 & Thuermer Hollow in Indiana... little boring, but here it is."][![](/wp_old/2011/06/20110606-20-003-685x454.jpg)](/wp_old/2011/06/20110606-20-003.jpg)[/caption]
[caption id="attachment_489" align="alignnone" width="685" caption="Cincinnati, near John & Ezzard Charles"][![](/wp_old/2011/06/20110606-20-002-685x454.jpg)](/wp_old/2011/06/20110606-20-002.jpg)[/caption]
[caption id="attachment_488" align="alignnone" width="685" caption="Over-the-Rhine & downtown Cincinnati seen from Bellevue Hill Park"][![](/wp_old/2011/06/20110606-20-001-685x454.jpg)](/wp_old/2011/06/20110606-20-001.jpg)[/caption]

View File

@@ -0,0 +1,162 @@
---
title: Fun with NX stuff
date: "2009-10-15"
author: Chris Hodapp
tags:
- Technobabble
---
So, I was trying out various NX servers because I'd had very good luck
with NX in the past and generally found it faster than VNC, RDP, or
X11 over SSH. My options appeared to be:
- NoMachine's server
([here](http://www.nomachine.com/select-package.php?os=linux&amp;id=1)),
which is free-as-in-beer but supports only 2 simultaneous sessions.
- [FreeNX](http://freenx.berlios.de/) made from the components that
NoMachine GPLed. It's open souce, but apparently is a total mess and
notoriously hard to set up. However, it doesn't limit you to two
sessions, as far as I know.
- [neatX](http://code.google.com/p/neatx/), implemented from scratch
in Python/bash/C by Google for some internal project because
apparently FreeNX was just too much of a mess. Like FreeNX, it lacks
the two-session limitation; however, it doesn't handle VNC or RDP,
only X11.
NoMachine's server was a cinch to set up (at least on Fedora). The
only thing I remember having to do is put my local hostname (idiotbox)
in `/etc/hosts`. Performance was very good (though I haven't tried
RDP or VNC over a slower link yet - only a LAN with VirtualBox's
built-in RDP server).
neatX was a bit tougher to set up, primarily because the documentation
I saw was very sparse. This
[blog post](http://people.binf.ku.dk/~hanne/b2evolution/blogs/index.php/2009/09/01/neatx-is-the-new-black)
was helpful. It advised that you should make sure you could log in
with SSH manually before checking anything else, which gave me a
starting point for my problems.
I took these notes on how I made it work:
- Install all of the dependencies it says. ALL OF THEM!
- Follow the other instructions in `INSTALL`.
- Go to `/usr/local/lib/neatx` and run `./nxserver-login`. If it
looks like this, you're probably good:
```bash
[hodapp@idiotbox neatx]$ ./nxserver-login
HELLO NXSERVER - Version 3.3.0 - GPL
NX> 105
```
If not, you may need to install some dependencies or check paths of
some things. If it complains about not being able to import
neatx.app, add something like this to the top of `nxserver-login`
(replacing that path with your own if needed, of course):
```python
import sys
sys.path.append("/usr/local/lib/python2.6/site-packages")
```
- Set up password-less login for user `nx` using something like
`ssh-keygen -t rsa` and putting the private & public keys someplace
easy to find. Check that this works properly from another host
(i.e. put the public key in the server's `authorized_keys` file in
`~nx/.ssh`, copy the private key to the client, and use `ssh -i
blahblahprivatekey nx@server` there to log in. It should look
something like this:
```bash
chris@momentum:~$ ssh -i nx.key nx@10.1.1.40
Last login: Sun Oct 11 13:11:49 2009 from 10.1.1.20
HELLO NXSERVER - Version 3.3.0 - GPL
NX> 105
```
If it asks for a password, something's wrong.
If it terminates the connection immediately, SSH is probably okay, but
something server-side with neatX is still messed up. SSH logs can
sometimes tell things.
Once I'd done all this, neatX worked properly. However, I had some
issues with it - for instance, sometimes the entire session quit
accepting mouse clicks, certain windows quit accepting keyboard input,
or things would turn very sluggish at random. But for the most part it
worked well.
After setting up SSH stuff, FreeNX server worked okay from Fedora's
packages after some minor hackery (i.e. setting user the login shell
for user `nx` to `/usr/libexec/nx/nxserver`. I haven't yet had a
chance to test it over a slow link, whether with X11 or RDP or VNC,
but it worked in a LAN just fine. Someone in the IRC channel on
FreeNode assures me that it runs flawlessly over a 256 kilobit link.
Then, for some reason I really don't remember, I decided I wanted to
run all three servers at once on the same computer. As far as I know,
all of the NX clients log in to the server initially by passing a
private key for user `nx`. The server then runs the login shell
set in `/etc/passwd` for `nx` - so I guess that shell determines
which NX server handles the session.
So, amidst a large pile of bad ideas, I finally came up with this
workable idea for making the servers coexist: I would set the login
shell to a wrapper script which would choose the NX server to then
run. The only data I could think of that the NX client could pass to
the server were the port number and the private key, and this wrapper
script would somehow have to get this data.
Utilizing the port number would probably involve hacking around with
custom firewall rules or starting multiple SSH servers, so I opted to
avoid this method. It turns out if you set `LogLevel` to `VERBOSE` in
sshd_config (at least in my version), it'll have lines like this after
every login from the NX client: ` Oct 14 18:11:33 idiotbox
sshd[15681]: Found matching DSA key:
fd:e9:5d:24:59:3c:3c:35:c5:29:74:ef:6d:92:3c:e4 ` You can get that key
fingerprint with `ssh-keygen -lf foo.pub` where foo.pub is the public
key.
So I generated 3 keys (one for neatX, NoMachine's server, and FreeNX),
added them all to **authorized_keys**, found the fingerprints, and
ended up with a script that was something like this:
```bash
#!/bin/sh
FINGERPRINT=$(grep "Found matching RSA key" /var/log/secure |
tail -n 1 | egrep -o "(..:){15}..")
if [ $FINGERPRINT == "26:dd:67:82:c1:2d:cc:c0:c6:13:ac:d4:49:0e:79:a3" ]; then
SERVER="/usr/local/lib/neatx/nxserver-login-wrapper"
elif [ $FINGERPRINT == "35:fb:bd:45:c5:71:91:ce:d6:d9:7f:0b:dc:84:f4:b3" ]; then
SERVER="/usr/NX/bin/nxserver"
elif [ $FINGERPRINT == "b5:d7:a5:18:0d:c4:fa:18:19:58:20:00:1d:3b:3c:84" ]; then
SERVER="/usr/libexec/nx/nxserver"
fi
$SERVER
```
I saved this someplace, set it executable, and set the login shell for
`nx` in `/etc/passwd` to point to it. Make sure the home directory
points someplace sensible too, as the install script for some NX
servers are liable to point it somewhere else. But as far as I can
tell, the only thing they use the home directories for is the `.ssh`
directory and all the other data they save is in locations that do not
conflict.So I copied the three public keys to the client and manually
did `ssh -i blah.key nx@whatever` on each key.
```bash
chris@momentum:~$ ssh -i freenx-key nx@10.1.1.40
HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.3.0)
NX> 105
chris@momentum:~$ ssh -i neatx-key nx@10.1.1.40
HELLO NXSERVER - Version 3.3.0 - GPL
NX> 105
chris@momentum:~$ ssh -i nomachine-key nx@10.1.1.40
HELLO NXSERVER - Version 3.4.0-8 - LFE
NX> 105
```
The different versions in each reply were a good sign, so I tried the
same keys in the client, and stuff indeed worked (at least according
to my totally non-rigorous testing). Time will tell whether or not I
completely overlooked some important details or interference.

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 KiB

View File

@@ -0,0 +1,58 @@
---
title: "Processing: DLA, quadtrees"
date: "2010-07-04"
author: Chris Hodapp
tags:
- processing
---
I first dabbled with
[Diffusion-Limited Aggregation](http://en.wikipedia.org/wiki/Diffusion-limited_aggregation)
algorithms some 5 years back when I read about them in a book (later
note: that book was
[Nexus: Small Worlds and the Groundbreaking Theory of Networks](http://www.amazon.com/Nexus-Worlds-Groundbreaking-Science-Networks/dp/0393324427?ie=UTF8&*Version*=1&*entries*=0)). The
version I wrote was monumentally slow because it was a crappy
implementation in a slow language for heavy computations
(i.e. Python), but it worked well enough to create some good results
like this:
<!-- TODO: Originally:
[![Don't ask for the source code to this](../images/dla2c.png){width=50%}](../images/dla2c.png)\
-->
![Diffusion Limited Aggregation](./dla2c.png "Don't ask for the source code to this")
After about 3 or 4 failed attempts to optimize this program to not
take days to generate images, I finally rewrote it reasonably
successfully in [Processing](http://processing.org/) which I've taken
a great liking to recently. I say "reasonably successfully" because it
still has some bugs and because I can't seem to tune it to produce
lightning-like images like this one, just much more dense
ones. Annoyingly, I did not keep any notes about how I made this
image, so I have only a vague idea. It was from the summer of 2005 in
which I coded eleventy billion really cool little generative art
programs, but took very sparse notes about how I made them.
It was only a few hours of coding total. Part of why I like Processing
is the triviality of adding interactivity to something, which I did
repeatedly in order to test that the various building-blocks of the
DLA implementation were working properly.
The actual DLA applet is at
[http://openprocessing.org/visuals/?visualID=10799](http://openprocessing.org/visuals/?visualID=10799). Click
around inside it; right-click to reset it. The various building blocks
that were put together to make this are:
[here](http://openprocessing.org/visuals/?visualID=10794),
[here](http://openprocessing.org/visuals/?visualID=10795),
[here](http://openprocessing.org/visuals/?visualID=10796),
[here](http://openprocessing.org/visuals/?visualID=10797), and
[here](http://openprocessing.org/visuals/?visualID=10798).
These are at OpenProcessing mostly because I don't know how to embed a
Processing applet in Wordpress; perhaps it's better that I don't,
since this one is a CPU hog. (*Later note:* I wonder if I can just
host these examples inline using
[Processing.js](http://processingjs.org/)...)
This blog also has an entire gallery of generative art with Processing
that I think is great:
[http://myecurve.wordpress.com/](http://myecurve.wordpress.com/)

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

@@ -0,0 +1,103 @@
---
title: Blender from a recovering POV-Ray user
date: "2011-02-07"
author: Chris Hodapp
tags:
- CG
- blender
---
This is about the tenth time I've tried to learn
[Blender](http://www.blender.org/). Judging by the notes I've
accumulated so far, I've been at it this time for about a month and a
half. From what I remember, what spurred me to try this time was
either known-Blender-guru Craig from [Hive13](http://www.hive13.org/)
mentioning
[Voodoo Camera Tracker](http://www.digilab.uni-hannover.de/docs/manual.html)
(which can output to a Blender-readable format), or my search for
something that would make it easier to do the 2D visualizations and
algorithmic art I always end up doing (and I heard Blender had some
crazy node-based texturing system...
Having a goal for what I want to render has been working out much
better than just trying to learn the program and hope the inspiration
falls into place (like it would appear all of my previous attempts
involved). This really has nothing to do with Blender specifically,
but really anything that is suitably complex and powerful. I have just
had this dumb tendency in the past few years to try to learn all of
the little details of a system without first having a motivation to
use them, despite this being completely at odds with nearly all things
I consider myself to have learned well. I'm seeing pretty clearly how
that approach is rather backwards, for me at least.
I took a lot of notes early on where I tried to map out a lot of its
features at a very high level, but most of this simply didn't matter -
what mattered mostly fell into place when I actually tried to make
something in Blender. However, knowing some of the fundamental
limitations and capabilities did help.
The interface is quirky for sure, but I am finding it to be pretty
intuitive after some practice. Most of my issues came from the big UI
overhaul after 2.4, as I'm currently using 2.55/2.56 but many of the
tutorials refer to the old version, and even official documentation
for 2.5 is sometimes nonexistent - but can I really complain? They
pretty clearly note that it is still in beta.
However, I'm starting to make sense of it. Visions and concepts that I
previously felt I had no idea how to even approach in Blender suddenly
are starting to feel easy or at least straightforward (what I'm
talking about more specifically here is how many things became trivial
once I knew my way around Bezier splines). This is good, because I've
got pages and pages of ideas waiting to be made. Some look like
they'll be more suited to [Processing](http://processing.org/) (like
the 2nd image down below) or
[OpenFrameworks](http://www.openframeworks.cc/) or one of the
too-many-completely-different-versions of Acidity I wrote.
<!-- TODO: Originals (get alt-text in?)
[![What I learned Bezier splines on, and didn&#39;t learn enough about texturing.](../images/hive13-bezier03.png){width=100%}](../images/hive13-bezier03.png)
[![This was made directly from some equations. I don't know how I'd do this in Blender.](../images/20110118-sketch_mj2011016e.jpg){width=100%}](../images/20110118-sketch_mj2011016e.jpg)
-->
![Hive13 bezier splines](./hive13-bezier03.png "What I learned Bezier splines on, and didn't learn enough about texturing.")
![Processing sketch](./20110118-sketch_mj2011016e.jpg "This was made directly from some equations. I don't know how I'd do this in Blender.")
[POV-Ray](http://www.povray.org) was the last program that I
3D-rendered extensively in (this was mostly 2004-2005, as my
much-neglected [DeviantArt](http://mershell.deviantart.com/) shows,
and it probably stress-tested the Athlon64 in the first new machine I
built more than any other program did). It's quite different from
Blender in most ways possible. POV-Ray makes it easy to do clean,
elegant, mathematical things, many of which would be either impossible
or extremely ugly in Blender. It's a raytracer; it deals with neat,
clean analytic surfaces, and tons of other things come for free (speed
is not one of them). However, I never really found a modeler for
POV-Ray that could integrate well with the full spectrum of features
the language offered, and a lot of things just felt really
kludgey. Seeing almost no progress made to the program, and being too
lazy to look into [MegaPOV](http://megapov.inetart.net/), I decided to
give up on it at some point. My attempts to learn something that
implemented RenderMan resulted mostly in me seeing how ingeniously
optimized and streamlined RenderMan is and not actually making
anything in it.
Blender feels really "impure" in comparison. It deals with ugly things
like triangle meshes and scanline rendering... ugly things that make
it vastly more efficient to accomplish many tasks. I'm quickly finding
better replacements for a lot of the techniques I relied on with
POV-Ray. For instance, for many repetitive or recursive structures, I
would rely on some simple looping or recursion in POV-Ray (as its
scene language was Turing-complete); this worked fairly well, but it
also meant that no modeler I tried would be able to grok the scene. In
Blender, I discovered the Array modifier; while it's much simpler, it
is still very powerful. On top of this, I have the interactivity of
the modeler still present. I've built some things interactively with
all the precision that I would have had in POV-Ray, but I built them
in probably 1/10 the time. That's the case for the two
work-in-progress Blender images here:
![20110131-mj20110114b](./20110131-mj20110114b.jpg "This needs a name and a better background")
![20110205-mj20110202-starburst2](./20110205-mj20110202-starburst2.jpg "This needs a name and a better background.")

View File

@@ -0,0 +1,47 @@
---
title: I can never win that context back
date: "2011-06-10"
author: Chris Hodapp
tags:
- Journal
- rant
---
I stumbled upon this:
[http://www.soyoucode.com/2011/coding-giant-under-microscope-farbrausch](http://www.soyoucode.com/2011/coding-giant-under-microscope-farbrausch)
. . . and promptly fell in love with the demos there from Farbrausch:
[.the .product](http://www.youtube.com/watch?v=3ydAHt78v2M)
[.debris](http://www.youtube.com/watch?v=rBNZ9JiFCKU)
[.kkrieger](http://www.youtube.com/watch?v=3aV1kzS5FtA)
[Magellan](http://www.youtube.com/watch?v=00SdDZyWSEs)
That melding of music and animated 3D graphics grabs a hold of me like
nothing else. I don't really know why.
The fact that it's done in such a small space (e.g. 64 KB for the
first one) makes it more impressive, of course. Maybe that should be a
sad reflection on just how formulaic the things I like are, if they're
encoded that small (although, that ignores just how much is present in
addition, in the CPU and the GPU and the OS and the drivers and in the
design of the computer), but I don't much care - formulas encode
patterns of sorts, and we're pattern-matching machines.
But leaving aside the huge programming feat of making all this fit in
such a small space, I still find it really impressive.
It's been a goal for awhile to make something that is on the scope of
that (highly-compressed demo or not, I don't much care). I've just not
made much progress to accomplishing that. My early attempts at Acidity
were motivated by the same feelings that draw me to things like this.
(Obligatory
[Second Reality](http://www.youtube.com/watch?v=8G_aUxbbqWU) as
well. Maybe I am putting myself too much in the context that it came
from - i.e. 1993 and rather slow DOS machines - but I still think it's
damn impressive. Incidentally, this is also one of the only ones I've
run on real hardware before, since apparently the only fast machine I
have that runs Windows is my work computer.)

View File

@@ -0,0 +1,118 @@
---
title: OpenFrameworks, try 1...
date: "2011-06-13"
author: Chris Hodapp
tags:
- Technobabble
- rant
---
My attempts at doing things with
[OpenFrameworks](http://openframeworks.cc/) on MacOS X have been
mildly disastrous. This is a bit of a shame, because I was really
starting to like OpenFrameworks and it was not tough to pick up after
being familiar with [Processing](https://processing.org/).
I'm pretty new to XCode, but it's the "official" environment for
OpenFrameworks on OS X, so it's the first thing I tried. The first few
attempts at things (whether built-in examples, or my own code) went
just fine, but today I started trying some things that were a little
more complex - i.e. saving the last 30 frames from the camera and
using them for some filtering operations. My code probably had some
mistakes in it, I'm sure, and that's to be expected. The part where
things became incredibly stupid was somewhere around when the mistakes
caused the combination of XCode, GDB, and OpenFrameworks to hose the
system in various ways.
First, it was the Dock taking between 15 and 30 seconds to respond
just so I could force-quit the application. Then it was the debugger
taking several seconds to do 100 iterations of a loop that had nothing
more than an array member assignment inside of it (and it had
640x480x3 = 921,600 iterations total) if I tried to set breakpoints,
thus basically making interactive debugging impossible. The debugging
was already a pain in the ass; I had reduced some code down to
something like this:
```c
int size = cam_width * cam_height * 3;
for(int i = 0; i < frame_count; ++i) {
unsigned char * blah = new unsigned char[size];
for(int j = 0; j < size; ++j) blah[j] = 0;
}
```
...after a nearly identical `memset` call was smashing the stack and
setting `frame_count` to a value in the billions, so I was really
getting quite frazzled at this.
Running it a few minutes ago without breakpoints enabled led to a
bunch of extreme sluggishness, then flickering and flashing on the
monitor and I was not able to interact with anything in the GUI (which
was the 3rd or 4th time this had happened today, with all the
Code::Blocks nonsense below). I SSHed in from another machine and
killed XCode, but the monitor just continued to show the same image,
and it appeared that the GUI was completely unresponsive except for a
mouse cursor. I had to hold the power button to reboot, and saw this
in the Console but nothing else clear before it:
```
6/13/11 1:11:19 AM [0x0-0x24024].com.google.Chrome[295] [463:24587:11560062687119:ERROR:gpu_watchdog_thread.cc(236)] The GPU process hung. Terminating after 10000 ms.
```
A little before trying XCode for a 2nd time, I had also attempted to
set up Code::Blocks since it's OpenFrameworks' "official" IDE for
Linux and Windows and XCode was clearly having . First I painstakingly
made it built from an SVN copy and finally got it to run (had to
disable FileManager and NassiShneiderman plugins which would not build
and make sure it was building for the same architecture as wxWidgets
was built for). As soon as I tried to quit it, the Dock became totally
unresponsive, then Finder itself followed along with the menu bar for
the whole system. I was not able to SSH in. Despite the system being
mostly responsive, I had to hard reset. I found a few things in the
console:
```
6/12/11 9:43:54 PM com.apple.launchd[1] (com.apple.coreservicesd[66]) Job appears to have crashed: Segmentation fault
6/12/11 9:43:54 PM com.apple.audio.coreaudiod[163] coreaudiod: CarbonCore.framework: coreservicesd process died; attempting to reconnect but future use may result in erroneous behavior
6/12/11 9:43:55 PM com.apple.ReportCrash.Root[18181] 2011-06-12 21:43:55.011 ReportCrash[18181:2803] Saved crash report for coreservicesd[66] version ??? (???) to /Library/Logs/DiagnosticReports/coreservicesd_2011-06-12-214355_localhost.crash
6/12/11 9:44:26 PM com.apple.Dock.agent[173] Sun Jun 12 21:44:26 hodapple2.local Dock[173] Error: kCGErrorIllegalArgument: CGSSetWindowTransformsAtPlacement: Singular matrix at index 2: [0.000 0.000 0.000 0.000]
```
It started up properly after a reset, but I couldn't do anything
useful with it because despite there being a script that was supposed
to take care of this while building the bundle the application was not
able to see any of its plugins, which included a compiler plugin. I
attempted a binary OS X release which had a functioning set of
plugins, but was missing other dependencies set in the projects, which
were Linux-specific. I could probably put together a working
configuration if I worked in Code::Blocks a bit, but I have not tried
yet.
This is all incredibly annoying. There is no reason a user process
should be capable of taking down the whole system like this,
especially inside of a debugger, yet apparently it's pretty trivial to
make this happen. I've written more than enough horrible code in
various different environments (CUDA-GDB on a Tesla C1060, perhaps?)
to know what to expect. I guess I can try developing on Linux instead,
and/or using Processing. I know it's not quite the same, but I've
never had a Processing sketch hose the whole system at least.
*Later addition (2011-06-20, but not written here until November because I'd buried the notes somewhere):*
I attempted to make an OpenFrameworks project built with Qt Creator
(which of course uses
[QMake](http://doc.qt.nokia.com/latest/qmake-manual.html). OpenFrameworks
relies on QuickTime, and as it happens, QuickTime is 32-bit only. If
you take a look at some of the headers, the majority of it is just
#ifdef'ed away if you try to build 64-bit and this completely breaks
the OpenFrameworks build.
Ordinarily, this would not be an issue as I would just do a 32-bit
build of everything else too. However, QMake refuses to do a 32-bit
build on OS X for some unknown reason (and, yes, I talked to some Qt
devs about this). It'll gladly do it on most other platforms, but not
on OS X. Now, GCC has no problems building 32-bit, but this does no
good when QMake keeps adding `-arch x86_64` no matter what. I
attempted all sorts of options such as `CONFIG += x86`, `CONFIG -=
x86_64`, `QMAKE_CXXFLAGS -= -arch x86_64`, or `+= -m32`, or `+= -arch i386`...
but none of them to any avail.

View File

@@ -0,0 +1,127 @@
---
title: My experiences with Apache Axis2/C
date: "2011-07-15"
tags:
- Project
- rant
- Technobabble
author: Chris Hodapp
---
(This is an abridged version of a report I did at my job; I might post
of copy of it once I remove anything that might be considered
proprietary.)
I was tasked at my job with looking at ways of doing web services in
our main application (which for an upcoming delivery is to be
separated out into client and server portions). Said application is
written primarily in C++, so naturally our first look was into
frameworks written for C or C++ so that we would not need to bother
with language bindings, foreign function interfaces, porting, new
runtimes, or anything of the sort.
Our search led us to
[Apache Axis2/C](http://axis.apache.org/axis2/c/core/). We'd examined
this last year at a basic level and found that it looked suitable. Its
primary intended purpose was as the framework that the client and
server communicated over in order to transfer our various DTOs; that
it worked over SOAP and handled most HTTP details (so it appeared) was
a bonus.
I discovered after investing considerable effort that we were quite
wrong about Axis2/C. I'll enumerate a partial list of issues here:
- **Lack of support:** There was a distinct lack of good information
online. I could find no real record of anyone using this framework
in production anywhere. Mailing lists and message forums seemed
nonexistent. I found a number of articles that were often pretty
well-written, but almost invariably by WSO2 employees.
- **Development is largely stagnant:** The last update was in 2009. In
and of itself this is not a critical issue, but combined with its
extensive list of unsolved bugs and a very dense, undocumented code
base, this is unacceptable.
- **Lack of documentation:** Some documentation is online, but the
vast majority of the extensive API lacks any documentation, whether
a formal reference or a set of examples. The most troubling aspect
of this is that not even the developers of Axis2/C seemed to
comprehend its memory management (and indeed our own tests showed
some extensive memory leaks).
- **Large set of outstanding bugs:** When I encountered the
bug-tracking website for Axis2/C (which I seem to have lost the link
for), I discovered a multitude of troubling bugs. Most of them
pertain to unfixed memory leaks (for code that will be running
inside of a web server, this is really not good). On top of this, a
2-year-old unfixed bug had broken the functionality for binary MTOM
transfers if you had enabled libcurl support, and this feature was
rather essential to the application.
- **Necessity of repetitive code:** It lacked any production-ready
means to automatically generate code for turning native C/C++
objects to and from SOAP. While it had WSDL2C, this still left
considerable repetitive work for the programmer (in many cases
causing more work rather than less) and its generated code was very
ambiguous as to its memory-management habits.
- **Limited webserver support:** Axis2/C provided modules only for
working with three web servers: Apache HTTPD, Microsoft IIS, and
their built-in test server, *axis2_http_server*. Our intended target
was Microsoft IIS, and the support for IIS was considerably less
developed than the support for Apache HTTPD. To be honest, though,
most of my woes came from Microsoft here - and the somewhat pathetic
functionality for logging and configuration that IIS has. I'm sorry
for anyone who loves IIS, but I should not be required to *manually
search through a dump of Windows system calls* to determine that the
reason for IIS silently failing is that I gave a 64-bit pool a
32-bit DLL, or that said DLL has unmet dependencies. Whether it's
Axis2/C's fault or IIS's fault that the ISAPI DLL managed to either
take IIS down or leave it an an indeterminate state no less than a
hundred times doesn't much matter to me. *(However, on the upside, I
did learn that
[Process Monitor](http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx)
from Sysinternals can be very useful in cases where you have
otherwise no real source of diagnostic information. This is not the
first time I had to dump system calls to diagnose an Axis2/C
problem.)*
- **Poor performance:** Even the examples provided in the Axis2/C
source code itself had a tendency to fail to work properly.
- Their MTOM transfer example failed to work at all with Microsoft
IIS and had horrid performance with Apache HTTPD.
- On top of this, the default configuration of Apache Axis2/C
opens up a new TCP connection for every single request that is
initiated. Each TCP connection, of course, occupies a port on
the client side. On Windows, something like 240 seconds (by
default) must pass upon that connection closing before the port
may be reused; on Linux, I think it's 30 seconds. There are
16384 ports available for this purpose. Practical result of
this: *A client with the default configuration of Axis2/C cannot
sustain more than 68 requests per second on Windows or 273
requests per second on Linux.* If you exceed that rate, it will
simply start failing. How did I eventually figure this out? By
reading documentation carefully? By looking at an API reference?
By looking at comments in the source code? No, *by looking at a
packet dump in Wireshark,* which pointed out to me the steadily
increasing port numbers and flagged that ports were being reused
unexpectedly. I later found out that I needed to compile Axis2/C
with libcurl support and then it would use a persistent HTTP
connection (and also completely break MTOM support because of
that unfixed bug I mentioned). None of this was documented
anywhere, unless a cryptic mailing-list message from years ago
counts.
So, I'm sorry, esteemed employees of [WSO2](http://wso2.org/), but to
claim that Apache Axis2/C is enterprise ready is a horrid mockery of
the term.
This concluded about 2 weeks of work on the matter. In approximately 6
hours (and I'll add that my starting point was knowing nothing about
the Java technologies), I had a nearly identical version using Java
web services (JAX-WS particularly) that was performing on the order of
twice as fast and with none of the issues with memory leaks or
stability.
P.S. Is it unique to Windows-related forums that the pattern of
support frequently goes like this?
- Me: This software is messed up. It's not behaving as it should.
- Them: It's not messed up; it works for me. You are just too dumb to
use it. Try pressing this button, and it will work.
- Me: Okay, I pressed it. It's not working.
- Them: Oh. Your software is messed up. You should fix it.

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 KiB

View File

@@ -0,0 +1,126 @@
---
title: Isolated-pixel-pushing
date: "2011-08-27"
author: Chris Hodapp
tags:
- CG
- Project
- Technobabble
---
After finally deciding to look around for some projects on GitHub, I
found a number of very interesting ones in a matter of minutes.
I found
[Fragmentarium](http://syntopia.github.com/Fragmentarium/index.html)
first. This program is like something I tried for years and years to
write, but just never got around to putting in any real finished
form. It can act as a simple testbench for GLSL fragment shaders,
which I'd already realized could be used to do exactly what I was
doing more slowly in [Processing](http://processing.org/), much more
slowly in Python (stuff like
[this](http://mershell.deviantart.com/gallery/#/dckzex) if we want to
dig up things from 6 years ago), much more clunkily in C and
[OpenFrameworks](http://www.openframeworks.cc/), and so on. It took me
probably about 30 minutes to put together the code to generate the
usual gawdy test algorithm I try when bootstrapping from a new
environment:
![Standard trippy image](./acidity-standard.png)
(Yeah, it's gaudy. But when you see it animated, it's amazingly trippy
and mesmerizing.)
The use I'm talking about (and that I've reimplemented a dozen times)
was just writing functions that map the 2D plane to some colorspace,
often with some spatial continuity. Typically I'll have some other
parameters in there that I'll bind to a time variable or some user
control to animate things. So far I don't know any particular term
that encompasses functions like this, but I know people have used it
in different forms for a long while. It's the basis of procedural
texturing (as pioneered in
[An image synthesizer](http://portal.acm.org/citation.cfm?id=325247)
by Ken Perlin) as implemented in countless different forms like
[Nvidia Cg](http://developer.nvidia.com/cg-toolkit), GLSL, probably
Renderman Shading Language, RTSL, POV-Ray's extensive texturing, and
Blender's node texturing system (which I'm sure took after a dozen
other similar
systems). [Adobe Pixel Bender](http://www.adobe.com/devnet/pixelbender.html),
which the Fragmentarium page introduced to me for the first time, does
something pretty similar but to different ends. Some systems such as
[Vvvv](http://www.vvvv.org/) and
[Quartz Composer](http://developer.apple.com/graphicsimaging/quartz/quartzcomposer.html)
probably permit some similar operations; I don't know for sure.
The benefits of representing a texture (or whatever image) as an
algorithm rather than a raster image are pretty well-known: It's a
much smaller representation, it scales pretty well to 3 or more
dimensions (particularly with noise functions like Perlin Noise or
Simplex Noise), it can have a near-unlimited level of detail, it makes
things like seams and antialiasing much less of an issue, it is almost
the ideal case for parallel computation and modern graphics hardware
has built-in support for it (e.g. GLSL, Cg, to some extent
OpenCL). The drawback is that you usually have to find some way to
represent this as a function in which each pixel or texel (or voxel?)
is computed in isolation of all the others. This might be clumsy, it
might be horrendously slow, or it might not have any good
representation in this form.
Also, once it's an algorithm, you can *parametrize it*. If you can
make it render near realtime, then animation and realtime user control
follow almost for free from this, but even without that, you still
have a lot of flexibility when you can change parameters.
The only thing different (and debatably so) that I'm doing is trying
to make compositions with just the functions themselves rather than
using them as means to a different end, like video processing effects
or texturing in a 3D scene. It also fascinated me to see these same
functions animated in realtime.
However, the author of Fragmentarium (Mikael Hvidtfeldt Christensen)
is doing much more interesting things with the program (i.e. rendering
3D fractals with distance estimation) than I would ever have
considered doing. It makes sense why - his emerged more from the
context of fractals and ray tracers on the GPU, like
[Amazing Boxplorer](http://sourceforge.net/projects/boxplorer/), and
fractals tend to make for very interesting results.
His [Syntopia Blog](http://blog.hvidtfeldts.net/) has some fascinating
material and beautiful renders on it. His posts on
[Distance Estimated 3D Fractals](http://blog.hvidtfeldts.net/index.php/2011/08/distance-estimated-3d-fractals-iii-folding-space/)
were particularly fascinating to me - in part because this was the
first time I had encountered the technique of distance estimation for
rendering a scene. He gave a good introduction with lots of other
material to refer to.
Distance Estimation blows my mind a little when I try to understand
it. I have a decent high-level understanding of ray tracing, but this
is not ray tracing, it's ray marching. It lets complexity be emergent
rather than needing an explicit representation as a scanline renderer
or ray tracer might require (while ray tracers will gladly take a
functional representation of many geometric primitives, I have
encountered very few cases where something like a complex fractal or
an isosurface could be rendered without first approximating it as a
mesh or some other shape, sometimes at great cost). Part 1 of Mikael's
series on Distance Estimated 3D Fractals links to
[these slides](http://www.iquilezles.org/www/material/nvscene2008/rwwtt.pdf)
which show a 4K demo built piece-by-piece using distance estimation to
render a pretty complex scene.
*(Later addition:
[This link](http://www.mazapan.se/news/2010/07/15/gpu-ray-marching-with-distance-fields/)
covers ray marching for some less fractalian uses. "Hypertexture" by
Ken Perlin gives some useful information too, more technical in
nature; finding this paper is up to you. Consult your favorite
university?)*
He has another rather different program called
[Structure Synth](http://structuresynth.sourceforge.net/) which he
made following the same "design grammar" approach of
[Context Free](http://www.contextfreeart.org/). I haven't used
Structure Synth yet, because Context Free was also new to me and I was
first spending some time learning to use that. I'll cover this in
another post.
*(Even later note: With [Shadertoy](https://www.shadertoy.com/) some
folks have implemented the same in WebGL.)*

View File

@@ -0,0 +1,162 @@
---
title: Context Free
date: "2011-08-29"
author: Chris Hodapp
tags:
- CG
- Project
- Technobabble
---
My [last post](./2011-08-27-isolated-pixel-pushing.html) mentioned a
program called [Context Free](http://www.contextfreeart.org/) that I
came across via the [Syntopia](http://blog.hvidtfeldts.net/) blog as
his program [Structure Synth](http://structuresynth.sourceforge.net/)
was modeled after it.
I've heard of
[context-free grammars](http://en.wikipedia.org/wiki/Context-free_grammar)
before but my understanding of them is pretty vague. This program is
based around them and the documentation expresses their
[limitations](http://www.contextfreeart.org/mediawiki/index.php/Context_Free_cans_and_cannots);
what I grasped from this is that no entity can have any "awareness" of
the context in which it's drawn, i.e. any part of the rest of the
scene or even where in the scene it is. A perusal of the site's
[gallery](http://www.contextfreeart.org/gallery/) shows how much those
limitations don't really matter.
I downloaded the program, started it, and their welcome image (with
the relatively short source code right beside it) greeted me, rendered
on-the-spot:
![welcome.png](./welcome.png)
The program was very easy to work with. Their quick reference card was
terse but only needed a handful of examples and a few pages of
documentation to fill in the gaps. After about 15 minutes, I'd put
together this:
![spiral-first-20110823.png](./spiral-first-20110823.png)
Sure, it's mathematical and simple, but I think being able to put it
together in 15 minutes in a general program (i.e. not a silly ad-hoc
program) that I didn't know how to use shows its potential pretty
well. The source is this:
```bash
startshape MAIN
background { b -1 }
rule MAIN {
TRAIL { }
}
rule TRAIL {
20 * { r 11 a -0.6 s 0.8 } COLORED { }
}
rule COLORED {
BASE { b 0.75 sat 0.1 }
}
rule BASE {
SQUARE1 { }
SQUARE1 { r 90 }
SQUARE1 { r 180 }
SQUARE1 { r 270 }
}
rule SQUARE1 {
SQUARE { }
SQUARE1 { h 2 sat 0.3 x 0.93 y 0.93 r 10 s 0.93 }
}
```
I worked with it some more the next day and had some things like this:
![tree3-abg.png](./tree3-abg.png)
![tree4-lul.png](./tree4-lul.png)
I'm not sure what it is. It looks sort of like a tree made of
lightning. Some Hive13 people said it looks like a lockpick from
hell. The source is some variant of this:
```bash
startshape MAIN
background { b -1 }
rule MAIN {
BRANCH { r 180 }
}
rule BRANCH 0.25 {
box { }
BRANCH { y -1 s 0.9 }
}
rule BRANCH 0.25{
box { }
BRANCH { y -1 s 0.3 }
BRANCH { y -1 s 0.7 r 52 }
}
rule BRANCH 0.25 {
box { }
BRANCH { y -1 s 0.3 }
BRANCH { y -1 s 0.7 r -55 }
}
path box {
LINEREL{x 0 y -1}
STROKE{p roundcap b 1 }
}
```
The program is very elegant in its simplicity. At the same time, it's
a really powerful program. Translating something written in Context
Free into another programming language would in most cases not be
difficult at all - you need just a handful of 2D drawing primitives, a
couple basic operations for color space and geometry, the ability to
recurse (and to stop recursing when it's pointless). But that
representation, though it might be capable of a lot of things that
Context Free can't do on its own, probably would be a lot clumsier.
This is basically what some of my OpenFrameworks sketches were doing
in a much less disciplined way (although with the benefit of animation
and GPU-accelerated primitives) but I didn't realize that what I was
doing could be expressed so easily and so compactly in a context-free
grammar.
It's appealing, though, in the same way as the functions discussed in
the last post (i.e. those for procedural texturing). It's a similarly
compact representation of an image - this time, a vector image rather
than a spatially continuous image, which has some benefits of its
own. It's an algorithm - so now it can be parametrized. (Want to see
one reason why parametrized vector things are awesome? Look at
[Magic Box](http://magic-box.org/).) And once it's parametrized,
animation and realtime user control are not far away, provided you can
render quickly enough.
*(And as
[\@codersandy](http://twitter.com/#!/codersandy/statuses/108180159194079232)
observed after reading this, [POV-Ray](http://www.povray.org/) is in
much the same category too. I'm not sure if he meant it in the same
way I do, but POV-Ray is a fully Turing-complete language and it
permits you to generate your whole scene procedurally if you wish,
which is great - but Context Free is indeed far simpler than this,
besides only being 2D. It will be interesting to see how Structure
Synth compares, given that it generates 3D scenes and has a built-in
raytracer.)*
My next step is probably to play around with
[Structure Synth](http://structuresynth.sourceforge.net/) (and like
Fragmentarium it's built with Qt, a library I actually am familiar
with). I also might try to create a JavaScript implementation of
Context Free and conquer my total ignorance of all things
JavaScript. Perhaps a realtime OpenFrameworks version is in the works
too, considering this is a wheel I already tried to reinvent once (and
badly) in OpenFrameworks.
Also in the queue to look at:
* [NodeBox](http://nodebox.net/code/index.php/Home), "a Mac OS X
application that lets you create 2D visuals (static, animated or
interactive) using Python programming code..."
* [jsfiddle](http://jsfiddle.net/), a sort of JavaScript/HTML/CSS
sandbox for testing. (anarkavre showed me a neat sketch he put
together [here](http://jsfiddle.net/anarkavre/qVVuD/))
* [Paper.js](http://paperjs.org/), "an open source vector graphics
scripting framework that runs on top of the HTML5 Canvas."
* Reading [generative art](http://www.manning.com/pearson/) by Matt
Pearson which I just picked up on a whim.

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 KiB

View File

@@ -0,0 +1,286 @@
---
title: "QMake hackery: Dependencies & external preprocessing"
date: "2011-11-13"
author: Chris Hodapp
tags:
- Project
- Technobabble
---
* TODO: Put the code here into a Gist?
[Qt Creator](http://qt-project.org/wiki/Category:Tools::QtCreator) is
a favorite IDE of mine for when I have to deal with miserably large
C++ projects. At my job I ported a build in Visual Studio of one such
large project over to Qt Creator so that builds and development could
be done on OS X and Linux, and in the process, learned a good deal
about [QMake](http://doc.qt.nokia.com/latest/qmake-manual.html) and
how to make it do some unexpected things.
While I find Qt Creator to be a vastly cleaner, lighter IDE than
Visual Studio, and find QMake to be a far more straightforward build
system for the majority of things than Visual Studio's build system,
some things the build needed were very tricky to set up in QMake. The
two main shortcomings I ran into were:
* Managing dependencies between projects, as building the application
in question involved building 40-50 separate subprojects as
libraries, many of which depended on each other.
* Having external build events, as the application also had to call an
external tool (no, not `moc`, this is different) to generate some
source files and headers from a series of templates.
QMake, as it happens, has some commands that actually make the project
files Turing-complete, albeit in a rather ugly way. The `eval`
command is the main source of this, and I made heavy use of it.
First is the dependency management system. It's a little large, but I'm including it inline here.
```bash
# This file is meant to be included in from other project files, but it needs
# a particular context:
# (1) Make sure that the variable TEMPLATE is set to: subdirs, lib, or app.
# Your project file really should be doing this anyway.
# (2) Set DEPENDS to a list of dependencies that must be linked in.
# (3) Set DEPENDS_NOLINK to a list of dependencies from which headers are
# needed, but which are not linked in. (Doesn't matter for 'subdirs'
# template)
# (4) Make sure BASEDIR is set.
#
# This script may modify SUBDIRS, INCLUDEPATH, and LIBS. It should always add,
# not replace.
# It will halt execution if BASEDIR or TEMPLATE are not set, or if DEPENDS or
# DEPENDS_NOLINK reference something not defined in the table.
#
# Order does matter in DEPENDS for the "subdirs" template. Items which come
# first should satisfy dependencies for items that come later.
# You'll often see:
# include ($$(BASEDIR)/qmakeDefault.pri)
# which includes this file automatically.
#
# -CMH 2011-06
# ----------------------------------------------------------------------------
# Messages and sanity checks
# ----------------------------------------------------------------------------
message("Included Dependencies.pro!")
message("Dependencies: " $$DEPENDS)
message("Dependencies (INCLUDEPATH only): " $$DEPENDS_NOLINK)
#message("TEMPLATE is: " $$TEMPLATE)
isEmpty(BASEDIR) {
error("BASEDIR variable is empty here. Make sure it is set!")
}
isEmpty(TEMPLATE) {
error("TEMPLATE variable is empty here. Make sure it is set!")
}
# ----------------------------------------------------------------------------
# Table of project locations
# ----------------------------------------------------------------------------
# Some common locations, here only to shorten descriptions in the _PROJ table.
_PROJECT1 = $$BASEDIR/SomeProject
_PROJECT2 = $$BASEDIR/SomeOtherProject
_DEPENDENCY = $$BASEDIR/SomeDependency
# Table of project file locations
# (Include paths are also generated based off of these)
_PROJ.FooLib = $$_PROJECT1/Libs/FooLib
_PROJ.BarLib = $$_PROJECT1/Libs/BarLib
_PROJ.OtherStuff = $$_PROJECT2/Libs/BarLib
_PROJ.MoreStuff = $$_PROJECT2/Libs/BarLib
_PROJ.ExternalLib = $$BASEDIR/SomeLibrary
# ----------------------------------------------------------------------------
# Iterate over dependencies and update variables, as appropriate for the given
# template type
# ----------------------------------------------------------------------------
# _valid is a flag telling whether TEMPLATE has matched anything yet
_valid = false
contains(TEMPLATE, "subdirs") {
for(dependency, DEPENDS) {
# Look for an item like: _PROJ.(dependency)
# Disclaimer: I wrote this and it works. I have no idea why precisely
# why it works. However, I repeat the pattern several times.
eval(_dep = $$"_PROJ.$${dependency}")
isEmpty(_dep) {
error("Unknown dependency " $${dependency} "!")
}
# If that looks okay, then update SUBDIRS.
eval(SUBDIRS += $$"_PROJ.$${dependency}")
}
message("Setting SUBDIRS=" $$SUBDIRS)
_valid = true
}
contains(TEMPLATE, "app") | contains(TEMPLATE, "lib") {
# Loop over every dependency listed in DEPENDS.
for(dependency, DEPENDS) {
# Look for an item like: _PROJ.(dependency)
eval(_dep = $$"_PROJ.$${dependency}")
isEmpty(_dep) {
error("Unknown dependency " $${dependency} "!")
}
# If that looks okay, then update both INCLUDEPATH and LIBS.
eval(INCLUDEPATH += $$"_PROJ.$${dependency}"/include)
eval(LIBS += -l$${dependency}$${LIBSUFFIX})
}
for(dependency, DEPENDS_NOLINK) {
# Look for an item like: _PROJ.(dependency)
eval(_dep = $$"_PROJ.$${dependency}")
isEmpty(_dep) {
error("Unknown dependency " $${dependency} "!")
}
# If that looks okay, then update INCLUDEPATH.
eval(INCLUDEPATH += $$"_PROJ.$${dependency}"/include)
}
#message("Setting INCLUDEPATH=" $$INCLUDEPATH)
#message("Setting LIBS=" $$LIBS)
_valid = true
}
# If no template type has matched, throw an error.
contains(_valid, "false") {
error("Don't recognize template type: " $${TEMPLATE})
}
```
It's been sanitized heavily to remove all sorts of details from the
huge project it was taken from. Mostly, you need to add your dependent
projects into the "Table of Project Locations" section, and perhaps
make another file that set up the necessary variables mentioned at the
top. Then set the `DEPENDS` variable to a list of project names, and
then include this QMake file from all of your individual projects (it
may be necessary to include it pretty close to the top of the file).
In general, in this large application, each sub-project had two
project files:
* One with `TEMPLATE = lib` (a few were `app` instead as well). This
is the project file that is included in as a dependency from any
project that has `TEMPLATE = subdirs`, and this project file makes
use of the QMake monstrosity above to set up the include and library
paths for any dependencies.
* One with `TEMPLATE = subdirs`. The same QMake monstrosity is used
here to include in the project files (of the sort in #1) of
dependencies so that they are built in the first place, and permit
you to build the sub-project standalone if needed.
...and both are needed if you want to be able to build sub-project
independently and without making to take care of dependencies
individually.
The next project down below sort of shows the use of that QMake
monstrosity above, though in a semi-useless sanitized form. Its
purpose is to show another system, but I'll explain that below it.
```bash
QT -= gui
QT -= core
TEMPLATE = lib
## Include our qmake defaults
DEPENDS = FooLib BarLib
include ($$(BASEDIR)/qmakeDefault.pri)
TARGET = Project$${LIBSUFFIX}
LIBS += -llua5.1 -lrt -lLua$${LIBSUFFIX}
DEFINES += PROJECT_EXPORTS
INCLUDEPATH += /usr/include/lua5.1
./include
HEADERS += include/SomeHeader.h
include/SomeOtherHeader.h
SOURCES += source/SomeClass.cpp
source/SomeOtherClass.cpp
# The rest of this is done with custom build steps:
GENERATOR_INPUTS = templates/TemplateFile.ext
templates/OtherTemplate.ext
gen.input = GENERATOR_INPUTS
gen.commands = $${DESTDIR}/generator -i $${QMAKE_FILE_IN}
# -s source$(InputName).cpp -h include$(InputName).h
# Set the destination of the source and header files.
SOURCE_DIR = "source/"
HEADER_DIR = "include/"
# What prefix and suffix to replace with paths and .h.cpp, respectively.
TEMPLATE_PREFIX = "external/"
TEMPLATE_EXTN = ".ext"
#
# Warning: Here be black magic.
#
# We need to use QMAKE_EXTRA_COMPILERS but its functionality does not give us
# an easy way to explicitly specify the names of multiple output files with a
# single QMAKE_EXTRA_COMPILERS entry. So, we get around this by making one
# entry for each input template (the .ext files).
# The part where this gets tricky is that each entry requires a unique
# variable name, so we must create these variables dynamically, which would
# be impossible in QMake ordinarily since it does only a single eval pass.
# Luckily, QMake has an eval(...) command which explicitly performs an eval
# pass on a string. We repeatedly use constructs like this:
# $$CONTENTS = "Some string data"
# $$VARNAME = "STRING"
# eval($$VARNAME = $$CONTENTS)
# These let us dynamically define variables. For sanity, I've tried to use a
# suffix of _VARNAME on any variable which contains the name of another
# variable.
#
# Iterate over every filename in GENERATOR_INPUTS
for(templatefile, GENERATOR_INPUTS) {
# Generate the name of the header file.
H1 = $$replace(templatefile, $$TEMPLATE_PREFIX, $$HEADER_DIR)
HEADER = $$replace(H1, $$TEMPLATE_EXTN, ".h")
# Generate the name of the source file.
S1 = $$replace(templatefile, $TEMPLATE_PREFIX, $$SOURCE_DIR)
SOURCE = $$replace(S1, $$TEMPLATE_EXTN, ".cpp")
# Generate unique variable name to populate &amp; pass to QMAKE_EXTRA_COMPILERS
QEC_VARNAME = $$replace(templatefile, ".", "")
QEC_VARNAME = $$replace(QEC_VARNAME, "/", "")
VARNAME = $$replace(QEC_VARNAME, "\", "")
# Append _INPUT to generate another variable name for the input filename
INPUT_VARNAME = $${QEC_VARNAME}_INPUT
eval($${INPUT_VARNAME} = $$templatefile)
# Now generate an entry to pass to QMAKE_EXTRA_COMPILERS.
eval($${VARNAME}.commands = $${DESTDIR}/generator -i ${QMAKE_FILE_IN} -s ${QMAKE_FILE_OUT} -h $${HEADER})
eval($${VARNAME}.name = $$VARNAME)
# ACHTUNG! The 'input' field is the _variable name_ which contains the
# input filename, not the filename itself. If you put in a filename or
# either of those variables don't exist, this will fail, silently, and
# all attempts at diagnosis will lead you nowhere.
eval($${VARNAME}.input = $${INPUT_VARNAME})
eval($${VARNAME}.output = $${SOURCE})
eval($${VARNAME}.variable_out = SOURCES)
# Now tell QMake to actually do this step we meticulously built.
eval(QMAKE_EXTRA_COMPILERS += $$VARNAME)
# Also add our header files. I doubt it's really necessary, but here it is.
HEADERS += $${HEADER}
}
```
This one uses a bit more black magic. The entire `GENERATOR_INPUTS`
list is a set of files that are inputs to an external program that is
called to generate some code, which then must be built with the rest
of the project. This uses undocumented QMake features, and a couple
kludges to generate some things dynamically (i.e. the filenames of the
generated code) from a variable-length list. I highly recommend
avoiding it. However, it does work.
These two links proved indispensable in the creation of this:
[QMake Variable Reference](http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html)
[Undocumented qmake](http://www.qtcentre.org/wiki/index.php?title=Undocumented_qmake)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

View File

@@ -0,0 +1,368 @@
---
title: Obscure features of JPEG
author: Chris Hodapp
date: "2011-11-24"
tags:
- Technobabble
- jpeg
- image_compression
---
*(This is a modified version of what I wrote up at work when I saw
that progressive JPEGs could be nearly a drop-in replacement that
offered some additional functionality and ran some tests on this.)*
Introduction
============
The long-established JPEG standard contains a considerable number of
features that are seldom-used and sometimes virtually unknown. This
all is in spite of the widespread use of JPEG and the fact that every
JPEG decoder I tested was compatible with all of the features I will
discuss, probably because [IJG libjpeg](http://www.ijg.org/) (or
[this](http://www.freedesktop.org/wiki/Software/libjpeg)) runs
basically everywhere.
Progressive JPEG
================
One of the better-known features, though still obscure, is that of
progressive JPEGs. Progressive JPEGs contain the data in a different
order than more standard (sequential) JPEGs, enabling the JPEG decoder
to produce a full-sized image from just the beginning portion of a
file (at a reduced detail level) and then refine those details as more
of the file is available.
This was originally made for web usage over slow connections. While it
is rarely-used, most modern browsers support this incremental display
and refinement of the image, and even those applications that do not
attempt this support still are able to read the full image.
Interestingly, since the only real difference between a progressive
JPEG and a sequential one is that the coefficients come in a different
order, the conversion between progressive and sequential is
lossless. Various lossless compression steps are applied to these
coefficients and as this reordering may permit a more efficient
encoding, a progressive JPEG often is smaller than a sequential JPEG
expressing an identical image.
One command I've used pretty frequently before posting a large photo online is:
{{<highlight bash>}}
jpegtran -optimize -progressive -copy all input.jpg > output.jpg
{{< / highlight >}}
This losslessly converts *input.jpg* to a progressive version and
optimizes it as well. (*jpegtran* can do some other things losslessly
as well - flipping, cropping, rotating, transposing, converting to
greyscale.)
Multi-scan JPEG
===============
More obscure still is that progressive JPEG is a particular case of
something more general: a **multi-scan JPEG**.
Standard JPEGs are single-scan sequential: All of the data is stored
top-to-bottom, with all of the color components and coefficients
together and in full. This includes, per **MCU** (minimum coded unit,
an 8x8 pixel square or some small multiple of it), 64 coefficients
each for each one of the 3 color components (typically Y,Cb,Cr). The
coefficients are from an 8x8 DCT transform matrix, but they are stored
in a zigzag order that preserves locality with regard to spatial
frequency as this permits more efficient encoding. The first
coefficient (0) is referred to as the DC coefficient; the others
(1-63) are AC coefficients.
Multi-scan JPEG permits this information to be packed in a fairly
arbitrary way (though with some restrictions). While information is
still stored top-to-bottom, it permits for only some of the data in
each MCU to be given, with the intention being that later scans will
provide other parts of this data (hence the name multi-scan). More
specifically:
* The three color components (Y for grayscale, and Cb/Cr for color) may be split up between scans.
* The 64 coefficients in each component may be split up. *(Two
restrictions apply here for any given scan: the DC coefficient must
always precede the AC coefficients, and if only AC coefficients are
sent, then they may only be for one single color component.)*
* Some bits of the coefficients may be split up. *(This, too, is
subject to a restriction, not to a given scan but to the entire
image: You must specify some of the DC bits. AC bits are all
optional. Information on how many bits are actually used here is
almost nonexistent.)*
In other words:
* You may leave color information out to be added later.
* You may let spatial detail be only a low-frequency approximation to
be refined later with higher-frequency coefficients. (As far as I
can tell, you cannot consistently reduce grayscale detail beyond the
8x8 pixel MCU while still recovering that detail in later scans.)
* You may leave grayscale and color values at a lower precision
(i.e. coarsely quantized) to have more precision added later.
* You may do all of the above in almost any order and almost any
number of steps.
Your libjpeg distribution probably contains something called
**wizard.txt** someplace (say, `/usr/share/docs/libjpeg8a` or
`/usr/share/doc/libjpeg-progs`); I don't know if an online copy is
readily available, but mine is
[here](<./libjpeg-wizard.txt>). I'll
leave detailed explanation of a scan script to the "Multiple Scan /
Progression Control" section of this document, but note that:
* Each non-commented line corresponds to one scan.
* The first section, prior to the colon, specifies which plane to
send, Y (0), Cb (1), or Cr (2).
* The two fields immediately after the colon give the first and last
indices of coefficients from that plane that should be in the
scan. Those indices are from 0 to 63 in zigzag order; 0 = DC, 1-63 =
AC in increasing frequency.
* The two fields immediately after those specify which bits of those
coefficients this scan contains.
According to that document, the standard script for a progressive JPEG is this:
{{<highlight text>}}
# Initial DC scan for Y,Cb,Cr (lowest bit not sent)
0,1,2: 0-0, 0, 1 ;
# First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits:
0: 1-5, 0, 2 ;
# Send all Cr,Cb AC coefficients, minus lowest bit:
# (chroma data is usually too small to be worth subdividing further;
# but note we send Cr first since eye is least sensitive to Cb)
2: 1-63, 0, 1 ;
1: 1-63, 0, 1 ;
# Send remaining Y AC coefficients, minus 2 lowest bits:
0: 6-63, 0, 2 ;
# Send next-to-lowest bit of all Y AC coefficients:
0: 1-63, 2, 1 ;
# At this point we've sent all but the lowest bit of all coefficients.
# Send lowest bit of DC coefficients
0,1,2: 0-0, 1, 0 ;
# Send lowest bit of AC coefficients
2: 1-63, 1, 0 ;
1: 1-63, 1, 0 ;
# Y AC lowest bit scan is last; it's usually the largest scan
0: 1-63, 1, 0 ;</pre>
{{< / highlight >}}
And for standard, sequential JPEG it is:
{{<highlight text>}}
0 1 2: 0 63 0 0;
{{< / highlight >}}
In
[this image](./20100713-0107-interleave.jpg)
I used a custom scan script that sent all of the Y data, then all Cb,
then all Cr. Its custom scan script was just this:
{{<highlight text>}}
0;
1;
2;
{{< / highlight >}}
While not every browser may do this right, most browsers will render
the greyscale as its comes in, then add color to it one plane at a
time. It'll be more obvious over a slower connection; I purposely left
the image fairly large so that the transfer would be slower. You'll
note as well that the greyscale arrives much more slowly than the
color. (2020 note: most browsers will now let you use their
development tools to simulate a slow connection if you really want to
see.)
Code & Utilities
================
The **cjpeg** tool from libjpeg will (among other things) create a
JPEG using a custom scan script. Combined with ImageMagick, I used a
command like:
{{<highlight bash>}}
convert input.png ppm:- | cjpeg -quality 95 -optimize -scans scan_script > output.jpg
{{< / highlight >}}
Or if the input is already a JPEG, `jpegtran` will do the same
thing, losslessly (as it's merely reordering coefficients):
{{<highlight bash>}}
jpegtran -scans scan_script input.jpg > output.jpg
{{< / highlight >}}
libjpeg has some interesting features as well. Rather than decoding an
entire full-resolution JPEG and then scaling it down, for instance (a
common use case when generating thumbnails), you may set it up when
decoding so that it will simply do the reduction for you while
decoding. This takes less time and uses less memory compared with
getting the full decompressed version and resampling afterward.
The C code below (or [here](./jpeg_split.c) or this
[gist](https://gist.github.com/9220146)), based loosely on `example.c`
from libjpeg, will split up a multi-scan JPEG into a series of
numbered PPM files, each one containing a scan. Look for
`cinfo.scale_num` (circa lines 67, 68) to use the fast scaling
features mentioned in the last paragraph, and note that the code only
processes as much input JPEG as it needs for the next scan. (It needs
nothing special to build besides a functioning libjpeg. `gcc -ljpeg -o
jpeg_split.o jpeg_split.c` works for me.)
{{<highlight c>}}
// jpeg_split.c: Write each scan from a multi-scan/progressive JPEG.
// This is based loosely on example.c from libjpeg, and should require only
// libjpeg as a dependency (e.g. gcc -ljpeg -o jpeg_split.o jpeg_split.c).
#include <stdio.h>
#include <jerror.h>
#include "jpeglib.h"
#include <setjmp.h>
#include <string.h>
void read_scan(struct jpeg_decompress_struct * cinfo,
JSAMPARRAY buffer,
char * base_output);
int read_JPEG_file (char * filename, int scanNumber, char * base_output);
int main(int argc, char **argv) {
if (argc < 3) {
printf("Usage: %s <Input JPEG> <Output base name>\n", argv[0]);
printf("This reads in the progressive/multi-scan JPEG given and writes out each scan\n");
printf("to a separate PPM file, named with the scan number.\n");
return 1;
}
char * fname = argv[1];
char * out_base = argv[2];
read_JPEG_file(fname, 1, out_base);
return 0;
}
struct error_mgr {
struct jpeg_error_mgr pub;
jmp_buf setjmp_buffer;
};
METHODDEF(void) error_exit (j_common_ptr cinfo) {
struct error_mgr * err = (struct error_mgr *) cinfo->err;
(*cinfo->err->output_message) (cinfo);
longjmp(err->setjmp_buffer, 1);
}
int read_JPEG_file (char * filename, int scanNumber, char * base_output) {
struct jpeg_decompress_struct cinfo;
struct error_mgr jerr;
FILE * infile; /* source file */
JSAMPARRAY buffer; /* Output row buffer */
int row_stride; /* physical row width in output buffer */
if ((infile = fopen(filename, "rb")) == NULL) {
fprintf(stderr, "can't open %s\n", filename);
return 0;
}
// Set up the normal JPEG error routines, then override error_exit.
cinfo.err = jpeg_std_error(&jerr.pub);
jerr.pub.error_exit = error_exit;
// Establish the setjmp return context for error_exit to use:
if (setjmp(jerr.setjmp_buffer)) {
jpeg_destroy_decompress(&cinfo);
fclose(infile);
return 0;
}
jpeg_create_decompress(&cinfo);
jpeg_stdio_src(&cinfo, infile);
(void) jpeg_read_header(&cinfo, TRUE);
// Set some decompression parameters
// Incremental reading requires this flag:
cinfo.buffered_image = TRUE;
// To perform fast scaling in the output, set these:
cinfo.scale_num = 1;
cinfo.scale_denom = 1;
// Decompression begins...
(void) jpeg_start_decompress(&cinfo);
printf("JPEG is %s-scan\n", jpeg_has_multiple_scans(&cinfo) ? "multi" : "single");
printf("Outputting %ix%i\n", cinfo.output_width, cinfo.output_height);
// row_stride = JSAMPLEs per row in output buffer
row_stride = cinfo.output_width * cinfo.output_components;
// Make a one-row-high sample array that will go away when done with image
buffer = (*cinfo.mem->alloc_sarray)
((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
// Start actually handling image data!
while(!jpeg_input_complete(&cinfo)) {
read_scan(&cinfo, buffer, base_output);
}
// Clean up.
(void) jpeg_finish_decompress(&cinfo);
jpeg_destroy_decompress(&cinfo);
fclose(infile);
if (jerr.pub.num_warnings) {
printf("libjpeg indicates %i warnings\n", jerr.pub.num_warnings);
}
}
void read_scan(struct jpeg_decompress_struct * cinfo,
JSAMPARRAY buffer,
char * base_output)
{
char out_name[1024];
FILE * outfile = NULL;
int scan_num = 0;
scan_num = cinfo->input_scan_number;
jpeg_start_output(cinfo, scan_num);
// Read up to the next scan.
int status;
do {
status = jpeg_consume_input(cinfo);
} while (status != JPEG_REACHED_SOS && status != JPEG_REACHED_EOI);
// Construct a filename & write PPM image header.
snprintf(out_name, 1024, "%s%i.ppm", base_output, scan_num);
if ((outfile = fopen(out_name, "wb")) == NULL) {
fprintf(stderr, "Can't open %s for writing!\n", out_name);
return;
}
fprintf(outfile, "P6\n%d %d\n255\n", cinfo->output_width, cinfo->output_height);
// Read each scanline into 'buffer' and write it to the PPM.
// (Note that libjpeg updates cinfo->output_scanline automatically)
while (cinfo->output_scanline < cinfo->output_height) {
jpeg_read_scanlines(cinfo, buffer, 1);
fwrite(buffer[0], cinfo->output_components, cinfo->output_width, outfile);
}
jpeg_finish_output(cinfo);
fclose(outfile);
}
{{< / highlight >}}
Examples
========
Here are all 10 scans from a standard progressive JPEG, separated out with the example code:
![Scan 1](./cropphoto1.png)
![Scan 2](./cropphoto2.png)
![Scan 3](./cropphoto3.png)
![Scan 4](./cropphoto4.png)
![Scan 5](./cropphoto5.png)
![Scan 6](./cropphoto6.png)
![Scan 7](./cropphoto7.png)
![Scan 8](./cropphoto8.png)
![Scan 9](./cropphoto9.png)
![Scan 10](./cropphoto10.png)

View File

@@ -0,0 +1,134 @@
// jpeg_split.c: Write each scan from a multi-scan/progressive JPEG.
// This is based loosely on example.c from libjpeg, and should require only
// libjpeg as a dependency (e.g. gcc -ljpeg -o jpeg_split.o jpeg_split.c).
#include <stdio.h>
#include <jerror.h>
#include "jpeglib.h"
#include <setjmp.h>
#include <string.h>
void read_scan(struct jpeg_decompress_struct * cinfo,
JSAMPARRAY buffer,
char * base_output);
int read_JPEG_file (char * filename, int scanNumber, char * base_output);
int main(int argc, char **argv) {
if (argc < 3) {
printf("Usage: %s <Input JPEG> <Output base name>\n", argv[0]);
printf("This reads in the progressive/multi-scan JPEG given and writes out each scan\n");
printf("to a separate PPM file, named with the scan number.\n");
return 1;
}
char * fname = argv[1];
char * out_base = argv[2];
read_JPEG_file(fname, 1, out_base);
return 0;
}
struct error_mgr {
struct jpeg_error_mgr pub;
jmp_buf setjmp_buffer;
};
METHODDEF(void) error_exit (j_common_ptr cinfo) {
struct error_mgr * err = (struct error_mgr *) cinfo->err;
(*cinfo->err->output_message) (cinfo);
longjmp(err->setjmp_buffer, 1);
}
int read_JPEG_file (char * filename, int scanNumber, char * base_output) {
struct jpeg_decompress_struct cinfo;
struct error_mgr jerr;
FILE * infile; /* source file */
JSAMPARRAY buffer; /* Output row buffer */
int row_stride; /* physical row width in output buffer */
if ((infile = fopen(filename, "rb")) == NULL) {
fprintf(stderr, "can't open %s\n", filename);
return 0;
}
// Set up the normal JPEG error routines, then override error_exit.
cinfo.err = jpeg_std_error(&jerr.pub);
jerr.pub.error_exit = error_exit;
// Establish the setjmp return context for error_exit to use:
if (setjmp(jerr.setjmp_buffer)) {
jpeg_destroy_decompress(&cinfo);
fclose(infile);
return 0;
}
jpeg_create_decompress(&cinfo);
jpeg_stdio_src(&cinfo, infile);
(void) jpeg_read_header(&cinfo, TRUE);
// Set some decompression parameters
// Incremental reading requires this flag:
cinfo.buffered_image = TRUE;
// To perform fast scaling in the output, set these:
cinfo.scale_num = 1;
cinfo.scale_denom = 1;
// Decompression begins...
(void) jpeg_start_decompress(&cinfo);
printf("JPEG is %s-scan\n", jpeg_has_multiple_scans(&cinfo) ? "multi" : "single");
printf("Outputting %ix%i\n", cinfo.output_width, cinfo.output_height);
// row_stride = JSAMPLEs per row in output buffer
row_stride = cinfo.output_width * cinfo.output_components;
// Make a one-row-high sample array that will go away when done with image
buffer = (*cinfo.mem->alloc_sarray)
((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
// Start actually handling image data!
while(!jpeg_input_complete(&cinfo)) {
read_scan(&cinfo, buffer, base_output);
}
// Clean up.
(void) jpeg_finish_decompress(&cinfo);
jpeg_destroy_decompress(&cinfo);
fclose(infile);
if (jerr.pub.num_warnings) {
printf("libjpeg indicates %i warnings\n", jerr.pub.num_warnings);
}
}
void read_scan(struct jpeg_decompress_struct * cinfo,
JSAMPARRAY buffer,
char * base_output)
{
char out_name[1024];
FILE * outfile = NULL;
int scan_num = 0;
scan_num = cinfo->input_scan_number;
jpeg_start_output(cinfo, scan_num);
// Read up to the next scan.
int status;
do {
status = jpeg_consume_input(cinfo);
} while (status != JPEG_REACHED_SOS && status != JPEG_REACHED_EOI);
// Construct a filename & write PPM image header.
snprintf(out_name, 1024, "%s%i.ppm", base_output, scan_num);
if ((outfile = fopen(out_name, "wb")) == NULL) {
fprintf(stderr, "Can't open %s for writing!\n", out_name);
return;
}
fprintf(outfile, "P6\n%d %d\n255\n", cinfo->output_width, cinfo->output_height);
// Read each scanline into 'buffer' and write it to the PPM.
// (Note that libjpeg updates cinfo->output_scanline automatically)
while (cinfo->output_scanline < cinfo->output_height) {
jpeg_read_scanlines(cinfo, buffer, 1);
fwrite(buffer[0], cinfo->output_components, cinfo->output_width, outfile);
}
jpeg_finish_output(cinfo);
fclose(outfile);
}

View File

@@ -0,0 +1,211 @@
Advanced usage instructions for the Independent JPEG Group's JPEG software
==========================================================================
This file describes cjpeg's "switches for wizards".
The "wizard" switches are intended for experimentation with JPEG by persons
who are reasonably knowledgeable about the JPEG standard. If you don't know
what you are doing, DON'T USE THESE SWITCHES. You'll likely produce files
with worse image quality and/or poorer compression than you'd get from the
default settings. Furthermore, these switches must be used with caution
when making files intended for general use, because not all JPEG decoders
will support unusual JPEG parameter settings.
Quantization Table Adjustment
-----------------------------
Ordinarily, cjpeg starts with a default set of tables (the same ones given
as examples in the JPEG standard) and scales them up or down according to
the -quality setting. The details of the scaling algorithm can be found in
jcparam.c. At very low quality settings, some quantization table entries
can get scaled up to values exceeding 255. Although 2-byte quantization
values are supported by the IJG software, this feature is not in baseline
JPEG and is not supported by all implementations. If you need to ensure
wide compatibility of low-quality files, you can constrain the scaled
quantization values to no more than 255 by giving the -baseline switch.
Note that use of -baseline will result in poorer quality for the same file
size, since more bits than necessary are expended on higher AC coefficients.
You can substitute a different set of quantization values by using the
-qtables switch:
-qtables file Use the quantization tables given in the named file.
The specified file should be a text file containing decimal quantization
values. The file should contain one to four tables, each of 64 elements.
The tables are implicitly numbered 0,1,etc. in order of appearance. Table
entries appear in normal array order (NOT in the zigzag order in which they
will be stored in the JPEG file).
Quantization table files are free format, in that arbitrary whitespace can
appear between numbers. Also, comments can be included: a comment starts
with '#' and extends to the end of the line. Here is an example file that
duplicates the default quantization tables:
# Quantization tables given in JPEG spec, section K.1
# This is table 0 (the luminance table):
16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99
# This is table 1 (the chrominance table):
17 18 24 47 99 99 99 99
18 21 26 66 99 99 99 99
24 26 56 99 99 99 99 99
47 66 99 99 99 99 99 99
99 99 99 99 99 99 99 99
99 99 99 99 99 99 99 99
99 99 99 99 99 99 99 99
99 99 99 99 99 99 99 99
If the -qtables switch is used without -quality, then the specified tables
are used exactly as-is. If both -qtables and -quality are used, then the
tables taken from the file are scaled in the same fashion that the default
tables would be scaled for that quality setting. If -baseline appears, then
the quantization values are constrained to the range 1-255.
By default, cjpeg will use quantization table 0 for luminance components and
table 1 for chrominance components. To override this choice, use the -qslots
switch:
-qslots N[,...] Select which quantization table to use for
each color component.
The -qslots switch specifies a quantization table number for each color
component, in the order in which the components appear in the JPEG SOF marker.
For example, to create a separate table for each of Y,Cb,Cr, you could
provide a -qtables file that defines three quantization tables and say
"-qslots 0,1,2". If -qslots gives fewer table numbers than there are color
components, then the last table number is repeated as necessary.
Sampling Factor Adjustment
--------------------------
By default, cjpeg uses 2:1 horizontal and vertical downsampling when
compressing YCbCr data, and no downsampling for all other color spaces.
You can override this default with the -sample switch:
-sample HxV[,...] Set JPEG sampling factors for each color
component.
The -sample switch specifies the JPEG sampling factors for each color
component, in the order in which they appear in the JPEG SOF marker.
If you specify fewer HxV pairs than there are components, the remaining
components are set to 1x1 sampling. For example, the default YCbCr setting
is equivalent to "-sample 2x2,1x1,1x1", which can be abbreviated to
"-sample 2x2".
There are still some JPEG decoders in existence that support only 2x1
sampling (also called 4:2:2 sampling). Compatibility with such decoders can
be achieved by specifying "-sample 2x1". This is not recommended unless
really necessary, since it increases file size and encoding/decoding time
with very little quality gain.
Multiple Scan / Progression Control
-----------------------------------
By default, cjpeg emits a single-scan sequential JPEG file. The
-progressive switch generates a progressive JPEG file using a default series
of progression parameters. You can create multiple-scan sequential JPEG
files or progressive JPEG files with custom progression parameters by using
the -scans switch:
-scans file Use the scan sequence given in the named file.
The specified file should be a text file containing a "scan script".
The script specifies the contents and ordering of the scans to be emitted.
Each entry in the script defines one scan. A scan definition specifies
the components to be included in the scan, and for progressive JPEG it also
specifies the progression parameters Ss,Se,Ah,Al for the scan. Scan
definitions are separated by semicolons (';'). A semicolon after the last
scan definition is optional.
Each scan definition contains one to four component indexes, optionally
followed by a colon (':') and the four progressive-JPEG parameters. The
component indexes denote which color component(s) are to be transmitted in
the scan. Components are numbered in the order in which they appear in the
JPEG SOF marker, with the first component being numbered 0. (Note that these
indexes are not the "component ID" codes assigned to the components, just
positional indexes.)
The progression parameters for each scan are:
Ss Zigzag index of first coefficient included in scan
Se Zigzag index of last coefficient included in scan
Ah Zero for first scan of a coefficient, else Al of prior scan
Al Successive approximation low bit position for scan
If the progression parameters are omitted, the values 0,63,0,0 are used,
producing a sequential JPEG file. cjpeg automatically determines whether
the script represents a progressive or sequential file, by observing whether
Ss and Se values other than 0 and 63 appear. (The -progressive switch is
not needed to specify this; in fact, it is ignored when -scans appears.)
The scan script must meet the JPEG restrictions on progression sequences.
(cjpeg checks that the spec's requirements are obeyed.)
Scan script files are free format, in that arbitrary whitespace can appear
between numbers and around punctuation. Also, comments can be included: a
comment starts with '#' and extends to the end of the line. For additional
legibility, commas or dashes can be placed between values. (Actually, any
single punctuation character other than ':' or ';' can be inserted.) For
example, the following two scan definitions are equivalent:
0 1 2: 0 63 0 0;
0,1,2 : 0-63, 0,0 ;
Here is an example of a scan script that generates a partially interleaved
sequential JPEG file:
0; # Y only in first scan
1 2; # Cb and Cr in second scan
Here is an example of a progressive scan script using only spectral selection
(no successive approximation):
# Interleaved DC scan for Y,Cb,Cr:
0,1,2: 0-0, 0, 0 ;
# AC scans:
0: 1-2, 0, 0 ; # First two Y AC coefficients
0: 3-5, 0, 0 ; # Three more
1: 1-63, 0, 0 ; # All AC coefficients for Cb
2: 1-63, 0, 0 ; # All AC coefficients for Cr
0: 6-9, 0, 0 ; # More Y coefficients
0: 10-63, 0, 0 ; # Remaining Y coefficients
Here is an example of a successive-approximation script. This is equivalent
to the default script used by "cjpeg -progressive" for YCbCr images:
# Initial DC scan for Y,Cb,Cr (lowest bit not sent)
0,1,2: 0-0, 0, 1 ;
# First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits:
0: 1-5, 0, 2 ;
# Send all Cr,Cb AC coefficients, minus lowest bit:
# (chroma data is usually too small to be worth subdividing further;
# but note we send Cr first since eye is least sensitive to Cb)
2: 1-63, 0, 1 ;
1: 1-63, 0, 1 ;
# Send remaining Y AC coefficients, minus 2 lowest bits:
0: 6-63, 0, 2 ;
# Send next-to-lowest bit of all Y AC coefficients:
0: 1-63, 2, 1 ;
# At this point we've sent all but the lowest bit of all coefficients.
# Send lowest bit of DC coefficients
0,1,2: 0-0, 1, 0 ;
# Send lowest bit of AC coefficients
2: 1-63, 1, 0 ;
1: 1-63, 1, 0 ;
# Y AC lowest bit scan is last; it's usually the largest scan
0: 1-63, 1, 0 ;
It may be worth pointing out that this script is tuned for quality settings
of around 50 to 75. For lower quality settings, you'd probably want to use
a script with fewer stages of successive approximation (otherwise the
initial scans will be really bad). For higher quality settings, you might
want to use more stages of successive approximation (so that the initial
scans are not too large).

View File

@@ -0,0 +1,67 @@
---
layout: post
title: Thoughts on tools, design, and feedback loops
status: publish
type: post
published: true
tags:
- rant
- Technobabble
---
I just watched [Inventing on Principle](https://vimeo.com/36579366) from Bret Victor and found this entire talk incredibly interesting. Chris Granger's [post](http://www.chris-granger.com/2012/04/12/light-table---a-new-ide-concept/) on Light Table led me to this, and shortly after, I found the redesigned [Khan Academy CS course](http://ejohn.org/blog/introducing-khan-cs) which this inspired. Bret touched on something that basically anyone who's attempted to design anything has implicitly understood: **This feedback loop is the most essential part of the process.**
I reflected on this and on my own experiences, and decided on a few things:
**(1) Making that feedback loop fast enough can dramatically change the design process, not just speed it up proportionally.**
I feel that Bret's video demonstrates this wonderfully. It matches up with something I've believed for awhile: That a slower, more delay-prone process becoming fast enough to be interactive can change the entire way a user relates to it. The change, for me at least, can be as dramatic as between filling out paperwork and having a face-to-face conversation. This metamorphosis is where I see a tool become an extension of the mind.
[Toplap](http://toplap.org/index.php?title=Main_Page) probably has something to say on this. They link to a \[short\] live coding documentary, [Show Us Your Screens](https://vimeo.com/20241649). I rather like their quote: **"Live coding is not about tools. [Algorithms are thoughts. Chainsaws are tools.](https://vimeo.com/9790850) That's why algorithms are sometimes harder to notice than chainsaws."**
Live coding perhaps hits many of Bret's points from the angle of musical performance meeting programming. Since he spoke directly of improvisation, I'd say he was well aware of this connection.
**(2) These dynamic, interactive, high-level tools don't waste computer resources - they trade them.**
They trade them for being dynamic, interactive, and high-level, and this very often means that they trade ever-increasing computer resources to earn some ever-limited human resources like time, comprehension, and attention.
I don't look at them as being resource-inefficient. I look at them as being the wrong tool for those situations where I have no spare computer resources to trade. Frankly, those situations are exceedingly rare. (And my degree is in electrical engineering. Most coding I've done when acting as a EE guy, I've done with the implicit assumption that no other type of situation existed.) Even if I eventually have to produce something for such a situation - say, to target a microcontroller - I still have ever-increasing computer resources at my disposal, and I can utilize these to great benefit for some prototyping.
Limited computer resources restrict an implementation. Limited human resources, like time and attention and comprehension, do the same...
**(3) The choice of tools defines what ideas are expressible.**
Any Turing-complete language can express a given algorithm, pretty much by definition. However, since this expression can vary greatly in length and in conciseness, this is really only of theoretical interest if you, a human, have only finite time on earth to make this expression and only so many usable hours per day. (This is close to a point Paul Graham is [quite](http://paulgraham.com/langdes.html) [fond](http://paulgraham.com/power.html) of [making](http://paulgraham.com/avg.html).)
This same principle goes for all other sorts of expressions and interactions and interfaces, non-Turing-complete included, anytime different tools are capable of producing the same result given enough work. (I can use a text editor to generate music by making PCM samples by hand. I can use a program to make an algorithm to do the same. I can use a program such as Ableton Live to do the same. These all can produce sound, but some of them are a path of insurmountable complexity depending on what sort of sound I want.)
In a strict way, the choice of tools defines the minimum size of an expression of an idea, and how comprehensible and difficult this expression is. Once this expression hits a certain level of complexity, a couple paths emerge: it may as well be impossible to implement, or it may cease to be about the idea and instead be an implementation of a set of ad-hoc tools to eventually implement that idea. ([Greenspun's tenth rule](https://en.wikipedia.org/wiki/Greenspun%27s_Tenth_Rule), dated as it is, indicates plenty of other people have observed this.)
In a less strict way, the choice of tools also guides how a person expresses an idea; not like a fence, but more like a wind. It guides how that person thinks.
The boundaries that restrict **time** and **effort** also draw the lines that divide ideas into **possible** and **impossible**. Tools can move those lines. The right tools solve the irrelevant problems, and guide the user into solving relevant problems instead.
Of course, finding the relevant problems can be tricky...
**(4) When exploring, you are going to re-implement ideas. Get over it.**
(I suppose [Mythical Man Month](http://c2.com/cgi/wiki?PlanToThrowOneAway) laid claim to something similar decades ago.)
Turning an idea plus a bad implementation into a good implementation, on the whole, is far easier than turning just an idea into any implementation (and pages upon pages of design documentation rarely push it past 'just an idea'). It's not an excuse to willingly make bad design decisions - it's an acknowledgement that a tangible form of an idea does far more to clarify and refine those design decisions than any amounts of verbal descriptions and diagrams and discussions. Even if that prototype is scrapped in its entirety, the insight and experiences it gives are not.
The flip side of this is: **Ideas are fluid, and this is good**. Combined with the second point, it's more along the lines of: **Ideas are fluid, provided they already have something to flow from.**
A high-level expression with the right set of primitives is a description that translates very readily to other forms. The key here is not what language or tool it is, but that it supports the right vocabulary to express the implementation concisely. **Supports** doesn't mean that it has all the needed high-level constructs - just that it is sufficiently flexible and concise to build them readily. (If you 'hide' higher-level structure inside lower-level details, you've added extra complexity. If you abuse higher-level constructs that hide simpler relationships, you've done the same. More on that in another post...)
My beloved C language, for instance, gives some freedom to build a lot of constructs, but mainly those constructs that still map closely to assembly language and to hardware. C++ tries a little harder, but I feel like those constructs quickly hit the point of appalling, fragile ugliness. Languages like Lisp, Scheme, Clojure, Scala, and probably Haskell (I don't know yet, I haven't attempted to master it) are fairly well unmatched in the flexibility they give you. However, in light of Bret's video, the way these are all meant to be programmed still can fall quite short.
I love [Context Free](http://www.contextfreeart.org/) as well. I like it because its relative speed combined with some marvelous simplicity gives me the ability to quickly put together complex fractalian/mathematical/algorithmic images. Normal behavior when I work with this program is to generate several hundred images in the course of an hour, refining each one from the last. Another big reason it appeals to me is that, due to its simplicity, I could fairly easily take the Context Free description of any of these images and turn it into some other algorithmic representation (such as a recursive function call to draw some primitives, written in something like [Processing](http://www.processing.org/) or [openFrameworks](http://www.openframeworks.cc/) or HTML5 Canvas or OpenGL).
*Later note, circa 2017:* Tobbe Gyllebring (@drunkcod)
in
[The Double Edged Sword of Faster Feedback](https://medium.com/@drunkcod/the-double-edged-sword-of-faster-feedback-1052bf360e7e#.c7o9fsuch) makes
some excellent points that I completely missed and that are very
relevant to everything here. On the overreliance on fast feedback
loops to the exclusion of more deliberate design and analysis, he
says, "Running an experiment requires you to have a theory. This is
not science. Its a farce," which I rather like.

View File

@@ -0,0 +1,69 @@
---
title: Hello, World (from Wordpress, then Jekyll, then Hakyll, then Hugo)
author: Chris Hodapp
date: "2014-02-06"
---
I started this post in February 2014. Actually, I might have started
it in July 2013 (while sitting in a Bruegger's Bagels on the same day
that I met up with two people from Urbanalta in what would later
become my full-time job, to be precise). I really don't remember.
Here goes another migration of my sparse content from the past 8
(er... 10) years. This time, I'm giving up my Wordpress instance that
I've migrated around 3 or 4 times (from wordpress.com, then Dreamhost,
then Linode, then tortois.es), and completely failed to migrate this
time (I neglected to back up Wordpress' MySQL tables). I still have
an old XML backup, but it's such a crufty mess at this point that I'd
rather start fresh and import in some old content.
Wordpress is a fine platform and it produces some beautiful results.
However, I feel like it is very heavy and complex for what I need, and
I have gotten got myself into many train-wrecks and rabbit-holes
trying to manage aspects of its layout and behavior and media
handling.
My nose is already buried in Emacs for most else that I write. It's
the editor I work most quickly in. I'm already somewhat familiar with
git. So, I am giving [Jekyll](http://jekyllrb.com/) a try *(later
note: now using [Hakyll](https://jaspervdj.be/hakyll/) instead.)*.
Having a static site pre-generated from Markdown just seems like it
would fit my workflow better, and not require me to switch to a
web-based editor. I'm going to have to learn some HTML and CSS
anyway.
(I phrase this as if it were a brilliant flash of insight on my part.
No, it's something I started in July and then procrastinated on until
now, when my Wordpress has been down for months.)
*(And then procrastinated another 2 years for good measure.)*
A vaguely relevant
[issue](https://github.com/joyent/smartos-live/issues/275) just
steered me to the existence of
[TRAMP](https://www.gnu.org/software/tramp/) which allows me to edit
remote files in Emacs. I just did *C-x C-f*
`/ssh:username@whatever.com:/home/username` from a stock Emacs
installation, and now I'm happily editing this Markdown file, which is
on my VPS, from my local Emacs. For some reason, I find this
incredibly awesome, even though things like remote X, NX, RDP, and
sshfs have been around for quite some time now. (When stuff starts
screwing up, M-x tramp-clean-up-all-connection seems to help a bit.)
I collect lots of notes and I enjoy writing and explaining, so why
don't I maintain a blog where I actually post more often than once
every 18 months? I don't really have a good answer. I just know that
this crosses my mind about once a week. But okay, Steve Yegge, you
get
[your wish](https://sites.google.com/site/steveyegge2/you-should-write-blogs)
but only because I found
[what you wrote](https://sites.google.com/site/steveyegge2/tour-de-babel#TOC-C-)
about C++ to be both funny and appropriate.
2020 note: I'm now moving to [Hugo](https://gohugo.io/)! Hello,
2013-procrastinating me! Yes, Hakyll was neat but now I'm a bit sick
of it and just really want some basic things to be easy for me again
(like a photo gallery) given that I hate web stuff like crazy.
(Did you know my [old Wordpress](https://hodapp.wordpress.com/) is
*still* up? It's nearly 12 years old at this point.)

View File

@@ -0,0 +1,241 @@
---
title: "Catalogue of My Stupidity: My Haskell 'GenericStruct' Nonsense"
author: Chris Hodapp
date: "2015-06-23"
tags:
- stupidity
- Technobabble
---
*(A note: I took these notes during my time at Urbanalta, intending
them to be a private reference to myself on how to learn from some
mistakes. I've tried to scrub the proprietary bits out and leave the
general things behind. I do reference some other notes that probably
will still stay private.)*
# Background
Some background on this: This is some notes on a small Haskell module
I did at Urbanalta which I called `GenericStruct`. Most of this post
is very Haskell-heavy and perhaps more suited to [HaskellEmbedded][]
as it's a very niche usage even within Haskell.
I talk about this much more extensively in my handwritten work notes,
circa 2015-05-05 to 2015-05-20, and in a source file
`GenericStruct.hs`. Neither of those are online (and trust me that
you don't want to try to understand my scratch notes anyway), but a
cleaner summary is in the [Appendix](#appendix).
The short version is that I needed a way to express the format a
packed data structure, similar to a C struct in some ways, but without
any padding between fields, and more explicit about the exact size in
bits of fields. I wanted this format to also be able to carry some
documentation with it because it was meant to be able to express data
formats for Bluetooth Low Energy, and so I had a need to present this
format in a human-readable way and possibly a more general
machine-readable way (such as JSON). This was a similar design goal
to my Python creation, AnnotatedStruct, from nearly 2 years ago, but
here I wanted the benefits of static typing for when accessing these
data structures.
What complicated matters somewhat is that these data structures,
rather than being used directly in Haskell to store things, were to be
used with [Ivory][] to model the proper C code for reading and
writing.
What I eventually came up with used Haskell records with
specially-crafted data types inside them, and then [GHC.Generics][] to
iterate over these data types and inject into them some context
information (a field accessor in Haskell by itself cannot have any
information about 'where' in the record it is, whether in absolute
terms or relative to any other field). Context information here meant
things like a bit offset, a size, and a type representation.
This was a little complicated to implement, but overall, not
particularly daunting. The [GHC.Generics][] examples included generic
serialization which is a very similar problem in many ways, and I
followed from this example and a JSON example.
(Another note from some prior work: Do not attempt to do record access
with Base.Data.Data. It can get some meta-information, like the
constructor itself, but only in a sufficiently generic way that you
may call nothing specific to a record on it.)
# Problems
The problem that I ran into fairly quickly (but not quick enough) is
that what I had created had no good way to let me nest data formats
inside each other. For instance, I had a 16-bit value which I used in
several places, and that 16-bit value was treated in many places as 16
individual bitfields with each bit representing a specific Boolean
parameter unto itself. In other places, treating it as simply a
single 16-bit integer was more meaningful - and this was related to it
being used in several places, such that operations like copying from
one place to another became meaningful.
I had no good way to express this. I could not define that format in
one place, and then put it inside each struct that used it. I thought
initially that implementing this would be a matter of just making
certain structures recursive, and I was partly right, but I ran into
such complication in the type system that I felt like it was not worth
it to proceed further.
What I wrote yesterday when I ran into these serious snags was:
- At this stage of complexity, I sort of wish I'd opted for
[Template Haskell][] instead. It would have absorbed the change
much better. [GHC.Generics][] required me to sort of bend the type
system. The problem there is that it had only so far to bend, while
with Template Haskell the whole Haskell language (more or less)
would be at my disposal, not just some slightly-pliable parts of its
type system. (Perhaps this is why Ivory does what it does.)
- Idris may have handled this better too by virtue of its dependent
types, and for similar reasons.
- `johnw` (Freenode IRC `#haskell` denizen &
[Galois Inc.](https://galois.com/) employee) mentioned a
possibly-viable approach based around an applicative expression of
data formats and not requiring things like Template Haskell or
possibly Generics. (See IRC logs from 2015-06-04; this was via PM.)
- Another person mentioned that this sounded like a job for
[Lenses][lens], particularly,
their
[Iso](https://hackage.haskell.org/package/lens/docs/Control-Lens-Iso.html)
(isomorphism) type which had different 'projections' of data.
# What I did right
I properly implemented a nice structure with GHC.Generics over top of
Haskell records, and kept it fairly compact and strictly-typed. I
started making use of it right away, and this meant errors would
readily show up (generally as type errors at compile time) as I made
changes.
I kept the code clean and well-documented, and this helped me out
substantially with writing the code, understanding it, and then
understanding that much of it shouldn't have been written.
I think that overall that it was a good idea for me to treat the data
format as a specification that could be turned into C code, into a
JSON description, and into (eventually) a human-readable description.
# What I did wrong, and should have done instead
Overall: I tried very hard to solve the very unique, very specific
problem. This blocked my view of the real, more general problem.
Despite active attempts to discern that general problem, I was fixated
on specifics. Despite my preachy guideline elsewhere in my notes
that, "Your problem is not a unique snowflake - someone else has
studied it," I assumed my problem was a relatively unique snowflake.
When I expressed the problem to other people, a number of them told me
that this sounded like a job for the [Lens][lens] library in Haskell.
On top of this, I had used Lenses before. While I had not used them
enough to know for certain that Lens was the best solution here, I had
used them enough to know that they were a likely first place to look.
But, I ignored this experience, and I ignored what other people told
me.
Why I ignored this, I suspect, is because I was focusing too much on
the specifics of the issue. This led me to believe that this problem
was sufficiently unique and different that Lenses were not an approach
I should even look at.
Lenses might not be the proper approach, but I am almost certain that
examining them would have helped me.
I missed something very crucial: That I would need to nest data
formats and share definitions between them. This should have been
obvious to me: this is a functional language, and composition (which
is what this is) is essential to abstraction and reuse.
I assumed that my solution would have to be tied to Haskell records.
This was not a given. Further, I knew of three methods which created
similar structures but did not rely on records: Lenses, Ivory structs,
and Ivory bitdata. Records were an irrelevancy (even to the specifics
I was fixated on) and I tightly coupled my solution to them. Records
are not meant to compose, while some other structures are.
# Short, general summary
*(i.e. the part where I get really preachy about vague things)*
- Foresee what else your problem may need to encompass. Perhaps it
only looks like a unique problem because you put too much weight on
the specifics, and you've missed the ways it resembles existing,
well-studied problems - perhaps even ones you are familiar with.
- Perhaps you haven't missed anything notable. Still, knowing what
else it may need to encompass makes for better solutions, and may
prevent you from making design decisions early on which
fundamentally limit it in ways that matter later.
- Unsurprisingly, ekmett probably solved your problem already. (Or
perhaps acowley did with [Vinyl][], or perhaps [compdata][] solves
it...)
# Appendix {#appendix}
My aim was to solve a few problems:
- Outputting a concrete representation of an entire type (for the
sake of inserting into JSON specs, for instance),
- Creating a correspondence between native Haskell types and Ivory's
specific types (which ended up not being so necessary),
- Packing and unpacking a struct value to and from memory
automatically (via Ivory),
- Unpacking and packing individual fields of a struct (also via
Ivory),
- Doing the above with the benefit of strict, static typing (i.e. not
relying on strings to access a field),
- Handling all of this with (in Ivory) an in-memory representation
with no padding or alignment concerns,
- Having a single specification of a type, including human-readable
descriptions.
What I saw as the largest problem is that accessors for Haskell
records have no accessible information on which field they access, or
where that field is relative to anything else in the data
structure. Thus, if I access a field of a record, I can have no
information there about 'where' in the record it is unless I put that
information there somehow. The pieces of information that I seemed to
need in the field were the field's overall index in the record, and
the field's overall memory offset.
A simpler form of generics, Data.Data, allowed me to solve the first
problem easily and produce a list of something like (TypeRep, name,
size, position). However, I ran into problems when trying to find a
way to insert context into the record somehow. The central issue is
that Data.Data provides no way to do anything other than generic
operations on a field, and those generic operations are fairly
limited. I could find no way to make something like a typeclass and
use typeclass methods to update those fields.
GHC.Generics, on the other hand, made this fairly trivial. I could
solve the first problem (albeit in a more complicated way), and what I
eventually turned the other problems into was the need to take the
generic record type itself (in this case, in the form of a Proxy to
it), and given certain constraints on it, to create a generic
constructor for this type.
This proved to be fairly easy. Most of GHC.Generics will as readily
traverse a Proxy of a type as a value of the type, given some changes
which mostly amount to a lot of use of fmap. The 'to' function in
GHC.Generics (after I had cleared up some conceptual confusion) simply
took the representation and removed the Proxy (or pushed it
elsewhere), until it hit a certain innermost point in which one
created an abstract representation of the constructor call itself, but
this time with the proper data.
Most of the rest was just modifying the above to allow me to propagate
context information such as index and memory offset, and dealing with
the confusion of type families (which I ended up needing much less of
than I initially thought).
[GHC.Generics]: https://hackage.haskell.org/package/base/docs/GHC-Generics.html
[Ivory]: https://hackage.haskell.org/package/ivory
[Vinyl]: https://hackage.haskell.org/package/vinyl
[compdata]: https://hackage.haskell.org/package/compdata
[lens]: https://hackage.haskell.org/package/lens
[Template Haskell]: https://wiki.haskell.org/Template_Haskell
[HaskellEmbedded]: https://haskellembedded.github.io/

View File

@@ -0,0 +1,12 @@
---
title: Post at HaskellEmbedded - Introducing Ion
author: Chris Hodapp
date: "2016-09-23"
tags:
- haskell
- haskellembedded
---
Just a quick note: I finally released my Ion library (it was long
overdue), and wrote a post about it over at
[HaskellEmbedded](https://haskellembedded.github.io/posts/2016-09-23-introducing-ion.html).

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

View File

@@ -0,0 +1,117 @@
---
title: "Pi pan-tilt for huge images, part 1: introduction"
author: Chris Hodapp
date: "2016-09-25"
tags:
- photography
- electronics
- raspberrypi
---
Earlier this year I was turning around ideas in my head - perhaps
inspired by Dr. Essa's excellent class,
[CS6475: Computational Photography][cs6475] - about the possibility of
making an inexpensive, relatively turn-key rig for creating very
high-detail photographs, ideally in HDR, and taking advantage of
algorithms, automation, and redundancy to work with cheap optics and
cheap sensors. What I had in mind had a pretty commonly-seen starting
point for making panoramas - something like a telephoto lens mounted
on a pan-tilt gimbal, and software behind it responsible for shooting
the right pattern of photographs, handling correct exposures,
capturing all the data, and stitching it.
My aim wasn't so much to produce panoramas as it was to produce very
high-detail images, of which panoramas are one type. I'd like it to
be possible for narrow angles of view too.
Most of my thoughts landed at the same inevitable view that this would
require lots of custom hardware and electronics, and perhaps from
there still may need a mobile app to handle all of the heavy
computations.
Interestingly, this whole time I had several Raspberry Pis, an
[ArduCam][] board, work history that familiarized me with some of the
cheaper M12 & CS mount lenses of the telephoto variety, and access to
a [hackerspace][hive13] with laser cutters and CNCs. Eventually, I
realized the rather obvious idea that the Pi and ArduCam would
probably do exactly what I needed.
A few other designs (like [this][makezine] and [this][scraptopower])
offered some inspiration, and after iterating on a design a few times
I eventually had something mostly out of laser-cut plywood, hardware
store parts, and [cheap steppers][steppers]. It looks something like
this, mounted on a small tripod:
![png](./IMG_20160912_144539.jpg)
I am able to move the steppers thanks to [Matt's code][raspi-spy] and
capture images with [raspistill][]. The arrangement here provides two
axes, pitch and yaw (or, pan and tilt). I put together some code to
move the steppers in a 2D grid pattern of a certain size and number of
points. (Side note: raspistill can
[capture 10-bit raw Bayer data][forum-raw-images] with the `--raw`
option, which is very nice. I'm not doing this yet, however.)
Here's a video of it moving in such a pattern (to speed things along,
image capture was replaced by a 1/2 second delay at each point):
<iframe width="560" height="315"
src="https://www.youtube.com/embed/jO3SBandiUs" frameborder="0"
allowfullscreen></iframe>
It's still rather rough to use, but it worked well enough that I
picked up a [25mm M12 lens][25mm-lens] - still an angle of view of
about 10 degrees on this sensor - and set it up in the park for a test
run:
![](./IMG_20160918_160857.jpg "My shot's not slanted, the ground is")
(*Later note*: I didn't actually use the 25mm lens on that shot. I
used a 4mm (or something) lens that looks pretty much the same, and
didn't realize it until later. It's a wonder that Hugin was able to
stitch the shots at all.)
The laptop is mainly there so that I can SSH into the Pi to control
things and to use [RPi-Cam-Web-Interface][] to focus the lens. The
red cord is just Cat 6 connecting their NICs together; the Pi is
running off of battery here. If I had a wireless adapter on hand (or
just a Raspberry Pi 3) I could probably have just set up a WiFi
hotspot from the Pi and done all this from a phone.
I collected 40 or 50 images as the stepper moved through the grid.
While I fixed the exposure and ISO values with raspistill, I didn't
attempt any bracketing for HDR, and I left whitebalance at whatever
the camera module felt like doing, which almost certainly varied from
picture to picture. Automatic whitebalance won't matter when I start
using the raw Bayer data, but for the first attempt at stitching, I
used only the JPEGs which already had whitebalance applied.
I stitched everything in Hugin on my desktop PC. I would like to
eventually make stitching possible just on the Raspberry Pi, which
isn't *that* farfetched considering that I stitched my first panoramas
on a box that wasn't much more powerful than a Pi. I also had to get
rid of some of the images because for whatever reason Hugin's
optimization was failing when they were present. However, being able
to look at Hugin's computed pitch, yaw, and roll values and see
everything lining up nicely with the motion of the steppers is a good
sign.
The first results look decent, but fuzzy, as $10 optics are prone to
produce:
[![](./zwIJpFn.jpg)](./zwIJpFn.jpg)
Follow along to [part 2](./2016-10-04-pi-pan-tilt-2.html).
[cs6475]: https://www.omscs.gatech.edu/cs-6475-computational-photography
[ArduCam]: http://www.arducam.com/camera-modules/raspberrypi-camera/
[hive13]: http://hive13.org/
[makezine]: http://makezine.com/projects/high-resolution-panorama-photography-rig/
[scraptopower]: http://www.scraptopower.co.uk/Raspberry-Pi/raspberry-pi-diy-pan-tilt-plans
[steppers]: https://www.amazon.com/Elegoo-28BYJ-48-ULN2003-Stepper-Arduino/dp/B01CP18J4A
[raspi-spy]: http://www.raspberrypi-spy.co.uk/2012/07/stepper-motor-control-in-python/
[forum-raw-images]: https://www.raspberrypi.org/forums/viewtopic.php?p=357138
[raspistill]: https://www.raspberrypi.org/documentation/raspbian/applications/camera.md
[RPi-Cam-Web-Interface]: http://elinux.org/RPi-Cam-Web-Interface
[25mm-lens]: https://www.amazon.com/gp/product/B00N3ZPTE6
[Hugin]: http://wiki.panotools.org/Hugin

View File

@@ -0,0 +1,166 @@
---
title: "Pi pan-tilt for huge images, part 2: Hugin & PanoTools integration"
author: Chris Hodapp
date: "2016-10-04"
tags:
- photography
- electronics
- raspberrypi
---
In my [last post](./2016-09-25-pi-pan-tilt-1.html) I introduced some
of the project I've been working on. This post is a little more
technical; if you don't care, and just want to see a 91 megapixel
image from inside [Hive13][], skip to the end.
Those of you who thought a little further on the first post might have
seen that I made an apparatus that captures a series of images from
fairly precise positions, and then completely discards that position
information, hands the images off to [Hugin][] and [PanoTools][], and
has them crunch numbers for awhile to calculate *the very same
position information* for each image.
That's a slight oversimplification - they also calculate lens
parameters, they calculate other position parameters that I ignore,
and the position information will deviate because:
- Stepper motors can stall, and these steppers may have some
hysteresis in the gears.
- The pan and tilt axes aren't perfectly perpendicular.
- The camera might have a slight tilt or roll to it due to being built
that way, due to the sensor being mounted that way, or due to the
whole assembly being mounted that way.
- The camera's [entrance pupil][] may not lie exactly at the center of
the two axes, which will cause rotations to also produce shifts in
position that they must account for.
([No, it's not the nodal point. No, it's not the principal point.][npp]
More on this will follow later. Those shifts in position can also
cause parallaxing, which is much more annoying to account for. To
get what I mean, close one eye and look at a stationary item in the
foreground, and then try to rotate your head without the background
moving behind it.)
That is, the position information we have is subject to inaccuracies,
and is not sufficient on its own. However, these tools still do a big
numerical optimization, and a starting position that is "close" can
help them along, so we may as well use the information.
Also, these optimizations depend on having enough good data to average
out to a good answer. Said data comes from matches between features
in overlapping images, say, using something like [SIFT][] and
[RANSAC][]. Even if we've left plenty of overlap in the images we've
shot, some parts of scenes can simply lack features like corners that
work well for this (see chapter 4 of
[Computer Vision: Algorithms and Applications][szeliski] if you're
really curious). We may end up with images for which optimization
can't really improve the estimated position, and here a guess based on
where we think the stepper motors were is much better than nothing.
If we look at the [PTO file format][pto] (which Hugin & PanoTools use)
in its i-lines section, it has pitch, yaw, and roll for each image.
Pitch and yaw are precisely the axes in which the steppers move the
camera (recall the pictures of the rig from the last post); the roll
axis is how the camera has been rotated. We need to know the lens's
angle of view too, but as with other parameters it's okay to just
guess and let the optimization fine-tune it. The nominal focal length
probably won't be exact anyhow.
Helpfully, PanoTools provides tools like [pto_gen][] and [pto_var][],
and I use these in my script to generate a basic `.pto` file from the
2D grid in which I shot images. All that's needed is to add up the
steps taken to reach each shot, convert steps to degrees, which for
these steppers means using 360 / 64 / 63.63895 = about 0.0884
(according to [this][steps]), and making sure that the positive and
negative degrees correspond to the right direction in each axis.
With no refining, tweaking, or optimization, only the per-image
stepper motor positions and my guess at the lens's FOV, here is how
this looks in Hugin's fast preview:
[![Hive13](../images/2016-10-04-pi-pan-tilt-2/hugin-steppers-only.jpg){width=100%}](../images/2016-10-04-pi-pan-tilt-2/hugin-steppers-only.jpg)
*(This is a test run that I did inside of [Hive13][], by the way. I
used the CS-mount [ArduCam][] and its included lens. Shots were in a
14 x 4 grid and about 15 degrees apart. People and objects were
moving around inside the space at the time, which may account for some
weirdness...)*
Though it certainly has gaps and seams, it's surprisingly coherent.
The curved-lines distortion in Hugin's GUI on the right is due to the
[projection][], and perfect optics and perfect positioning information
can't correct it. Do you recall learning in school that it's
impossible to put the globe of the world into a flat two-dimensional
map without distortion? This is exactly the same problem - which is
likely why Hugin's GUI shows all the pictures mapped onto a globe on
the left. That's another topic completely though...
Of course, Hugin pretty much automates the process of finding control
points, matching them, and then finding optimal positions for each
image, so that is what I did next. We can also look at these
positions directly in Hugin's GUI. The image below contains two
screenshots - on the left, the image positions from the stepper
motors, and on the right, the optimized positions that Hugin
calculated:
[![Hugin comparison](../assets_external/2016-10-04-pi-pan-tilt-2/hugin-comparison.png){width=100%}](../assets_external/2016-10-04-pi-pan-tilt-2/hugin-comparison.png)
They sort of match up, though pitch deviates a bit. I believe that's
because I shifted the pitch of the entire thing to straighten it out,
or perhaps Hugin did this automatically to center it, but I haven't
examined this in detail yet. (Helpfully, the same process can be used
to [calibrate lenses][hugin_lens] and compute the real focal length at
the same time - which can be particularly necessary for cases like
this where I'm trying to get the most out of cheap optics and when the
Exif tags won't include focal lengths.)
Result
======
A full-resolution JPEG of the result after automated stitching,
exposure fusion, lens correction, and so on, is below in this handy
zoomable viewer using [OpenSeadragon][]:
<div id="openseadragon1" style="width: 100%; height: 600px;"></div>
<script src="../js/openseadragon/openseadragon.min.js"></script>
<script type="text/javascript">
var viewer = OpenSeadragon({
id: "openseadragon1",
prefixUrl: "../js/openseadragon/images/",
tileSources: "../assets_external/2016-10-04-pi-pan-tilt-2/2016-10-04-hive13.dzi"
});
</script>
It's 91.5 megapixels; if the above viewer doesn't work right, a
[full-resolution JPEG](../assets_external/2016-10-04-pi-pan-tilt-2/2016-10-04-hive13.jpg)
is available too. The full TIFF image is 500 MB, so understandably, I
didn't feel like hosting it, particularly when it's not the prettiest
photo or the most technically-perfect one (it's full of lens flare,
chromatic aberration, overexposure, sensor noise, and the occasional
stitching artifact).
However, you can look up close and see how well the details came
through - which I find quite impressive for cheap optics and a cheap
sensor.
[Part 3](./2016-10-12-pi-pan-tilt-3.html) delves into the image
processing workflow.
[ArduCam]: http://www.arducam.com/camera-modules/raspberrypi-camera/
[forum-raw-images]: https://www.raspberrypi.org/forums/viewtopic.php?p=357138
[raspistill]: https://www.raspberrypi.org/documentation/raspbian/applications/camera.md
[25mm-lens]: https://www.amazon.com/gp/product/B00N3ZPTE6
[Hugin]: http://wiki.panotools.org/Hugin
[PanoTools]: http://wiki.panotools.org/Main_Page
[entrance pupil]: https://en.wikipedia.org/wiki/Entrance_pupil
[npp]: http://www.janrik.net/PanoPostings/NoParallaxPoint/TheoryOfTheNoParallaxPoint.pdf
[steps]: https://arduino-info.wikispaces.com/SmallSteppers?responseToken=04cbc07820c67b78b09c414cd09efa23f
[SIFT]: https://en.wikipedia.org/wiki/Scale-invariant_feature_transform
[RANSAC]: https://en.wikipedia.org/wiki/RANSAC
[hive13]: http://hive13.org/
[projection]: http://wiki.panotools.org/Projections
[szeliski]: http://szeliski.org/Book/
[pto]: http://hugin.sourceforge.net/docs/manual/PTOptimizer.html
[pto_gen]: http://wiki.panotools.org/Pto_gen
[pto_var]: http://wiki.panotools.org/Pto_var
[hugin_lens]: http://hugin.sourceforge.net/tutorials/calibration/en.shtml
[OpenSeadragon]: https://openseadragon.github.io/

View File

@@ -0,0 +1,233 @@
---
title: "Pi pan-tilt for huge images, part 3: ArduCam & raw images"
author: Chris Hodapp
date: "2016-10-12"
tags:
- photography
- electronics
- raspberrypi
---
This is the third part in this series, continuing on from
[part 1][part1] and [part 2][part2]. The last post was about
integrating the hardware with Hugin and PanoTools. This one is
similarly technical, and without any pretty pictures (really, it has
no concern at all for aesthetics), so be forewarned.
Thus far (aside from my first stitched image) I've been using a raw
workflow where possible. That is, all images arrive from the camera
in a lossless format, and every intermediate step works in a lossless
format. To list out some typical steps in this:
- Acquire raw images from camera with [raspistill][].
- Convert these to (lossless) TIFFs with [dcraw][].
- Process these into a composite image with [Hugin][] & [PanoTools][],
producing another lossless TIFF file (for low dynamic range) or
[OpenEXR][] file (for [high dynamic range][hdr]).
- Import into something like [darktable][] for postprocessing.
I deal mostly with the first two here.
# Acquiring Images
I may have mentioned in the first post that I'm using
[ArduCam's Raspberry Pi camera][ArduCam]. This board uses a
5-megapixel [OmniVision OV5647][ov5647]. (I believe they have
[another][arducam_omx219] that uses the 8-megapixel Sony OMX 219, but
I haven't gotten my hands on one yet.)
If you are expecting the quality of sensor even an old DSLR camera
provides, this board's tiny, noisy sensor will probably disappoint
you. However, if you are accustomed to basically every other camera
that is within double the price and interfaces directly with a
computer of some kind (USB webcams and the like), I think you'll find
it quite impressive:
- It has versions in three lens mounts: CS, C, and M12. CS-mount and
C-mount lenses are plentiful from their existing use in security
cameras, generally inexpensive, and generally good enough quality
(and for a bit extra, ones are available with
electrically-controllable apertures and focus). M12 lenses (or
"board lenses") are... plentiful and inexpensive, at least. I'll
probably go into more detail on optics in a later post.
- 10-bit raw Bayer data straight off the sensor is available (see
[raspistill][] and its `--raw` option, or how
[picamera][picamera-raw] does it). Thus, we can bypass all of the
automatic brightness, sharpness, saturation, contrast, and
whitebalance correction which are great for snapshots and video, but
really annoying for composite images.
- Likewise via [raspistill][], we may directly set the ISO speed and
the shutter time in microseconds, bypassing all automatic exposure
control.
- It has a variety of features pertaining to video, none of which I
care about for this application. Go look in [picamera][] for the
details.
I'm mostly using the CS-mount version, which came with a lens that is
surprisingly sharp. If anyone knows how to do better for $30 (perhaps
with those GoPro knockoffs that are emerging?), please tell me.
Reading raw images from the Raspberry Pi cameras is a little more
convoluted, and I suspect that this is just how the CSI-2 pathway for
imaging works on the Raspberry Pi. In short: It produces a JPEG file
which contains a normal, lossy image, followed by a binary dump of the
raw sensor data, not as metadata, not as JPEG data, just... dumped
after the JPEG data. *(Where I refer to "JPEG image" here, I'm
referring to actual JPEG-encoded image data, not the binary dump stuck
inside something that is coincidentally a JPEG file.)*
Most of my image captures were with something like:
raspistill --raw -t 1 -w 640 -h 480 -ss 1000 -ISO 100 -o filename.jpg
That `-t 1` is to remove the standard 5-second timeout; I'm not sure
if I can take it lower. `-w 640 -h 480 -q 75` applies to the JPEG
image, while the raw data with `--raw` is always full-resolution; I'm
saving only a much-reduced JPEG as a thumbnail of the raw data, rather
than wasting the disk space and I/O on larger JPEG data than I'll use.
`-ss 1000` is for a 1000 microsecond exposure (thus 1 millisecond),
and `-ISO 100` is for ISO 100 speed (the lowest this sensor will do).
Note that we may also remove the `-ss` option and instead `-set` to
get lines like:
mmal: Exposure now 10970, analog gain 256/256, digital gain 256/256
mmal: AWB R=330/256, B=337/256
That 10970 is the shutter speed, again in microseconds, according to
the camera's metering. Analog and digital gain relate to ISO, but
only somewhat indirectly; setting ISO will result in changes to both,
and from what I've read, they both equal 1 if the ISO speed is 100.
I just switched my image captures to use [picamera][] rather than
`raspistill`. They both are fairly thin wrappers on top of the
hardware; the only real difference is that picamera exposes things via
a Python API rather than a commandline tool.
# Converting Raw Images
People have already put considerable work into converting these rather
strange raw image files into something more sane (as the Raspberry Pi
forums document [here][forum1] and [here][forum2]) - like the
[color tests][beale] by John Beale, and 6by9's patches to dcraw, some
of which have made it into Dave Coffin's official [dcraw][].
I've had to use 6by9's version of dcraw, which is at
<https://github.com/6by9/RPiTest/tree/master/dcraw>. As I understand
it, he's trying to get the rest of this included into official dcraw.
On an older-revision ArduCam board, I ran into problems getting 6by9's
dcraw to read the resultant raw images, which I fixed with a
[trivial patch][dcraw-pr]. However, that board had other problems, so
I'm no longer using it. (TODO: Explain those problems.)
My conversion step is something like:
dcraw -T -W *.jpg
`-T` writes a TIFF and passes through metadata `-W` tells dcraw to
leave the brightness alone; I found out the hard way that leaving this
out would lead to some images with mangled exposures. From here,
dcraw produces a `.tiff` for each `.jpg`. We can, if we wish, use all
of that 10-bit range by using `-6` to make a 16-bit TIFF rather than
an 8-bit one. In my own tests, though, it makes no difference
whatsoever because of the sensor's noisiness.
We can also rotate the image at this step, but I prefer to instead add
this as an initial roll value of -90, 90, or 180 degrees when creating
the PTO file. This keeps the lens parameters correct if, for
instance, we already have computed a distortion model of a lens.
To give an example of the little bit of extra headroom that raw images
provide, I took 9 example shots of the same scene, ranging from about
-1.0 underexposed down to -9.0 underexposed. The first grid is the
full-resolution JPEG image of these shots, normalized - in effect,
trying to re-expose them properly:
[![](../images/2016-10-12-pi-pan-tilt-3/tile_jpg.jpg){width=100%}](../images/2016-10-12-pi-pan-tilt-3/tile_jpg.jpg)
The below contains the raw sensor data, turned to 8-bit TIFF and then
again normalized. It's going to look different than the JPEG due to
the lack of whitebalance adjustment, denoising, brightness, contrast,
and so on.
[![](../images/2016-10-12-pi-pan-tilt-3/tile_8bit.jpg){width=100%}](../images/2016-10-12-pi-pan-tilt-3/tile_8bit.jpg)
These were done with 16-bit TIFFs rather than 8-bit ones:
[![](../images/2016-10-12-pi-pan-tilt-3/tile_16bit.jpg){width=100%}](../images/2016-10-12-pi-pan-tilt-3/tile_16bit.jpg)
In theory, the 16-bit ones should be retaining two extra bits of data
from the 10-bit sensor data, and thus two extra stops of dynamic
range, that the 8-bit image cannot keep. I can't see the slightest
difference myself. Perhaps those two bits are below the noise floor;
perhaps if I used a brighter scene, it would be more apparent.
Regardless, starting from raw sensor data rather than the JPEG image
gets some additional dynamic range. That's hardly surprising - JPEG
isn't really known for its faithful reproduction of darker parts of an
image.
Here's another comparison, this time a 1:1 crop from the center of an
image (shot at 40mm with [this lens][12-40mm], whose Amazon price
mysteriously is now <span>$</span>146 instead of the <span>$</span>23
I actually paid). Click the preview for a lossless PNG view, as JPEG
might eat some of the finer details, or [here][leaves-full] for the
full JPEG file (including raw, if you want to look around).
[![JPEG & raw comparison](../assets_external/2016-10-12-pi-pan-tilt-3/leaves_test_preview.jpg){width=100%}](../assets_external/2016-10-12-pi-pan-tilt-3/leaves_test.png)
The JPEG image seems to have some aggressive denoising that cuts into
sharper detail somewhat, as denoising algorithms tends to do. Of
course, another option exists too, which is to shoot many images from
the same point, and then average them. That's only applicable in a
static scene with some sort of rig to hold things in place, which is
convenient, since that's what I'm making...
[![Shot setup](../assets_external/2016-10-12-pi-pan-tilt-3/IMG_20161016_141826_small.jpg){width=100%}](../assets_external/2016-10-12-pi-pan-tilt-3/IMG_20161016_141826_small.jpg)
I used that (messy) test setup to produce the below comparison between
a JPEG image, a single raw image, 4 raw images averaged, and 16 raw
images averaged. These are again 1:1 crops from the center to show
noise and detail.
[![JPEG, raw, and averaging](../assets_external/2016-10-12-pi-pan-tilt-3/penguin_compare.jpg){width=100%}](../assets_external/2016-10-12-pi-pan-tilt-3/penguin_compare.png)
Click for the lossless version, and take a look around finer details.
4X averaging has clearly reduced the noise from the un-averaged raw
image, and possibly has done better than the JPEG image in that regard
while having clearer details. The 16X definitely has.
Averaging might get us the full 10 bits of dynamic range by cleaning
up the noise. However, if we're able to shoot enough images at
exactly the same exposure to average them, then we could also shoot
them at different exposures (i.e. [bracketing][]), merge them into an
HDR image (or [fuse them][exposure fusion]), and get well outside of
that limited dynamic range while still having much of that same
averaging effect.
I'll cover the remaining two steps I noted - Hugin & PanoTools
stitching and HDR merging, and postprocessing - in the next post.
[part1]: ./2016-09-25-pi-pan-tilt-1.html
[part2]: ./2016-10-04-pi-pan-tilt-2.html
[raspistill]: https://www.raspberrypi.org/documentation/raspbian/applications/camera.md
[dcraw]: https://www.cybercom.net/~dcoffin/dcraw/
[Hugin]: http://wiki.panotools.org/Hugin
[PanoTools]: http://wiki.panotools.org/Main_Page
[OpenEXR]: http://www.openexr.com/
[hdr]: https://en.wikipedia.org/wiki/High-dynamic-range_imaging
[darktable]: http://www.darktable.org/
[ArduCam]: http://www.arducam.com/camera-modules/raspberrypi-camera/
[ov5647]: http://www.ovt.com/uploads/parts/OV5647.pdf
[arducam_omx219]: http://www.arducam.com/8mp-sony-imx219-camera-raspberry-pi/
[beale]: http://bealecorner.org/best/RPi/
[forum1]: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=44918
[forum2]: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=92562
[dcraw-6by9]: https://github.com/6by9/RPiTest/tree/master/dcraw
[dcraw-pr]: https://github.com/6by9/RPiTest/pull/1
[picamera-raw]: https://picamera.readthedocs.io/en/release-1.10/recipes2.html#bayer-data
[picamera]: https://www.raspberrypi.org/documentation/usage/camera/python/README.md
[12-40mm]: https://www.amazon.com/StarDot-Vari-Focal-Camera-Lens-Black/dp/B00IPR1YSC
[leaves-full]: ../assets_external/2016-10-12-pi-pan-tilt-3/leaves_test_full.jpg
[exposure fusion]: https://en.wikipedia.org/wiki/Exposure_Fusion
[bracketing]: https://en.wikipedia.org/wiki/Bracketing

View File

@@ -0,0 +1,25 @@
---
title: "CincyFP presentation: R & Feature Transformation"
author: Chris Hodapp
date: "2016-12-13"
tags:
- r, cincyfp
---
Another cross-post (sort of): The slides and notebooks from my
presentation on "R and Feature Learning"
to
[CincyFP](https://cincyfp.wordpress.com/2016/11/29/december-meeting-5/) are
online.
Presentation slides
are
[here](../assets_external/2016-12-13-cincyfp-r-crosspost/CincyFP_R_slides.slides.html) and
the notebook live-coded in the presentation is
at
[Live_demo.ipynb](https://github.com/Hodapp87/cincyfp_presentation_R_2016_12/blob/master/Live_demo.ipynb).
This is on
[my GitHub](https://github.com/hodapp87/cincyfp_presentation_R_2016_12) as
well as
[CincyFP's GitHub](https://github.com/cincy-functional-programmers/cincyfp-presentations/tree/master/2016-12-r-pca).

View File

@@ -0,0 +1,144 @@
---
title: Some Python asyncio disambiguation
author: Chris Hodapp
date: "2018-03-09"
tags:
- technobabble
---
# TODO: Generators? Is it accurate that prior to all this, coroutines
# were still available, but by themselves they offered no way to
# perform anything in the background?
Recently I needed to work a little more in-depth with Python 3's
[[https://docs.python.org/3/library/asyncio.html][asyncio]]. On the one hand, some people (like me) might scoff at this
because it's just green threads and cooperative threading is a model
that's fresh out of the '90s, and Python /still/ has the [[https://wiki.python.org/moin/GlobalInterpreterLock][GIL]] - and
because Elixir, Erlang, Haskell, [[https://github.com/clojure/core.async/][Clojure]] (also [[http://blog.paralleluniverse.co/2013/05/02/quasar-pulsar/][this]]), [[http://docs.paralleluniverse.co/quasar/][Java/Kotlin]], and
Go all handle async and M:N threading fine, and have for years. The
Python folks have their own set of complaints, like
[[http://lucumr.pocoo.org/2016/10/30/i-dont-understand-asyncio/][I don't understand Python's Asyncio]] and
[[http://jordanorelli.com/post/31533769172/why-i-went-from-python-to-go-and-not-nodejs][Why I went from Python to Go (and not node.js)]].
At least it is in good company [[https://nullprogram.com/blog/2018/05/31/#threads][with Emacs still]].
On the other hand, it's still a useful enough paradigm that it's in
the works for [[https://doc.rust-lang.org/nightly/unstable-book/language-features/generators.html][Rust]] (sort of... it had green threads which were removed
in favor of a lighter approach) and broadly the [[http://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.html][JVM]] (sort
of... they're trying to do [[https://en.wikipedia.org/wiki/Fiber_(computer_science)][fibers]], not green threads). [[https://github.com/libuv/libuv][libuv]] brings
something very similar to various languages, including C, and C
already has an asyncio imitator with [[https://github.com/AndreLouisCaron/libgreen][libgreen]]. Speaking of C, did
anyone know that GLib has some decent support here via things like
[[https://developer.gnome.org/gio/stable/GTask.html][GTask]], [[https://developer.gnome.org/glib/stable/glib-Thread-Pools.html][GThreadPool]], and [[https://developer.gnome.org/glib/stable/glib-Asynchronous-Queues.html][GAsyncQueue]]? I didn't until recently. But I
digress...
asyncio is still preferable to manually writing code in
[[https://en.wikipedia.org/wiki/Continuation-passing_style][continuation-passing-style]] (as that's all callbacks are, and last time
I had to write that many callbacks, I hated it enough that I [[https://haskellembedded.github.io/posts/2016-09-23-introducing-ion.html][added
features to my EDSL]] to avoid it), it's still preferable to a lot of
manual arithmetic on timer values to try to schedule things, and it's
still preferable to doing blocking I/O all over the place and trying
to escape it with other processes. Coroutines are also preferable to
yet another object-oriented train-wreck when it comes to handling
things like pipelines. While Python's had coroutines for quite awhile
now, asyncio perhaps makes them a little more obvious. [[http://www.dabeaz.com/coroutines/Coroutines.pdf][David
Beazley's slides]] are excellent for explaining its earlier coroutine
support.
I found the [[https://pymotw.com/3/concurrency.html][Concurrency with Processes, Threads, and Coroutines]]
tutorials to be an excellent overview of Python's asyncio, as well as
most ways of handling concurrency in Python, and I highly recommend
them.
However, I still had a few stumbling blocks in understanding, and
below I give some notes I wrote to check my understanding. I put
together a table to try to classify what method to use in different
circumstances. As I use it here, calling "now" means turning control
over to some other code, whereas calling "whenever" means retaining
control but queuing up some code to be run in the background
asychronously (as much as possible).
|-----------+-----------+-----------------------+-----------------------------------------------|
| Call from | Call to | When/where | How |
|-----------+-----------+-----------------------+-----------------------------------------------|
| Either | Function | Now, same thread | Normal function call |
| Function | Coroutine | Now, same thread | ~.run_*~ in event loop |
| Coroutine | Coroutine | Now, same thread | ~await~ |
| Either | Function | Whenever, same thread | Event loop ~.call_*()~ |
| Either | Coroutine | Whenever, same thread | Event loop ~.create_task()~ |
| | | | ~asyncio.ensure_future()~ |
| Either | Function | Now, another thread | ~.run_in_executor()~ on ~ThreadPoolExecutor~ |
| Either | Function | Now, another process | ~.run_in_executor()~ on ~ProcessPoolExecutor~ |
|-----------+-----------+-----------------------+-----------------------------------------------|
* Futures & Coroutines
The documentation was also sometimes vague on the relation between
coroutines and futures. My summary on what I figured out is below.
** Python already had generator-based coroutines.
Python now has a language feature it refers to as "coroutines" in
asyncio (and in calls like ~asyncio.iscoroutine()~, but in Python 2.5
it also already supported similar-but-not-entirely-the-same form of
coroutine, and even earlier in a limited form via generators. See [[https://www.python.org/dev/peps/pep-0342/][PEP
342]] and [[http://www.dabeaz.com/coroutines/Coroutines.pdf][Beazley's slides]].
** Coroutines and Futures are *mostly* independent.
It just happens that both allow you to call things asychronously.
However, you can use coroutines/asyncio without ever touching a
Future. Likewise, you can use a Future without ever touching a
coroutine or asyncio. Note that its ~.result()~ call isn't a
coroutine.
** They can still encapsulate each other.
A coroutine can encapsulate a Future simply by using ~await~ on it.
A Future can encapsulate a coroutine with [[https://docs.python.org/3/library/asyncio-task.html#asyncio.ensure_future][asyncio.ensure\_future()]] or
the event loop's [[https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.AbstractEventLoop.create_task][.create\_task()]].
** Futures can implement asychronicity(?) differently
The ability to make a Future from a coroutine was mentioned above;
that's [[https://docs.python.org/3/library/asyncio-task.html#task][asyncio.Task]], an implementation of [[https://docs.python.org/3/library/asyncio-task.html#future][asyncio.Future]], but it's not
the only way to make a Future.
[[https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Future][concurrent.futures.Future]] provides other mostly-compatible ways. Its
[[https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor][ThreadPoolExecutor]] provides Futures based on separate threads, and its
[[https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor][ProcessPoolExecutor]] provides Futures based on separate processes.
** Futures are always paired with some running context.
That is, a Future is already "started" - running, or scheduled to run,
or already ran, or something along those lines, and this is why it has
semantics for things like cancellation.
A coroutine by itself is not. The closest analogue is [[https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.Handle][asyncio.Handle]]
which is available only when a coroutine has been scheduled to run.
* Other Event Loops
[[https://pypi.python.org/pypi/Quamash][Quamash]] implements an asyncio event loop inside of Qt, and I used this
on a project. I ran into many issues with this combination. Qt's
juggling of multiple event loops seemed to cause many problems here,
and I still have some unsolved issues in which calls
~run_until_complete~ cause coroutines to die early with an exception
because the event loop appears to have died. This came up regularly
for me because of how often I would want a Qt slot to queue a task in
the background, and it seems this is an acknowledge [[https://github.com/harvimt/quamash/issues/33][issue]].
There is also [[https://github.com/MagicStack/uvloop\][uvloop]]. I presently have no need for extra performance
(nor could I really use it alongside Qt), but it's helpful to know
about.
* Other References
There are a couple pieces of "official" documentation that can be good
references as well:
- [[https://www.python.org/dev/peps/pep-0492/][PEP 492 - Coroutines with async and await syntax]]
- [[https://www.python.org/dev/peps/pep-0525/][PEP 525 - Asynchronous Generators]]
- [[https://www.python.org/dev/peps/pep-3156/][PEP 3156 - Asynchronous IO Support Rebooted: the "asyncio" Module]]
[[https://www.python.org/dev/peps/pep-0342/][PEP 342]] and [[https://www.python.org/dev/peps/pep-0380/][PEP 380]] are relevant too.

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

View File

@@ -0,0 +1,109 @@
---
title: "Go programming language: my totally unprompted opinions"
author: Chris Hodapp
date: "2018-04-13"
tags:
- technobabble
- go
- golang
toc: true
---
# TODO: Link to my asyncio post
After I wrote my post on Python and asyncio, I had the opportunity to
work with the [[https://golang.org/][Go]] language for some other projects, and I started
jotting down my opinions on it as I did so.
After using it for a bit, I decided that it's mostly C with
concurrency, seamless [[https://www.slideshare.net/matthewrdale/demystifying-the-go-scheduler][M:N threading]], garbage collection, fast
compilation, namespaces, multiple return values, packages, a mostly
sane build system, no C preprocessor, *minimal* object-oriented
support, interfaces, anonymous functions, and closures. Those aren't
trivialities; they're all rather great things. They're all missing in
C and C++ (for the most part - excluding that C++11 has started
incorporating some). They're all such common problems that nearly
every "practical" C/C++ project uses a lot of ad-hoc solutions sitting
both inside and outside the language - libraries, abuse of macros,
more extensive code generation, lots of tooling, and a whole lot of
"best practices" slavishly followed - to try to solve them. (No, I
don't want to hear about how this lack of very basic features is
actually a feature. No, I don't want to hear about how painstakingly
fucking around with pointers is the hairshirt that we all must wear if
we wish for our software to achieve a greater state of piety than is
accessible to high-level languages. No, I don't want to hear about
how ~$arbitrary_abstraction_level~ is the level that *real*
programmers work at, any programmer who works above that level is a
loser, and any programmer who works below that level might as well be
building toasters. Shut up.)
I'm a functional programming nerd. I just happen to also have a lot of
experience being knee-deep in C and C++ code. I'm looking at Go from
two perspectives: compared to C, and compared to any other programming
language that might be used to solve similar problems.
It still has ~goto~. This makes the electrical engineer in me happy.
Anyone who tells me I should write in a C-like language without goto
can go take a flying leap.
The concurrency support is excellent when compared to C and even
compared to something like Python. The ability to seamlessly
transition a block of code in between running sychronously and running
asynchronously (by making it into a goroutine) is very helpful, and so
is the fact that muxes these goroutines onto system threads more or
less transparently.
Concurrency was made a central aim in this language. If you've not
watched Rob Pike's [[https://blog.golang.org/concurrency-is-not-parallelism][Concurrency is not parallelism]] talk, go do it now.
While I may not be a fan of the style of concurrency that it uses
(based on [[https://en.wikipedia.org/wiki/Communicating_sequential_processes][CSP]] rather than the more Erlang-ian message passing), this
is still a far superior style to the very popular concurrency paradigm
of Concurrency Is Easy, We'll Just Ignore It Now and Duct-Tape the
Support On Later, How Hard Could It Possibly Be. [[http://jordanorelli.com/post/31533769172/why-i-went-from-python-to-go-and-not-nodejs][Why I went from
Python to Go (and not node.js)]], in my opinion, is spot-on.
Many packages are available for it, and from all I've seen, they are
sensible packages - not [[https://www.reddit.com/r/programming/comments/4bjss2/an_11_line_npm_package_called_leftpad_with_only/][leftpad]]-style idiocy. I'm sure that if I look
more carefully, a lot of packages mostly exist in order to patch over
limitations in the language - but so far, I've yet to encounter a
single 3rd-party uber-package that is effectively a requirement for
doing any "real" work in the language, while the standard libraries
don't look excessive either.
I don't exactly make it a secret that I am [[http://www.smashcompany.com/technology/object-oriented-programming-is-an-expensive-disaster-which-must-end][not]] [[https://medium.com/@cscalfani/goodbye-object-oriented-programming-a59cda4c0e53#.7t9nj6geg][a fan]] of
[[http://harmful.cat-v.org/software/OO_programming/why_oo_sucks][object-oriented programming]]. I like that Go's support for OOP is
rather minimal: it's just interfaces and some syntactic sugar around
structs.
The syntax and typing are very familiar to anyone who has used C, and
they seem to make it easy for editors/IDEs to integrate with (likely
by design). It all feels very solid.
However, while [[https://blog.golang.org/defer-panic-and-recover][defer, panic, and recover]] are an improvement over C,
I'm less a fan of its oppositions to exceptions as a normal
error-handling mechanism. Whatever the case, it was a conscious
design decision, not an oversight; see [[https://davidnix.io/post/error-handling-in-go/][Go's Error Handling is Elegant]]
and Pike's [[https://blog.golang.org/errors-are-values][Errors Are Values]]. The article [[http://250bpm.com/blog:4][Why should I have written
ZeroMQ in C, not C++ (part I)]] also makes some good points on how
exceptions can be problematic in systems programming.
My biggest complaint is that while I tend to prefer strongly-typed,
statically-typed languages (and Go is both), I feel like the type
system is also still very limited - particularly, things like the lack
of any parametric polymorphism. I'd probably prefer something more
like in [[https://www.rust-lang.org][Rust]]. I know this was largely intentional as well: Go was
designed for people who don't want a more powerful type system, but do
want types, and further, to support this kind of polymorphism involves
tradeoffs it looks like they were avoiding, like those Russ Cox gives
in [[https://research.swtch.com/generic][The Generic Dilemma]]. (Later note: the [[https://github.com/golang/proposal/blob/master/design/go2draft-contracts.md][Contracts - Draft Design]]
proposal for Go 2 offers a possible approach for parametric
polymorphism.)
My objections aren't unique. [[https://www.teamten.com/lawrence/writings/why-i-dont-like-go.html][Ten Reasons Why I Don't Like Golang]] and
[[http://yager.io/programming/go.html][Why Go Is Not Good]] have criticisms I can't really disagree with.
(Also, did you know someone put together
[[https://github.com/ksimka/go-is-not-good][https://github.com/ksimka/go-is-not-good]]?)
All in all, though, Go is a procedural/imperative language with a lot
of good design in language and tooling... which is great, if it's only
procedural/imperative you need.

View File

@@ -0,0 +1,18 @@
---
title: "Moo"
author: Chris Hodapp
date: Dec 21, 1999
tags:
- raytraced
- rendered
- cgi
- polyray
img: images/1999-12-21-moo.png
---
Perhaps my first "finished" render. After seeing my brother play
around in [POV-Ray](http://povray.org/) in the late '90s, I looked
around for a copy on a local BBS. It wouldn't run right, as my CPU
was half-fried and couldn't run for very long in protected mode, but
[PolyRay](http://memweb.newsguy.com/~wolverin/) did run. Source code
is [here](assets/1999-12-21-moo.pi). Knock yourself out.

View File

@@ -0,0 +1,15 @@
---
title: "'Table' or something"
author: Chris Hodapp
date: Dec 22, 1999
tags:
- raytraced
- rendered
- cgi
- polyray
img: images/1999-12-22-table.png
---
The only other "finished" render from PolyRay. As you can see, I
started with abstract bullshit pretty early on. Source code
is [here](assets/1999-12-22-table.pi).

Some files were not shown because too many files have changed in this diff Show More