Reflected Pensiveness

beneath the leaky pipe of thought.

Posts Tagged ‘Fedora

Happy new year!

with 6 comments

About 0.75 years ago, I blogged about the sillyness of our arbitrary calendar setup (link) that somehow still exists in what I like to think of as a somewhat more enlightened age (but maybe not too enlightened).

For those of you who might have laughed at my above-linked post 9 months ago, I will again point out that we need to move in a direction that is both universally uniform and based sensibly off of natural counting units (powers of two, maybe) if we ever want to make a good impression when we become a space-faring race. I think a good way to start would be to introduce these new units in the scientific (maybe the computer science?) community and let them filter down to the rest of the world.

And I’m serious.

Really. I’m serious.

I am. This (the space-faring thing) is actually important to me.

Anyway, happy “the earth has just passed some arbitrarily celebrated point in its orbit about the sun” day.

Really, though. Happy new years.

Written by Matthew Daniels

January 1, 2010 at 9:27 pm

Building a touch-screen laboratory monitor with PyGTK

with 3 comments

So I’m building this application to use in our lab at Clemson to keep tabs on all the sensors around the equipment. I’m not going to copy over the whole post here but for anybody who has an interest in following my coding endeavors can check out my post at http://ionsurfing.wordpress.com/2009/12/30/mockupsunusable-alpha-screenshots-for-tactile/. I’ve got some nice screenshots and explanations of where I’m going with the program. I think the biggest challenge will be finding a good way to deal with human interaction using an old-style touchscreen. Any and all suggestions on libraries to look into or thoughts on UI challenges are welcome.  :)

By the way, thanks to Mairin for her Inkscape mockup class at FUDCon… I actually used it!

Written by Matthew Daniels

December 31, 2009 at 6:38 am

Reflections on Computers

with one comment

Sometimes, you just have to sit back and wonder how computers are able to do the things they do. I’m at home in Charleston right now, but I have a Fedora 11 box sitting in my on-campus apartment back in Clemson. Right now, that old Dell Dimension 3000 is:

  1. Running an X server with at least 20 windows open that I never closed (and don’t feel the need to kill)
  2. Running an HTTP server
  3. Running mpd and icecast
  4. Streaming music via Icecast through an mp3 stream via a second http server through an ssh tunnel to my Arch Linux box here in Charleston
  5. Letting me control the music with ncmpc that I’m seeing under two layers of sshing
  6. Running 6 non-stop processor heavy perl scripts at a time for the past few days (this is what really boggles me).

How does a machine manage all this and still perform without noticeable lag?

I know it’s easily explainable if we start at the bottom and work our way up, but it still leaves me in awe occasionally. I mean, come on… there’s an external hard drive under my bed in Clemson. It’s spinning fast enough for some program to read data that can precisely emulate what The Decemberists sound like. All of that data is getting pushed through a USB cable and all of that is being magically mp3′d and pushed through an ethernet cable to a router to another router to another router and then out into the world where it ends up at my router and into my computer; all of that data is in an ssh tunnel, by the way. And even worse is that I’m not the only one using all of those cables and routers; there are millions of other users doing the same thing at the same time.

I don’t get it. I guess I still have a lot to learn.

Good for those engineers, yeah?

Written by Matthew Daniels

December 18, 2009 at 8:42 pm

Posted in Personal, Technology

Tagged with , ,

FUDCon at t=(7.77e8 ms)

with 5 comments

I arrived at FUDCon Toronto approximate 7.77 x 108 milliseconds ago (as of the starting time of this post’s composition), and I felt like that’s about long enough to wait before doing a final recap.

This past FUDCon was my first, and I’m really glad I ended up going. To be honest, I didn’t think it would even be possible for me to go, so I brushed it off – until someone suggested that I apply for financial aid. I can’t thank those people enough who determined that I was “worthy” to be sent to the conference. I wish I’d gotten my user track class aligned earlier, but I feel I did my part between helping out with some of them and transcribing three other sessions.

Turns out that this was the first time I’d left the country alone (I have been to England a few times, but always with my family), so that was an exciting personal achievement. But as for the conference, I have to take a little bit of pride in finishing my first package: Xinha, a JS module that turns <textarea>’s into rich text formatting areas; try it out on Fedora Insight when that site goes live! (Or try it at the project website: www.xinha.org.) It might have taken me a while to get there with this package, but now that I know how to do it I plan on taking on a few more packages over winter break.

Another big plus for FUDCon was being able to assign names to IRC nicks and faces to names (and faces to IRC nicks, by transitivity). Among those I feel like I made some connection with (in the style of a Perl hash):

# Nicks to names: ntonm

%ntonm = (

mchua => ‘Mel Chua’, # “We need Dennis to press the shiny button!”

biertie => ‘Bert Desmet’, # “Beer for breakfast…”

none_that_I_know_of => ‘Matthew from Toronto; Last name forgotten…’, # Pool game improves with glasses.

simon => ‘Simon Birtwistle, whose nick I can never remember’, # Runs Windows, but uses PuTTY, which is cool with me

# Et cetera… I can’t name them all here.

};

Something like that.

Anyway, this is my second blog post tonight (EST) and I’ll probably write one more (but I’ll schedule it to release later). Have a pleasant day or night (depending on where you are). Also note that I have three other FUDCon related posts:

  1. Saturday morning
  2. Saturday afternoon
  3. Day 1 = Saturday recap

Now that I see that list, I realize that I never blogged anything from Sunday… but that’s okay. I was hackfesting for most of the conference day. Toshio helped me push my Xinha package into Pending (and eventually Testing) for RHEL-5 and Fedora-1{0,1}. I also looked on as the other Zikula hackers worked on content and logical layout. That night? Ice skating and the “Et cetera”, a sampling of four different house brews from the Three Brewers in Toronto.

Written by Matthew Daniels

December 14, 2009 at 5:53 am

Posted in Personal, Reviews, Technology

Tagged with , , , ,

Bonjour, Lagrangian

with 2 comments

Last year, I learned about the layman’s essence of quantum mechanics, and I wrote a post about it on this blog. This semester, my big topic in physics class has been the Lagrangian and Lagrangian Mechanics. So, like last time, I’m going to write a nice lengthy post about it because:

  1. It might help someone else who wants a basic introduction, and
  2. It will definitely help me sort it out in my head, seeing as how my exam is this Tuesday.

Recall: Kinetic and Potential Energy

You might remember in previous physics classes a discussion concerning kinetic and potential energy. Recall that for any conservative force, E = T + U, where E is the total energy of the system, T is the kinetic energy, and U is the potential energy (I’ll use these conventions for the rest of this post).

You also might remember that using conservation of energy made some problems much easier to solve compared to using Newtonian methods. Consider, for example, the point-particle baseball thrown directly up in an air-resistance free world; we can find the maximum height by recongizing that at its maximum height the ball has zero velocity relative to the ground. Thus it has zero kinetic energy (because T=(1/2)mv2) and so its potential energy U=mghmax is equal to the total energy of the system. As a consequence, we can find the ball’s maximum height by setting E = E, or, equivalently, Umax = Tmax.

mghmax = (1/2)mv02

hmax=2v02/g

Where v0 is the initial velocity of the thrown ball. Note that we could also find the initial velocity by knowing the final height….

Principle of Least Action

To derive the basics of Lagrangian mechanics, we need to understand the calculus of variations, which is a topic beyond the scope of a blog post (and certainly beyond the scope of barebones HTML formatting).

En anglais, the principle of least action says this: a body moving from point A to point B will take the path that minimizes required action. Calculus of variations teaches us how to minimize an action integral in the general case. Now we can apply that to physics.

The Lagrangian

The Lagrangian L (usually written as a script L) is defined as:

L = T – U

Aside. I think it’s also valid to define L = U – T since we’ll be setting derivatives of the same function equal to each other so that signs will be irrelevant.

Then we can use the Euler-Lagrange formula (a result of calculus of variations) to say that for each generalized coordinate (xi) in our configuration space:

dL/dxi = d/dt [ dL/dxi' ]             (*)

If you have trouble reading that, just look up the Wikipedia article on Euler-Lagrange; I don’t feel like going through the trouble of LaTeX’ing on this not-yet-configured machine just to point out that the partial derivative of the Lagrangian with respect to the generalized coordinate xi equals (under the condition of minimizing the action integral) the time derivative of the partial derivative of the Lagrangian with respect to xi‘ (or xi dot, the derivative of xi with respect to time).

These mysterious generalized coordinates can be whatever you want them to be as long as they can fully describe the system you’re concerned with. With a simple pendulum, you might just have the angular coordinate phi, which can alone describe any state of the pendulum. With a pendulum on a spring, you might have phi and x, the length of the spring. With an Atwood machine, you might just have one coordinate again that describes the length of the rope on one side (which describes the entire system given an ideal rope).

The set of your generalized coordinates forms the basis of a configuration space in which every possible state of the system is in the set spanned by those coordinates… I think. We didn’t really cover that in class too much.

Equations of Motion

So anyway, now we have these equalities as defined by the equation (*), and each equality for some coordinate y should include y” (because we’ve taken a time derivative of y’).  Now we can re-arrange these as second order differential equations! Hurray!

fin !

Written by Matthew Daniels

December 14, 2009 at 3:19 am

Recapping FUDCon, day -exp(pi*i)

leave a comment »

Let’s recap what happened yesterday at FUDCon:

  • We assumed spherical ponies of uniform density
  • We had healthy lunches
  • The sysadmins and developers actually got along at their panel
  • <Insert lots of great talks here>
  • Transcribed some talks
  • The Fearless Leader spoke
  • Dave & Busters = Food + Beer + Pool

We’ll have to see how well the hackfests can stand up to that. I’m looking forward to it. I think I’ll be attending the Fedora Insight hackfest at the very least. Still need to check the wiki to find out what else there is.

And if you missed any of yesterday’s talks, be sure to go to the schedule page to find the IRC transcripts. I’ve proudly written the one on education with OSS, the one on Inkscape, and the one on UI design (even though my internet cut out for a bit in the middle of that one).
Also, I’ve recieved a few comments (IRL) about my previously posted “spy” pictures. I want to let everyone know that I am not, in fact, taking casual pictures with my phone and calling them spy pictures because I feel sneaky using that little camera. In reality, I do have spy cameras setup at various strategically chosen locations around the hotel and campus so that I know exactly where everyone and everything is.

Always.


Protip: Don’t get black tea at the hotel. They don’t give you boiling water so it comes out poorly; the earl grey just tastes like bergamot oil with no tea.

Written by Matthew Daniels

December 6, 2009 at 1:57 pm

Posted in Technology

Tagged with ,

FUDCon: 1320/Saturday

with 3 comments

I attended Bert’s Installing Fedora session in block 1; I think it went pretty well, although I probably would have prefered a less technical and more end-user/hands-on approach, but that’s probably the User-Guide-”Writer” coming out in me.

BarCamp was fun too, and full of ponies…

BarCamp voting

Voting at Barcamp

And what lunch lacks in choice it makes up in the quaint cuteness of brown bags, along with some pretty tasty treats. I’ve arranged them here in golden sprial style.

Fibonacci lunch

Fibonacci lunch

Written by Matthew Daniels

December 5, 2009 at 6:27 pm

Posted in Reviews, Technology

Tagged with , ,

FUDCon: 0835/Saturday

with one comment

FUDCon’s here! I’m sitting in the lobby of the Hilton Garden Inn in Vaughn.

The busses come every 30 minutes, Seth tells me; I guess I’ll catch the 8:5x one (?x in {0..9}). I’ve taken some spy pictures with my phone of the lobby and such…

Main lobby

Main lobby

Other part of the main lobby

Other part of the main lobby

So apparently I need to go buy a bus ticket; will check in again… with more spy pictures.

Written by Matthew Daniels

December 5, 2009 at 1:46 pm

Posted in Personal, Technology

Tagged with ,

Communicating with SPCI

leave a comment »

Background Story/Flavor Text

So I’m working on getting this ammeter to interface with Linux system for the lab, and it turns out that this thing supports the Standard Commands for Programmable Instruments (SCPI). A few hours, Google searches, and Perl scripts after I started, I’d done what I would call a reasonable job of communicating with this device and pulling data from it.

So what is SPCI, and how does it work?

Connecting the Interface

SPCI is just a standard set of commands, not a defined interface. But it turns out that when you’re communicating with electronics SPCI is often used over serial connections like GPIB or RS-232. In my case, I was forced to use RS-232 because of hardware limitations.

Now, you can just read and write directly with the device handle. In my case using RS-232, I ended up discovering that

/dev/ttyS0

was right for me.

Commands

The entire set of commands is found in this documentation from the IVI foundation site. The commands are organized in a directory like structure. If I want to execute the command to ask how many errors messages are sitting in the buffer, for example, I’ll execute this:

:SYST:ERR:COUNT?

What this effectively seems to do is…

  1. Go to the “root” directory [:]
  2. Look in the SYST(em) folder [SYST]
  3. Look in the ERR(or) folder [:ERR]
  4. Execute the COUNT command [COUNT]
  5. Note that this is a query; i.e. returned data is expected [?]

Each command has as:

:SYSTEM:ERROR:COUNT?
:System:Err:Count?
Syst:ERROR:COUNT?

Note that you can vary capitalization without consequence, you can choose to ignore that prefixed colon, and you can even mix around when you use long and short forms.

Example

I used SCPI to communicate with a Keithley 6485 Picoammeter. I doubt seriously that many people reading this will ever need to repeat this task, but it’s all I have to present some examples.

To turn off the zero check on the picoammeter and take the current reading, we could execute these commands:

Syst:ZCh 0
Read?

Note that I could have used “OFF” in place of “0″; either is a legitimate boolean value for “false”. Meanwhile, a script running in the background that looks something like this:

#!/bin/bash
cat /dev/ttyS0 >> datafile

Will magically receive a line of data from the machine that we can interpret with a simple Perl script.

Written by Matthew Daniels

October 20, 2009 at 11:24 pm

How to: Making Windows Work Like It Should

with 7 comments

Two days ago, I was trying to help my friend make his WinXP laptop connect to Clemson’s WPA2 Enterprise network. It knows how to do it (it’s done it many times before), but at that instant the computer just didn’t feel like cooperating. We tried several solutions, including rebooting (twice!) and re-entering all of the wireless settings. No success.

Axe of Death

The Axe of Death, threatening to end the IBM Thinkpad if it didn't comply with our network-related requests.

Disgruntled, Mark (my friend) started to verbally assault the computer. Failing, he suggested a new approach: visually letting the computer know how frustrated I was. We opened up mspaint and I started to draw a laptop being hacked by a blood-stained battle axe. As I drew the woosh lines behind my axe – just so it was clear that the computer was about to be slaughtered – the innocent beige bubble popped up letting us know that, out of the blue, despite two minutes of sitting there after giving up trying to get an IP address, we had an excellent connection to tigernet (the wireless network).

We laughed. It was funny. What a coincidence, eh?

The next day (last night) the computer did it again. We opened the same bitmap we drew before… to no avail. This laptop knew what was going on. It knew it couldn’t actually be harmed by a bitmap image.

So I opened a command prompt and ran ‘format C:’. Before I could finish reading the warning line (Are you sure you want to do this? [y/n]), tigernet was connected.

Format C:\

The ultimate threat to the Windows machine, bringing an otherwise unruly computing device to its knees.

I have to commend Microsoft on the incredible user interaction they’ve instilled in their operating systems. Threatening to slaughter and then vaporize someone would probably make them do what you want, so I suppose this is replicating human interaction, right? Man, it’s a shame Fedora won’t respond to threats like that.

In other news, Mark installed Fedora after that incident last night. It connected instantly and hasn’t dropped the connection. No threatening bitmaps necessary.

In other news, my girlfriend tells me that her computer starting running much better in the past week as well. She also happened to be shopping for new netbooks online last weekend.  Coincidence??

Written by Matthew Daniels

September 8, 2009 at 11:57 pm

Follow

Get every new post delivered to your Inbox.