Planet Larry

July 26, 2009

Ciaran McCreesh

Paludis 0.38.2 Released


Paludis 0.38.2 has been released:

  • Failures installing qt-core on Gentoo have been fixed.
Posted in paludis releases Tagged: paludis

July 26, 2009

Brian Carper

KDE 4.3 Looking Good

I just installed KDE 4.3 and it's looking good. Some features returned that I was missing. You can now once again display applications by name rather than description in the K-menu. You can now enable a nice kcontrol-like tree-view in the System Settings.

Some things are still missing though... like different wallpapers on different desktops. There are "Activities" which can have different wallpapers, but I can't for the life of me figure out how I'm supposed to be using them. I also lag and/or crash every time I Zoom Out in the cashew, possibly thanks to 3840x1200 screen resolution. I'm going to assume Activities are still a work-in-progress.

I was horrified to open Kopete and see that configuring the contact list window now uses the same completely broken configuration dialog that Amarok 2 uses for their playlist. Oh how I hope someone rethinks this.

There's a new Qt and Plasma theme in KDE 4.3 that looks pretty nice. Overall every release of KDE4 seems to become more stable, more polished, more eye-candy (if you want it).

July 26, 2009 :: Pennsylvania, USA  

Dion Moult

The Road to KDE Devland (Moult Edition) #0

Well then. I’ve been motivated by Hans Chen who originally decided to walk the path to a KDE developer and to do my own. For the technophobes, KDE is an actively developed desktop interface (for want of a better description) which is pushing ahead what the desktop is capable. It is also a community for everybody – the programmers, the artists, the PR folks and most importantly, the users.

Somebody once said that open-source will truly succeed when anybody and everybody will have the capability to create the environment around them completely as they see fit. I’m not denying that this’ll result in a lot of crappy environments (or not to my liking) but it basically says contribution shouldn’t be limited to those who mutter binary in their sleep.

I’m going to see if I am able to make this contribution. Let’s start by giving you the case study:

I do know PHP and do web-development. I have coded a black jack CLI game in C++ (well it was a start). I do graphics design and am proficient in The GIMP. I once touched Python but probably have forgotten a lot. I am a student and have no intention of going into programming as a career and have been self-taught. I have no deadlines, no clear goals nor any roadmap for this project, and am always juggling a variety of other projects on the side.

That, sounding quite like the commitment level proffered by most individuals seems like a vague and – well, truly realistic to be honest. I shall post my progress here with no fixed schedule and see how things go along :)

I’m thinking of starting by reading “Acclerated C++” – mainly because whoever thought up that title got the 100% keyword efficiency award for word estate. 2 buzzwords in 2 words. Eeeexceeelent.

No related posts.

July 26, 2009 :: Malaysia  

July 25, 2009

Clete Blackwell

Best Skins Ever

Best Skins Ever is a great company that provides thin “skins” for all kinds of electronic devices. From cameras to portable gaming devices to cell phones to laptops, Best Skins Ever covers them all.

After my old iPhone case broke and I purchased a brand new iPhone 3GS, I decided that I needed to replace the broken case. I paid $30 for that case at the Apple store and it lasted about 6 months. I was extremely disappointed with its quality. The rubber around the headphone jack was what finally broke, but the rubber around the bottom bezel of the phone was also wearing thin. Overall, it was a bad experience.

And then I ran into Best Skins Ever. I read reviews for their skins and saw not even one negative review of their skins. I read that their skins were reasonably priced, their durability was great, and their customer service was exceptional. I even heard that people who botched their install received free replacements.

These skins are unlike ordinary skins. They contain an adhesive that sticks to your phone permanently, but does not damage the phone when removed. Any attempt to move the skin once it has dried will stretch the skin. Aside from the application process, these skins are perfect.

So I decided to obtain two of them. They had many different options on their iPhone page (which I don’t describe here); and I chose the hardest one to apply (but also the best one once applied). The skins are $7.99 a piece. Much cheaper than $30 for that bulky case that I bought at the Apple store! So I bought two just in case I messed up the first one.

The install process requires that you soak the skin with soapy water, so that you can adjust it as you place it on your device and so that you do not get fingerprints on the sticky side of the skin. Once the skin dries onto the phone, it sticks firmly; all dust and bubbles are permanently trapped in there. I went through the install, not really knowing what to do. Amazingly, I was able to install it about 90% perfectly on my first try. It took me about 5 minutes to put the front screen protector on (it even covers the home button!) and about an hour to situate the back skin. The reason it takes so long is that it wraps around the bezel, around the top SIM slot, and around the bottom charge port.

I ended up with some small bubbles and a bit of blue fuzz stuck behind the back of the phone, but that is no big deal; especially when compared to having no protection at all and ending up with tons of scratches. The screen protector is not as smooth as the plastic screen protectors and it causes a little extra glare at some angles. But the protection that the back receives is amazing. My phone is now thinner than it ever was with a case and it is much more comfortable to hold. It’s great that I can now see the phone in an almost case-less state.

I highly recommend purchasing a BSE for any device that you want minimal protection!

Pictures (although not the best) are located below. As you can see, my install is not perfect. I have some small bubbles (those are not scratches) on the bottom bezel. Also, some of the outer wrappings overlap.

July 25, 2009

Dan Ballard

More work on the Git tutorial

Ok, hopefully this will be the last mention of this for a bit. I've gone back and completely rewritten and expanded greatly on my old Git tutorial. It's still at the same place, Mindstab's Git Guide, just with a new name. It still needs lots more work and expanding, which will eventually happen, but probably not right now. As it is it's now good enough to let stand on its own while I get back to cl-pack. It has everything you need to set up a repository and get it on a server in one of many configurations. It just doesn't have a lot on longer term development and multi team management of multiple repositories and branches. Haha, I also recast it as an Alice and Bob story.

July 25, 2009 :: British Columbia, Canada  

Nicolas Trangez

Importing a Git tree into a Subversion repository

Recently I worked on some new project, and as always I created a local Git repository as a start. After working on it several days, creating lots of commits, I had to publish it into the central Subversion repository (which is one of the VCSs we got). I could have done this by creating a new folder in SVN and add the latest version of all files of the project to it, but that way all history would be gone, which I didn’t like.

Git has a feature to work with SVN repositories, git-svn, but that’s intended to check out existing code from SVN and work on it, not publishing an existing Git tree into a Subversion repository.

A first rather naive approach didn’t work out (as somewhat expected), but then I figured out how to achieve this anyway.

As a test, let’s first create an empty SVN repository and a Git repository with some commits:

$ svnadmin create repo
$ svn co file:///Users/nicolas/Temp/git_to_svn/repo svn_repo
Checked out revision 0.
$ cd svn_repo
$ svn mkdir trunk tags branches
A         trunk
A         tags
A         branches
$ svn commit -m "Create repository structure"
Adding         branches
Adding         tags
Adding         trunk

Committed revision 1.
$ cd ..

$ mkdir project; cd project
$ git init
Initialized empty Git repository in /Users/nicolas/Temp/git_to_svn/project/.git/
$ echo "foo" > test.txt; git add test.txt; git commit -m "Initial version"
master (root-commit) 88464cf] Initial version
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 test.txt
$ echo "bar" > test.txt; git commit test.txt -m "Second version"
master cb62866] Second version
 1 files changed, 1 insertions(+), 1 deletions(-)

We now can set up git-svn:

$ git svn init -s file:///Users/nicolas/Temp/git_to_svn/repo/
$ git svn fetch
r1 = 741ab63aea786882eafd38dc74369e651f554c9c (trunk)

Depending on the layout of your SVN project, you might need to drop the -s parameter and add -t, -T or -b flags, see the git-svn manpage.

A little naive we could try to push everything to the SVN repository now:

$ git svn dcommit
Unable to determine upstream SVN information from HEAD history.
Perhaps the repository is empty. at /opt/local/libexec/git-core/git-svn line 439.

This fails since the git svn command can’t figure out which commits to push: there’s no link between our original Git repository and the Subversion heads.

To fix this, we can use a Git graft to link them. We’ll tell Git the commit which created the SVN folder in which we want to store the project is the parent commit of the first commit in our Git repository:

$ git show-ref trunk
741ab63aea786882eafd38dc74369e651f554c9c refs/remotes/trunk
$ git log --pretty=oneline master | tail -n1
88464cfdf549a82b30ee7c52e53e2b310f0d9ec4 Initial version
$ echo "88464cfdf549a82b30ee7c52e53e2b310f0d9ec4 741ab63aea786882eafd38dc74369e651f554c9c" >> .git/info/grafts

If now you execute git log, you’ll see the “Create repository structure” SVN commit is displayed after our “Initial version” commit.

Pushing to SVN now works fine:

$ git svn dcommit
Committing to file:///Users/nicolas/Temp/git_to_svn/repo/trunk ...
	A	test.txt
Committed r2
	A	test.txt
r2 = 8c72757dd3a7d550ed8ef393bb74c0350d22dbac (trunk)
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
test.txt: locally modified
	M	test.txt
Committed r3
	M	test.txt
r3 = ca0fc06d477bcd4dd5c6f6d2ae6d94356b510280 (trunk)
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk

All set :-)

July 25, 2009

July 24, 2009

Dion Moult

Tech tip #3: Rip audio from an .FLV file.

Well folks, here’s another quick tech tip that I use once in a while. How do you rip only the audio from an .FLV file? .FLV files, or Flash Video files are the format used in browser-embedded videos, common on video-sharing sites such as YouTube or Vimeo (and Eadrax!) For whatever reason if you have an .FLV file of your favourite music video, now you can get the music rocking solo.

mencoder a.flv -o a.mp3 -of rawaudio -oac mp3lame -lameopts cbr:br=192 -ovc copy

I’ll stay off tech tips for a while as the weekend is coming up.

Related posts:

  1. Tech tip #2: MPlayer play music recursively in a directory.
  2. Tech Tip: Speed up Firefox to use less CPU.

July 24, 2009 :: Malaysia  

Daniel Robbins

Ruby 1.9.1 and Diakonos

Tonight, I've gone ahead and done some work on dev-lang/ruby, and I've gotten ruby 1.9.1 into funtoo unstable. Along with the new ruby comes an updated eselect-ruby, and a transition from the "/usr/bin/ruby18" suffix to the "/usr/bin/ruby1.9" suffix (notice the dot.) It seems the dot is popular these days. And I also figured that python uses the dot, so why not ruby too? Seems worthwhile to be consistent.

I've also added the diakonos editor - written in ruby and dependent on ruby-1.9 - into the funtoo unstable tree. I also think it's worth mentioning that diakonos was first submitted to bugs.gentoo.org by Pistos, its author, on October 22, 2005. Three years, nine months and one day later, it's in funtoo. Better late than never.

July 24, 2009

July 22, 2009

Ciaran McCreesh

What’s Happened to EAPI 3?


EAPI 3 was effectively finished three months ago; some of you are no doubt wondering what happened to it and why there hasn’t been any news.

EAPI 3’s approval was conditional upon Portage support. This isn’t unreasonable, at least for main tree usage, although it’s arguably less relevant for overlays. Unfortunately, Portage is suffering from a severe lack of maintainers.

You can track Portage’s EAPI 3 implementation progress via Gentoo’s bugzilla. As you can see, some progress has been made, but it’s slow going, and hasn’t met the “we’ll be ready within a month” goal given at the Council meeting a month ago.

In the mean time, Paludis 0.38.0 has EAPI 3 support present but not enabled at install time (unlike Portage, we don’t hardcode EAPI numbers into the source, so supporting a feature doesn’t involve any kind of treatment for the EAPI that provides it). Anyone wishing to play with EAPI 3 support for personal use can just copy the EAPI 3 definition file from the source tree.

It’s a shame that Gentoo has to hold back on delivering a better user experience and making good ebuilds easier to write because of Portage. I’d like to encourage anyone who can handle Portage’s codebase to give Gentoo the help it so badly needs.

As for future EAPIs… The current Council has expressed an interest in handing off the EAPI approval process to a separate group. This is either good news if that group is going to put in the work necessary to get things done and deliver practical results, or terrible news if that group is going to perpetuate the worst habits of the previous Council.

Posted in eapi 3 Tagged: eapi 3, gentoo, pms

July 22, 2009

Dirk R. Gently

Portage Management and the propensity to being lazay – plus updates


Got an oppurtunity to build Gentoo again on my server and this led to me building a new portage management script. Since I was at it I decided to update my Gentoo Quick Install and Clamshell iBook guides. The portage management script can be found on the Gentoo Linux Tidbits page.

Enjoy!

July 22, 2009 :: WI, USA  

Dion Moult

Tech tip #2: MPlayer play music recursively in a directory.

I have always wondered how to do this. It’s quite often I have directories full of media files (specifically music) and subdirectories within them also with music files, and though the manual for MPlayer is thicker than the Chinese phonebook I have not been able to find any option for it.

I did however find a method which isn’t exactly the guru one-liner, but here it is anyway. It’s broken into two steps, the first to create a playlist:

find -maxdepth 1 -type f -name \*.\* > playlist

Then finally play the playlist:

mplayer -playlist playlist

Just add a -loop 0 suffix if you want to loop :)

Related posts:

  1. Tech tip #3: Rip audio from an .FLV file.
  2. Music Composition: Surprises
  3. Music Composition: The Spice of Life

July 22, 2009 :: Malaysia  

July 21, 2009

Bryan Østergaard

Planet.exgentoo.org is gone

or is it? Turns out the answer is "sort of".  [1]

We originally (we being me and Alexander Færøy aka ahf) set up Planet Exgentoo when all former Gentoo developers was forcibly removed from Planet Larry despite most of them clearly being Gentoo users. As we thought many people would be interested in hearing the opinions of former developers as well as current developers and other users (those that had never been developers) we set up our own planet to cover the missing piece of the puzzle.

I had several good discussions with the owner of Planet Larry and we agreed on most things. Still it took quite a while before the former developers was added back to Planet Larry due to Steve being busy with other things. But when it finally happened we considered the case solved and let the planetexgentoo.org domain expire as there was no more use for it by then.

Everybody seemed happy at this point but it turns out that at least one person seemingly wasn't quite happy yet and he decided to register the exgentoo.org domain as soon as it became available. I don't think he wants to use it for anything other than prevent us from having it which is fine by me. As I've already said there's currently no need for Planet Exgentoo and if such a need should arise again (I don't think it will) we'll just register planetexgentoo.org instead. No harm done in other words except maybe for a little money wasted by a Gentoo developer.

[1] The exgentoo.org domain currently redirects to gentoo.org or some webmail system.

July 21, 2009

Daniel de Oliveira

Smit Fast Paths


You can access SMIT tasks and sub-menus directly by using a fast path.

Example: smit mkuser takes you directly to the menu Add a User.
At any menu in SMIT, you can show the fast path to that menu by pressing the F8 key.
This table is pretty good to print them and keep it.

Source: http://archive.rootvg.net/smit.htm

Application/Task Fast Path
Software Installation and Maintenance
Install and Update Software
Install Software
Update Installed Software to Latest Level (Update All)
Install Software Bundle
Update Software by Fix (APAR)
Install and Update from ALL Available Software
List Software and Related Information
List Installed Software and Related Information
List Installed Software
List Applied but Not Committed Software Updates
Show Software Installation History
Show Fix (APAR) Installation Status
List Fileset Requisites
List Fileset Dependents
List Files Included in a Fileset
List Fileset Containing File
Show Installed License Agreements
List Software on Media and Related Information
List Filesets in a Bundle
List Software on Installation Media
List Software Fixes (APARs) on Installation Media
List Supplemental Fileset Information on Installation Media
Show License Agreements on Installation Media
Software Maintenance and Utilities
Commit Applied Software Updates (Remove Saved Files)
Reject Applied Software Updates (Use Previous Version)
Remove Installed Software
Copy Software to Hard Disk for Future Installation
Check Software File Sizes After Installation
Verify Software Installation and Requisites
Network Installation Management
Configure Network Installation Management Client Fileset
Install and Update Software
List Software on Media and Related Information
List Filesets in a Bundle
List Software on Installation Media
List Software Fixes (APARs) on Installation Media
Manage Network Install Permissions
Manage Network Install Resource Allocation
System Backup Manager
Back Up the System
Back Up This System to Tape/File
Create a Generic Backup CD
List Files in a System Image
Restore Files in a System Image
install
install_update
install_latest
update_all
install_bundle
update_by_fix
install_all
list_software
list_installed
list_installed_sw
list_applied_sw
show_history
show_apar_stat
list_requisites
list_dependents
list_files
what_fileset
installed_license
list_media
list_bundle
list_media_sw
list_media_fixes
list_media_info
license_on_media
maintain_software
commit
reject
remove
bffcreate
check_files
verify_install
nim_client
niminit
nim_client_inst
nim_client_list
nim_c_list_bundle
nim_c_list_sw
nim_c_list_fixes
nim_perms
nim_c_mac_res
backsys
sysbackup
mksysb
mkcdgeneric
lsmksysb
restmksysb
Software License Management
Manage Nodelocked Licenses
Add Nodelocked License from a File
Add Nodelocked License from the Keyboard
Delete a Nodelocked License
Manage License Servers and License Databases
Show Server Characteristics
Manage Concurrent Use and Use Once Licenses
Manage Vendor Information in License Databases
Show License Usage on Servers
Show License Usage Summary
Show Licenses Currently Being Used
Show License Information by Server
Show Licenses Held by a Specific User
Show License Agreements
Show Installed License Agreements
Show License Agreements on Installation Media
licenses
manage_nodelocked
add_nodelocked_from_file
add_nodelocked_from_keyboard
delete_nodelocked
manage_servers
show_server_characteristics
manage_prod_licenses
manage_vendors
show_server_status
show_total_license_usage
show_current_license_usage
show_installed_licenses
show_user_license_held
show_license_agree
installed_license
license_on_media
Devices
Install/Configure Devices Added After IPL
Printer/Plotter
TTY
PTY
Console
Fixed Disk
CD ROM Drive
Read/Write Optical Drive
Diskette Drive
Tape Drive
Communication
Graphic Displays
Graphic Input Devices
Low Function Terminal (LFT)
SCSI Initiator Device
SCSI Adapter
Asynchronous I/O
Multimedia
List Devices
Configure/Unconfigure Devices
Unconfigure a Device
Configure a Defined Device
Install Additional Device Software
PCI Hot Plug Manager
Unconfigure a Device
Configure a Defined Device
Install/Configure Devices Added After IPL
ISA Adapters
dev
cfgmgr
printer
tty
pty
console
disk
cdrom
rwopt
diskette
tape
commodev
g_display
input
lft
scsiid
scsia
aio
mm
lsattr
devcfg
devcfg_ucfg
devcfg_cfg
devinst
devdrpci
rmdev
mkdev
cfgmgr
devisa
System Storage Management (Physical & Logical Storage)
Logical Volume Manager
Volume Groups
List All Volume Groups
Add a Volume Groups
Set Characteristics of a Volume Group
List Contents of a Volume Group
Remove a Volume Group
Activate a Volume Group
Deactivate a Volume Group
Import a Volume Group
Export a Volume Group
Mirror a Volume Group
Unmirror a Volume Group
Synchronize LVM Mirrors
Back Up a Volume Group
Remake a Volume Group
List Files in a Volume Group Backup
Restore Files in a Volume Group Backup
Logical Volumes
List All Logical Volumes by Volume Group
Add a Logical Volume
Set Characteristics of a Logical Volume
Show Characteristics of a Logical Volume
Remove a Logical Volume
Copy a Logical Volume
Physical Volumes
Add a Disk
Change Characteristics of a Physical Volume
List Contents of a Physical Volume
Move Contents of a Physical Volume
Paging Space
Add Another Paging Space
Change/Show Characteristics of a Paging Space
Remove a Paging Space
Activate a Paging Space
Deactivate a Paging Space
File Systems
List All File Systems
List All Mounted File Systems
Add/Change/Show/Delete File Systems
Mount a File System
Mount a Group of File Systems
Unmount a File System
Unmount a Group of File Systems
Verify a File System
Backup a File System
Restore a File System
List Contents of a Backup
Files & Directories
Backup a File or Directory
Restore a File or Directory
List Contents of a Backup
Removable Disk Management
List All Mounted File Systems on a Disk
Unmount File Systems on a Disk
Remove a Disk from the Operating System
Remove a Disk
Open Door
System Backup Manager
Back Up the System
List Files in a System Image
Restore Files in a System Image
storage
lvm
vg
lsvg2
mkvg
vgsc
lsvg1
reducevg2
varyonvg
varyoffvg
importvg
exportvg
mirrorvg
unmirrorvg
syncvg
vgbackup
restvg
lsbackvg
restsavevg
lv
lsvg
mklv
lvsc
lslv
rmlv
cplv
pv
makdsk
chpv
lspv
migratepv
pgsp
mkps
chps
rmps
swapon
swapoff
fs
lsfs
mount
manfs
mountfs
mountg
umountfs
umountg
fsck
backfilesys
restfilesys
listtoc
filemgr
backfile
restfile
listtoc
rds
lsmntdsk
umntdsk
removedsk
rmvdsk1
open_door
backsys
sysbackup
lsmksysb
restmksysb
Security and Users
Users
Add a User
Change a User’s Password
Change/Show Characteristics of a User
Lock/Unlock a User’s Account
Reset User’s Failed Login Count
Remove a User
List All Users
Groups
List All Groups
Add a Group
Change/Show Characteristics of a Group
Remove a Group
Passwords
Change a User’s Password
Change/Show Password Attributes for a User
Login Controls
Change/Show Login Attributes for a User
Change/Show Login Attributes for a Port
Roles
Add a Role
Change/Show Characteristics of a Role
Remove a Role
List All Roles
security
users
mkuser
passwd
chuser
lockuser
failed_logins
rmuser
lsuser
groups
lsgroup
mkgroup
chgroup
rmgroup
passwords
passwd
passwdattrs
logins
login_user
login_port
roles
mkrole
chrole
rmrole
lsrole
Communications Applications and Services
TCP/IP
Minimum Configuration & Startup
Further Configuration
Hostname
Static Routes
Network Interfaces
Name Resolution
Client Network Services
Server Network Services
Manage Print Server
Select BSD style rc Configuration
Authentication Configuration
Use DHCP for TCPIP Configuration & Startup
IPV6 Configuration
IPV6 Static Routes
IPV6 Network Interfaces
IPV6 Daemon/Process Configuration
Quality of Service Configuration & Startup
Start Using the QoS Subsystem
Stop Using the QoS Subsystem
NFS
Configure TCP/IP (If Not Already Configured)
Network File System (NFS)
Configure NFS on This System
Add a Directory to Exports List
Change/Show Attributes of an Exported Directory
Remove a Directory from Exports List
Add a File System for Mounting
Change/Show Attributes of an NFS File System
Remove Remove an NFS File System
commo
tcpip
mktcpip
configtcp
hostname
route
netinterface
namerslv
clientnet
ruser
server
setbootup_option
auth_config
usedhcp
configtcp6
route6
inet6
daemon6
configqos
startqos
stopqos
nfs_menus
tcpip
nfs
nfsconfigure
mknfsexp
chnfsexp
rmnfsexp
mknfsmnt
chnfsmnt
rmnfsmnt
Print Spooling
Start a Print Job
Manage Print Jobs
Cancel a Print Job
Show the Status of Print Jobs
Prioritize a Print Job
Hold/Release a Print Job
Move a Job Between Print Queues
Manage Print Queues
Show Status of Print Queues
Stop a Print Queue
Start a Print Queue
Set the System’s Default Print Queue
Add a Print Queue
Add an Additional Printer to an Existing Print Queue
Change/Show Print Queue Characteristics
Remove a Print Queue
Manage Print Server
Programming Tools
spooler
qprt
jobs
qcan
qchk
qpri
qhld
qmove
pqmanage
qstatus
qstop
qstart
qdefault
mkpq
mkqprt
chpq
rmpq
server
pqtools
Problem Determination
Error Log
Generate Error Report
Change/Show Characteristics of the Error Log
Clean the Error Log
System Dump
Change the Primary Dump Device
Change the Secondary Dump Device
Change the Directory to which Dump is Copied on Boot
Copy a System Dump from a Dump Device to a File
Copy a System Dump from a Dump Device to Diskette
Always Allow System Dump
System Dump Compression
Check Dump Resources Utility
Alog
Show an Alog file
Change/Show Characteristics of an Alog File
Hardware Diagnostics
Verify Software Installation and Requisites
problem
error
errpt
errdemon
errclear
dump
dumpchgp
dumpchgs
dumpchgd
dump_copy_file
dump_copy_dskt
dump_allow
dump_comprs
dump_checkr
alog
alog_show
alog_change
diag
verify_install
Performance and Resource Scheduling
Resource Status & Monitors
Analysis Tools
Resource Controls
Remove a Process
Set Initial Priority of a Process
Change Initial Priority of a Process
Set System Run Level
Schedule Jobs
Power Management
Configure/Unconfigure Power Management
System State Transition from Enable State
Display Power Management
Battery
Workload Management
Work on alternate configurations
Copy a configuration
Create a configuration
Select a configuration
Enter configuration description
Remove a configuration
Work on a set of Subclasses
Add a class
Change/Show Characteristics of a class
General characteristics of a class
CPU resource management
Memory resource management
diskIO resource management
Remove a class
Class assignment rules
Create a new Rule
Change/Show Characteristics of a Rule
Start/Stop/Update WLM
Start Workload Management
Update Workload Management
Stop Workload Management
Assign/Unassign processes to a class/subclass
performance
monitors
analysis
controls
kill
nice
renice
telinit
at
pm
pmConfig
pmState
pmDisplaySelect
pmBattery
wlm
wlmconfig
wlmconfig_copy
wlmconfig_create
wlmconfig_select
wlmconfig_enter
wlmconfig_delete
wlmsubclass
wlmaddclass
wlmchclass
wlmclass_gal
wlmclass_cpu
wlmclass_mem
wlmclass_bio
wlmrmclass
wlmrs
crewlmrs
chgwlmrs
wlmmanage
wlmstart
wlmupdate
wlmoff
wlmassign
System Environments
Stop the System
Assign the Console
Change/Show Date and Time
Change/Show Date & Time
Change Time Zone Using System Defined Values
Change Time Zone Using User Inputted Values
Manage Language Environment
Change/Show Primary Language Environment
Add Additional Language Environments
Remove Language Environments
Change/Show Language Hierarchy
Set User Languages
Change/Show Applications for a Language
Convert System Messages and Flat Files
Change/Show Characteristics of Operating System
Change/Show Number of Licensed Users
Manage AIX Floating User Licenses for this Server
Broadcast Message to all Users
Manage System Logs
Change/Show Characteristics of System Dump
Internet and Documentation Services
Change/Show Default Browser
Change Documentation and Search Server
Change/Show Default Documentation Language
Web-based System Manager
Change System User Interface
Change/Show Default Documentation Language
Manage Remote Reboot Facility
Manage System Hang Detection
system
shutdown
chcons
chtz_date
date
chtz
chtz_user
mlang
chlang
mle_add_lang
mle_rm_lang_hdr
mle_hier_cmd_hdr
chlang_user
mle_chapp_menu
nu_iconv
chgsys
chlicense
netls_server
wall
logs
dump
web_configure
change_default_browser
change_doc_search_server
chdoclang
web_based_system_manager
dt_config
chdoclang
rrbtty
shd
Processes and Subsystems
Processes
Remove a Process
Bind a Process to a Processor
Unbind a Process
Subsystems
Query a Subsystem
Start a Subsystem
Stop a Subsystem
Stop a Single Subsystem
Stop All Subsystems
Refresh a Subsystem
Trace Subsystem
Start Trace
Stop Trace
Subservers
Query a Subserver
Start a Subserver
Stop a Subserver
Trace Subserver
Start Trace
Stop Trace
src
process
kill
bindproc
unbindproc
subsys
qssys
startssys
stopssys
stopassys
stopallssys
refresh
tracessys
tracessyson
tracessysoff
subserver
qserver
startserver
stopserver
traceserver
startserver.trace
stopserver.trace

July 21, 2009 :: São Paulo, Brazil  

July 20, 2009

Andreas Aronsson

Pop goes the drive...

For about a year now I have had a very annoying problem with my file server. One of the two Seagate drives simply disappeared from time to time. It was never the same one and I couldn't tell what pattern the disappearances followed. The system log looked something like:

Jul 11 18:55:02 hostname ata5.00: exception Emask 0x10 SAct 0x1 SErr 0x190002 action 0xe frozen
Jul 11 18:55:02 hostname ata5.00: edma_err_cause=00000020 pp_flags=00000003, SError=00180000
Jul 11 18:55:02 hostname ata5: SError: { RecovComm PHYRdyChg 10B8B Dispar }
Jul 11 18:55:02 hostname ata5.00: cmd 61/80:00:a9:47:55/00:00:1b:00:00/40 tag 0 ncq 65536 out
Jul 11 18:55:02 hostname res 40/00:00:a9:47:55/00:00:1b:00:00/40 Emask 0x10 (ATA bus error

At first I assumed that it was due to a faulty SATA controller on my motherboard. I found a PCI-e card that I could fit into my motherboard. It seemed to work just fine for a while, apart from the hassle with motherboard not being able to boot directly from it and being forced to use a noisy old IDE drive for storing grub and kernel to boot from.
After a month or so, one of the hard drives popped out again. Dang. This time I started trying to diagnose my Seagate discs. They have excellent diagnostic tools that runs under linux on their website. I even sent two of them back to seagate and got them refurbished.
After a couple of months or so again it was time to resync the RAID due to discs popping out. Man, I was frustrated with this by now. Since the only things left was cabling and PSU by now and I found this. I decided to go for a new PSU, I ripped out the old FSP and put in a new Corsair. Corsair really has become my favourite ones over time.
According to the info I found this problem should reappear during load. Since I've done a resync of the raid, have a couple of full backup jobs run and a bunch of my pictures uploaded to it, it really seems rock stable now =).

July 20, 2009 :: Sweden

Nicolas Trangez

Microsoft to release Linux HyperV drivers as GPLv2

Looks like Microsoft releases the Linux drivers to enable a Linux kernel running as a guest in a Hyper-V hypervisor to run in ‘enlightened mode’, which sounds pretty much like Xen’s PV drivers for Windows, providing better IO performance, under the GPLv2 (which is the same open-source license as the Linux kernel itself). Quoting the Hyper-V Architecture and Feature Overview:

Enlightened I/O is a specialized virtualization-aware implementation of high level communication protocols (such as SCSI) that utilize the VMBus directly, bypassing any device emulation layer. This makes the communication more efficient but requires an enlightened guest that is hypervisor and VMBus aware.

The drivers seem to be developed by Novell, so I guess the Boycott Novell guys will have some more coverage^Wrants soon :-P (Update: can’t find the reference on this anymore, so this might be a false statement, sorry. Thanks for pointing out RubenV)

Interesting times on the virtualization front… Although I for one do not plan to replace Xen, xVM or VirtualBox anytime soon.

Sources:

On a side note: Red Hat entered the Standard & Poor’s 500 index, which might show Linux is gaining more interest from enterprises and investors.

July 20, 2009

Kyle Brantley

Google Chrome, and Things We Probably Should Not Do In A Browser

While I am no huge fan of Google Chrome, at least one aspect of it has seriously impressed me - the JavaScript engine.

Over the summer, to help with the prevention of boredom, a friend and I sat down and decided to make a game. This game lives in the browser. He's writing the client (browser) side code, I'm writing the server side code.

And, like geeky college students, we are doing things that Probably Should Not Be Done In A Browser - 1024-bit RSA encryption (to the server) and signature verification (from the server). Used sparingly, this isn't a real issue... until you send status update requests to the server every second and a half, at which point it proves to be problematic. I'd imagine that this is at least partially because JavaScript has no native BigInteger implementation, which means that for a browser, you have to make one yourself... in JavaScript.

I've compared a few browsers side by side on my own machine with SunSpider, the javascript benchmarking suite. Firefox 3.5 with the JIT compiler enabled matches the Chrome engine in a lot of tests, beats it in others. Chrome, the same. It is generally a pretty equal test, with Chrome in general being a fair bit faster, but never to the point of me seeing it as a massive generational speed increase.

A bit of information:

  • We're using the pure JavaScript RSA and BigInteger library from ohdave.com/rsa. I make no claims to the speed of efficiency, and I have no real benchmarks of just this library, either. We searched "rsa javascript" and went with the first link we found on Google. We have not investigated optimizing this, though we probably should.
  • The actual requests and responses are pretty small - no more than 300 bytes after the initial data loading.
  • These requests occur every 1.5 seconds, but we'll likely increase that down the road.
  • The testing was done in a VM running a 64-bit copy Windows Vista. The VM host is an Intel i7 920 running qemu-kvm (or, it is a really fast VM, thanks to CPU virtualization extensions.).
  • Browsers: Firefox 3.5.1 with the JIT compiler enabled; Google Chrome 2.0.172.37; Safari 4.0.2; all under Windows Vista - all being the latest version available. (I wish I could have tested Opera too, but it has a very very strange bug involving the RSA.)
  • I'm going to say "99% CPU," "10% CPU," and so on. Task Manager splits the load percentage over every core on the machine, and the i7 has 8 that it detects. However, as stated, this was done in a VM, which I allocated a single CPU to. "99% CPU" is going to mean "hey this app just froze on me and took most of the OS with it."

As I said, we noticed... responsiveness issues. I went to investigate, when I realized that my copy of Firefox that wasn't within the VM was doing the same thing...

  • Firefox jumps from 99% CPU 'down' to 65% CPU as reported by Vista's task manager. On occasion it hit 0, but only for very brief periods of time. The RAM usage was also fun to watch: over a period of many requests, it would mostly remain stable - only to jump by 80MB or more for several seconds, and then back down. This resulted in every three out of four keystrokes being lost, on average, never mind the huge memory churn.
  • Safari sat there and looked at us funny.

  • Chrome shocked my friend and I. Sure, we had heard that it was fast, and I had done a bit of reading on it. However, I was quite surprised when I saw that it was using a maximum of 10% CPU and roughly 18MB of RAM without any spikes in either. Wow.

Talk about optimization.

While Chrome may not have another user (I quite enjoy Firefox, and having tabs on top of the URL bar really bugs me), at a bare minimum it has seriously impressed me.

July 20, 2009 :: Utah, USA  

July 19, 2009

Sean Potter

Spring Cleaning (No, really)

I've got a bunch of stuff that I need to get rid of, both because it's taking up precious space, and because I'd rather have the cash right now. I've got the stuff listed on a few forums, but it's a tough crowd. I figured some friends or Linux folk might be interested in some of the hardware.

Everything's Linux compatible, and I'm not looking for much for any these items ($100-200 a pop). If you have any interest, leave a comment below with a valid e-mail address. And don't worry, I'm the only one who can see the addresses.

July 19, 2009

July 18, 2009

Sean Potter

Plasma's CPU Usage

Honestly, KDE 4 is the best desktop I've used to date. It's still rough around a few edges, but perfectly usable. I've said all this before. Not much bothers me about the roughness except a few issues in Plasma that make it a pain at times.

After KDE has been running for a few days, Plasma will randomly go up to 100% CPU usage on one of my cores. Well, I have three other CPU cores to use, but while at 100% Plasma is unusable. Slightly annoying, no? I'm not sure what the issue is. A Google search reveals that other people are having similar issues, but there aren't many fixes if any.

I'm currently using 4.2.2, which isn't the newest in Gentoo's repository, but I don't see the necessity to upgrade to 4.2.4 when the 4.3 release is just around the corner by the end of this month. I'm hoping that fixes this issue.

Although I'm no KDE developer, I wonder whether Plasma is threaded or not? Might make a difference in this case...

July 18, 2009

Dirk R. Gently

Backup Configurations with tar Helpers


When I want to do a reinstall, I backup my configurations and home folder and install from scratch. I do a bit of tinkering on my system but I know what I’m doing so I could do a full backup but have discovered that doing a clean reinstall is sometimes necesary. Here’s how I backup my configurations with a couple tar-helpers.

Basic tar Command

I’ve tried a good number of GUI programs to do this (you can read about them here), but really didn’t find one to my liking. There is Kbackup which I like alot but Kbackup doesn’t compress the full archive so I went back to tar and created a couple helper scripts. The basic tar command to backup is:

tar -cvpzf <backup-name>.tgz /folder/file /aplain/folder

But this is kind of a pain to add files to. For me it involves su’ing to root and adding the file manually everytime I think of a file that needs added.

Exclude File

Backing up a large ‘/aplain/folder’ is easy enough to add but what if there are a few files/folders you don’t want in it? This is where adding an exclude file to tar becomes handy. An exclude file just contains the names of the files/folders seperated by a line. For example:

# Trashes not necessary
/home/*/.local/share/Trash/files
/home/*/.Trash

And yes it can be commented and use wildcards. To add this to the tar line it will be:

tar –exclude-from=/<location-of>/exclude.txt -cvpzf \
<backup-name>tgz /folder/file /aplain/folder

Adding File/Folders the Easy Way

Like I said you can manually add files/folders or you can use these couple helper scripts I created that make this alot easier. You can put the tar command in a script and put in command newline breaks (backslash key [\]):

#!/bin/bash

tar –exclude-from=/<location-of>/exclude.txt -cvpzf \
<backup-name>.tgz \
/folder/file \
/aplain/folder \

Then with this script add a file/folder to it quickly from the command line:

#!/bin/bash
# bca (backup-cfg-add) – add file/folders to the backup-cfg tar script

LASTLINE=`tail -n 1 /root/.bin/Backup/backup-cfg`

# Delete last line if empty
if [ "$LASTLINE" == "" ]; then
sed -i ‘/^*$/d’ /root/.bin/Backup/backup-cfg
fi

echo “`readlink -f $@` \\” >> /root/.bin/Backup/backup-cfg

Then type:

bca /etc/fstab # or
cd /etc
bca fstab

And they will be added to the backup-cfg script.

This can also be done for excludes:

#!/bin/bash
# bea (backup-exclude-add) – add files to be exclude in backup

# Links will resolve full path
# Last line with space(s) in it will not be deleted

LASTLINE=`tail -n 1 /root/.bin/Backup/backup-cfg`

echo "`readlink -f $@`" >> /root/.bin/Backup/exclude.txt

Notes are a good idea to keep too:

#!/bin/bash
# bcn (backup-cfg-notes) add notes to file in backup directory
# Author: Gen2ly

# Label computer, distro, type and date
PC=$HOSTNAME
DISTRO=gentoo
TYPE=configs
DATE=`date "+%F"`

# Where to backup
TARGET="/root/Backup"
NOTENAME="backup-notes.txt"

# Append note
echo "$PC-$DISTRO-$TYPE-$DATE - "$@"" >> $TARGET/$NOTENAME

The Backup Script

This is the complete (!files) backup script I use to backup my configs:

#!/bin/bash
# backup-cfg – backup configurations with tar
# Author: Gen2ly

# Label computer, distro, type and date
PC=$HOSTNAME
DISTRO=gentoo
TYPE=configs
DATE=`date "+%F"`

# Where to backup
TARGET="/root/Backup"

# Do not include these (put in an exclude file)
EXCLUDE_FILE="/root/.bin/Backup/exclude.txt"

# Verify that the target directory exists.
if [ ! -d $TARGET ]; then
  echo " Check: Backup directory does not exist, exiting."  
  exit 2; else
  echo " Check: Backup directory exists."
fi

# Backup
tar –exclude-from=$EXCLUDE_FILE \
exclude=$TARGET/$PC-* -cvpzf $TARGET/$PC-$DISTRO-$TYPE-$DATE.tar.gz \

o/

July 18, 2009 :: WI, USA  

July 17, 2009

Sean Potter

Job and Vacation

Soooo, I lost my job back on May 20th. It's been nearly two months, and I really haven't been able to find a new one just yet. I've focused most of my time applying for restaurant management positions, and I did get a ton of interviews. I also didn't get a single job offer. Don't get me wrong, I know a great deal about running restaurants and bars. Might only be so young, but the experience and knowledge is solid. Call my references and they'll say the same thing.

The downside of getting a management position at this point of the year would mean canceling my vacation with three of my friends at the end of August. Most restaurants require you work there six months to a year before you get a week's vacation. So after the last few rejections I received, I decided that I'd go on my merry way and find an easy serving or bartending job that would hold me over until vacation was done and over with.

I'm alright on the money situation because I have a ton of crap I've been selling on eBay, and my dad said he'd take care of the student loan bills until I'm back on my feet. I'm not deliberately trying to stay off my feet, but we've had this vacation booked since February. It'd be a shame to ruin it now.

In the meantime, I'm having some business cards printed at VistaPrint. I'm going to pass these business cards out amongst friends, family, and bars I frequent. The cards are advertising cheap computer repairs and upgrades. While it won't be great business, I figure it's something to help pay the bills until I do find a suitable job.

July 17, 2009

George Kargiotakis

Trying to achieve a more stable hybrid (broadcom-wl) kernel module for broadcom 4328

On my Macbook (4,1) I am currently using Debian with kernel 2.6.30-1-686-bigmem. This Macbook has Broadcom 4328 wireless chipset installed (02:00.0 Network controller: Broadcom Corporation BCM4328 802.11a/b/g/n (rev 03)) and unfortunately the necessary kernel module provided by Broadcom is pretty unstable. Or very unstable. Oh well…it’s totally unstable.

I had random freezes, usually when I first booted and tried to modprobe the module. After some searching around the net and a lot of experiments I’ve managed to create a kernel module that looks quite stable. At least I stopped getting any more lockups and freezes…To reproduce the module with the patches I’ve used follow the directions bellow step by step.

Create necessary dirs:
mybox:~# mkdir hybrid_wl
mybox:~# cd hybrid_wl

Download drivers package from Broadcom:
802.11 Linux STA 32-bit Driver
mybox:~/hybrid_wl# wget http://www.broadcom.com/docs/linux_sta/hybrid-portsrc-x86_32-v5_10_91_9.tar.gz

Download a few more patches from Archlinux and Gentoo:
hidden-essid patch
2.6.30 patch 1
2.6.30 patch 2
hybrid-portsrc-x86_32-v5_10_91_9-convert_to_net_device_ops.diff
mybox:~/hybrid_wl# wget http://aur.archlinux.org/packages/broadcom-wl/broadcom-wl/hidden-essid.patch
mybox:~/hybrid_wl# wget http://aur.archlinux.org/packages/broadcom-wl/broadcom-wl/broadcom-sta-5.10.91.9-linux-2.6.30.patch
mybox:~/hybrid_wl# wget http://aur.archlinux.org/packages/broadcom-wl/broadcom-wl/broadcom-sta-5.10.91.9-linux-2.6.30-2.patch
mybox:~/hybrid_wl# wget -O hybrid-portsrc-x86_32-v5_10_91_9-convert_to_net_device_ops.diff http://bugs.gentoo.org/attachment.cgi?id=195182

Extract package:
mybox:~/hybrid_wl# tar -xzf /path/to/hybrid-portsrc-x86_32-v5_10_91_9.tar.gz

Start Patching:
mybox:~/hybrid_wl# sed -i hidden-essid.patch -e 's|5.10.79.10|src/wl/sys|g'
mybox:~/hybrid_wl# patch -p0 < hidden-essid.patch
patching file src/wl/sys/wl_iw.c
mybox:~/hybrid_wl# sed -i broadcom-sta-5.10.91.9-linux-2.6.30.patch -e 's|hybrid-portsrc-x86_32-v5_10_91_9.orig/||g'
mybox:~/hybrid_wl# sed -i broadcom-sta-5.10.91.9-linux-2.6.30.patch -e 's|hybrid-portsrc-x86_32-v5_10_91_9/||g'
mybox:~/hybrid_wl# patch -p0
patching file src/wl/sys/wl_iw.c
Hunk #1 succeeded at 611 (offset 1 line).
Hunk #2 succeeded at 640 (offset 1 line).
Hunk #3 succeeded at 1119 (offset 1 line).
Hunk #4 succeeded at 1147 (offset 1 line).
Hunk #5 succeeded at 1807 (offset 1 line).
Hunk #6 succeeded at 1942 (offset 1 line).
patching file src/wl/sys/wl_linux.c
patching file src/wl/sys/wl_linux.h
mybox:~/hybrid_wl# patch -p0
patching file src/wl/sys/wl_linux.c
mybox:~/hybrid_wl# sed -i hybrid-portsrc-x86_32-v5_10_91_9-convert_to_net_device_ops.diff -e 's|a/src/|src/|g'
mybox:~/hybrid_wl# sed -i hybrid-portsrc-x86_32-v5_10_91_9-convert_to_net_device_ops.diff -e 's|b/src/|src/|g'
mybox:~/hybrid_wl# patch -p0
patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 225 (offset 6 lines).
patching file src/wl/sys/wl_iw.c

Compile the kernel module:
mybox:~/hybrid_wl# make -C /lib/modules/2.6.30-1-686-bigmem/build M=`pwd` clean
make: Entering directory `/usr/src/linux-headers-2.6.30-1-686-bigmem'
make: Leaving directory `/usr/src/linux-headers-2.6.30-1-686-bigmem'
mybox:~/hybrid_wl# make -C /lib/modules/2.6.30-1-686-bigmem/build M=`pwd`
make: Entering directory `/usr/src/linux-headers-2.6.30-1-686-bigmem'
LD /root/hybrid_wl/built-in.o
CC [M] /root/hybrid_wl/src/wl/sys/wl_linux.o
CC [M] /root/hybrid_wl/src/wl/sys/wl_iw.o
CC [M] /root/hybrid_wl/src/shared/linux_osl.o
LD [M] /root/hybrid_wl/wl.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: modpost: missing MODULE_LICENSE() in /root/hybrid_wl/wl.o
see include/linux/module.h for more information
CC /root/hybrid_wl/wl.mod.o
LD [M] /root/hybrid_wl/wl.ko
make: Leaving directory `/usr/src/linux-headers-2.6.30-1-686-bigmem'

Install the new module:
mybox:~/hybrid_wl# cp wl.ko /lib/modules/2.6.30-1-686-bigmem/kernel/drivers/net/wireless/
mybox:~/hybrid_wl# depmod
mybox:~/hybrid_wl# modprobe wl

Check if everything loads correctly:
mybox:~/hybrid_wl# dmesg |tail
[ 66.229797] lib80211: common routines for IEEE802.11 drivers
[ 66.229805] lib80211_crypt: registered algorithm 'NULL'
[ 66.301793] wl: module license 'unspecified' taints kernel.
[ 66.301802] Disabling lock debugging due to kernel taint
[ 66.305919] wl 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 66.305933] wl 0000:02:00.0: setting latency timer to 64
[ 66.406146] lib80211_crypt: registered algorithm 'TKIP'
[ 66.408646] eth1: Broadcom BCM4328 802.11 Wireless Controller 5.10.91.9
[ 76.524135] eth1: no IPv6 routers present

You can also chek the iwconfig output. Hopefully everything will be fine…
I hope this saves a few hours of searching and experimenting for some people…

References:
1) 802.11 Linux STA driver
2) AUR broadcom-wl 5.10.91.9-2
3) Gentoo Bug: 284450 (New ebuild: net/wireless/broadcom-sta)

July 17, 2009 :: Greece  

July 16, 2009

Dan Ballard

Nicolas Trangez

Re: Python recursion performance test

(This is a reply on a post by Ahmed Soliman on recursion performance in (C)Python, and CPython function call overhead in general. I started to write this as a comment on his post, but it turned out much longer, so sending it over here in the end.)

Hey,

As discussed before, this is not a fair comparison, since the non-recursive version is much ’smarter’ than the recursive one: it calculates values and will never recalculates them, whilst the recursive version calculates everything over and over again.

Adding some simple memoization helps a lot. First, my testing code:

Here are the benchmarks on my MacBook Pro Intel Core2Duo 2.33GHz with 3GB RAM (running quite a lot of applications). Do note the ‘dumb’ version calculates fib(35), whilst the slightly optimized versions, which still use recursion but much less recursive calls (as they should) or your second version calculate fib(150).

Using MacOS X 10.5.6 stock CPython 2.5.1:

MacBook:Projects nicolas $ python -V
Python 2.5.1

MacBook:Projects nicolas $ python fib.py 35 150
fib(35) = 9227465
Calculation took 12.8542108536 seconds

Calculating the amount of recursive calls to calculate fib(35)
Calculating fib(35) = 9227465 took 29860703 calls

fib2(150) = 9969216677189303386214405760200
Calculation took 0.00020694732666 seconds

memoize_dict(fib)(150) = 9969216677189303386214405760200
Calculation took 0.00141310691833 seconds

memoize_constant_list(151, fib)(150) = 9969216677189303386214405760200
Calculation took 0.000310182571411 seconds

Overall it looks like fib2 and memoize_constant_list perform fairly similar, I guess function call overhead and list.append have a similar influence on performance in this case.

Using Jython 2.5.0 from the binary distribution on the Java HotSpot 64bit Server VM as shipped for OS X 10.5.6:

MacBook:Projects nicolas $ ./Jython/jython2.5.0/jython -V
Jython 2.5.0

MacBook:Projects nicolas $ ./Jython/jython2.5.0/jython fib.py 35 150
fib(35) = 9227465
Calculation took 12.5539999008 seconds

Calculating the amount of recursive calls to calculate fib(35)
Calculating fib(35) = 9227465 took 29860703 calls

fib2(150) = 9969216677189303386214405760200
Calculation took 0.0519998073578 seconds

memoize_dict(fib)(150) = 9969216677189303386214405760200
Calculation took 0.00399994850159 seconds

memoize_constant_list(151, fib)(150) = 9969216677189303386214405760200
Calculation took 0.00300002098083 seconds

The ‘dumb’ fib implementation performs similar in both CPython and Jython. Jython performs significantly less good on the other implementations though, but maybe todays news could help here, not sure how much locking on dict and list access Jython introduces.

Finally, using Unladen Swallow 2009Q2, self-compiled from SVN on the same system, using standard settings:

MacBook:Projects nicolas $ ./unladen-swallow/unladen-2009Q2-inst/bin/python -V
Python 2.6.1

MacBook:Projects nicolas $ ./unladen-swallow/unladen-2009Q2-inst/bin/python fib.py 35 150
fib(35) = 9227465
Calculation took 12.2675719261 seconds

Calculating the amount of recursive calls to calculate fib(35)
Calculating fib(35) = 9227465 took 29860703 calls

fib2(150) = 9969216677189303386214405760200
Calculation took 0.000118970870972 seconds

memoize_dict(fib)(150) = 9969216677189303386214405760200
Calculation took 0.000972986221313 seconds

memoize_constant_list(151, fib)(150) = 9969216677189303386214405760200
Calculation took 0.00036096572876 seconds

which is similar to, slighly better or slightly worse than the CPython run, and when enforcing JIT (which introduces a significant startup time, which is not measured here):

MacBook:Projects nicolas $ ./unladen-swallow/unladen-2009Q2-inst/bin/python -j always fib.py 35 150
fib(35) = 9227465
Calculation took 14.6129109859 seconds

Calculating the amount of recursive calls to calculate fib(35)
Calculating fib(35) = 9227465 took 29860703 calls

fib2(150) = 9969216677189303386214405760200
Calculation took 0.0432291030884 seconds

memoize_dict(fib)(150) = 9969216677189303386214405760200
Calculation took 0.0363459587097 seconds

memoize_constant_list(151, fib)(150) = 9969216677189303386214405760200
Calculation took 0.0335609912872 seconds

which, to my surprise, performs pretty worse than the default settings.

Overall: your first implementation performs tons and tons of function calls, whilst the second one, which resembles memoize_list_fib in my code (which is recursive), performs significantly less function calls and in the end memoize_list_fib performs almost as good as your second version (it performs +- the same number of function calls as the number of times you’re going through your loop).

So whilst I do agree function calls in Python are reasonably slow compared to plain C function calls (which is just a jmp, no frame handling etc. etc. required), your comparison between your recursive and non-recursive implementation is completely unfair, and even if calculating fib(35) takes several seconds, consider you’re doing a pretty impressive 29860703 function calls to perform the calculation.

Time to get some sleep.

July 16, 2009

Jason Jones

Notes on AC3 to MP3 using ffmpeg

I recently put up a video which I took from a network broadcast, HD recording.  It, of course, was using the AC3 audio code.  As I was trying to get the video chopped and converted  to view in the flash player, I encountered an interesting challenge.

When I put the video into kdenlive (which failed miserably to do even the most basic of video editing.  Back when it was  version 5, I could actually use it.  Now it seems to not be able to do even basic stuff like cutting and pasting... Anyway..  That's another post entirely... anyway)...

When I put the video into kdenlive after chopping the video using -ss and -endpos (-endpos didn't end up working) with mencoder, I noticed that the AC3 audio hadn't been properly muxed into stereo.  The only two channels which seemed to be playing were the two rear channels.  So, no voices could be heard, and the music was distant.  Not acceptable.  So...

I used ffmpeg to mix the 5.1 channels down to two, and encode them into mp3 in just a few seconds (the clip is 4:20 long).

Here's the ffmpeg command to down-mix the channels:

ffmpeg -i input_filename.mpg -f avi -vcodec copy -acodec libmp3lame -ar 44100 -ab 128k -ac 2 file_output.avi

worked like a charm.  Anyway... Just thought I'd see if that helps anyone else out there.

Also - I'm just about done with kdenlive.  It's almost useless to me now.  I used to use it to do all my video editing.  I haven't used it in months, because it just can't seem to do anything right.  What a shame.

July 16, 2009 :: Utah, USA  

July 15, 2009

Roderick B. Greening

I'm an Uncle...




So, my sister finally had her baby on July 9th - a whopping 11lb 13oz boy.

Baby, Hunter Jaxon, is 22.5in long, and I swear will be walking in no time. :)

Anyway, just wanted to share my joy with everyone. I guess, I'll be spending some time with my new nephew over the coming weeks, so I may not be as active developing over the next couple of weeks.

Anyway, things should get back to normal soon.

Here's a pic of me and Hunter:

July 15, 2009 :: NL, Canada  

July 14, 2009

Roy Marples

NetBSD get getdelim(3) and getline(3)

Last night I added  getdelim(3) and getline(3) to  NetBSD.

A few programs in base system needed to be changed due to having their own getline function, most of which aren't anything like getline(3). Hopefully there won't be much fallout in  pkgsrc as a result.

getline(3) is prefered over over functions such as fgetln(3) and fgets(3) because it's standards based and you get a dynamic buffer for really really long lines. However, POSIX did drop the ball on making it a standard from the GNU extension - it should return 0 on EOF and more importantly be called fgetline. Oh well.

I shall be rolling getline(3) support into  dhcpcd later, but I'll have to do a link test in the Makefile to see if we can use it. I'm unsure if I want to have a mini configure for dhcpcd or to keep using just make extensions ....

July 14, 2009

Dion Moult

The zen of PIM

korgacPIM is the acronym for Personal Information Management: todo lists, email, rss, calendar, contacts, journals, blogs, etc. Recently I have been poking around trying to achieve the “zen” of PIM, where my PIM data is accessible from anywhere, and from any medium – from the internet, from my Windows Mobile 6 powered phone, and from my desktop.

As a KDE-user, naturally I have attempted to use the Kontact PIM suite. KMail and Akregator both work wonders with my data and are no problem, but working with contacts, calendar and to-do lists are a real PITA. The interface for managing the actual PIM storage (which I’m more interested in than the PIM data itself) is completely unintuitive, making me choose from several backend types with no description whatsoever, to work-in-progress Akonadi migration of which the status is quite unknown to me, to random remote/local synchronisation of untitled .ics files. The journal section seems to serve no purpose whatsoever.

Are there any kind souls who have reached their own personal “zen” of PIM management who care to share their setup with me? The criteria is:

  1. Hopefully able to use with Kontact
  2. Hopefully able to use/synchronise one way or another with my Windows Mobile 6 phone
  3. Not using Google services, but a way to store a compatible-with-other-apps file on my personal server would be a definite plus!

Note that I do not necessarily need a feature packed application. For example for a calendar all I want is the ability to say “this happens on this date”, with an option for start/end time. The repeating event feature is also optional but appreciated.

Related posts:

  1. Bing.com – another search engine from Microsoft
  2. How to Actually Use Your Computer: Part 2
  3. Remember The Milk: A Great Online To-do List Service

July 14, 2009 :: Malaysia  

July 13, 2009

Sean Potter

Intermediate Entry

There'll be a more fulfilling entry in a day or two, after I get my sessions working again. For now, I leave you with a non-Linux related video of a friend...

We need to get the video up to 1000+ views so he will perform again... so please pass this on. For those that can't see it, go here (youtube.com).

July 13, 2009

July 12, 2009

Dan Fego

Disabling Annoying Middle-Mouse Click Function in Firefox

Starting today, I’ve had enough with accidentally missing my middle clicks on links and ending up having a (seemingly) random page pop. I should have looked at this a long time ago, but now is a good a time as any. By going into about:config and changing “middlemouse.contentLoadURL” from “true” to “false” I am now rid of this annoyance.

July 12, 2009 :: USA  

Dion Moult

Perspective July 2009 Released

snapshot13As many people know, I am the layout editor of my school’s “Perspective” magazine. It is a student run organisation and this will be the last issue I design before I hand over my role to the year below (it’s a yearly thing).

I am happy and proud to announce what I believe is the best issue I have ever produced, and you yourself can compare it to the first, the second, and the third issue.

Perspective is made using free and open-source software including The GIMP, Scribus, KDE, Okular, and Vim. However as the industry standard is the proprietary format Adobe InDesign, I am required to convert it to this format at the final stage. However rest assured this is nothing more than copy and pasting – I present to you a magazine made (almost) completely with free software.

This issue is special because you can download this magazine in PDF format. Feel free to read it – it includes a lovely front-page article by me, 3 entires into the art pages at the end, as well as a two-page article about open-source nearing the end featuring pictures of KDE and Elephant’s Dream – the open-source movie by the Blender Foundation. Some kid also wrote an article about the history of web browsers, but I was quite shocked to see that one line said “Google Chrome was released as a beta in September 2008 by Microsoft” – I think they meant for Windows. Nevertheless, my job is to bother about the design, not the standard of articles, and I’m happy to say that this has upped the bar – from what I see at least.

Clickety here to download.

Oh, and for the lazy, here is the thumbnail view of the entire magazine.

perspective_final_compressed

Thank you for scrolling through, I hope you’ve enjoyed the magazine over the year, goodbye and good luck to whoever replaces me.

Related posts:

  1. Perspective in progress
  2. Perspective Nov 2008 Distributed
  3. Perspective Magazine Feb 09 Released!

July 12, 2009 :: Malaysia  

Brian Carper

Songbird vs. Amarok: How not to design a GUI

Recently I forced myself to uninstall Amarok 1.4 and try Amarok 2 again. I saw there were some nice updates to the interface coming in the next version so I grabbed the latest version from SVN.

I very quickly started looking for other alternatives, and you'll soon see why. The best I could find was Songbird.

I'll start with a disclaimer that both of these programs are great, and they are free. I am not suggesting, let alone demanding, that anyone change anything in either program to suit me. Kudos and thanks to the devs of both. These two programs are both probably better apps than I could dream of coding. Feel free to respond "Ask for a refund" and "Fix it yourself" anyways if you like. I think it's still useful to give some constructive feedback, and maybe I'll learn something myself about how to make a good GUI along the way.

Next I'll start with my conclusion, so you don't have to read further, because this is admittedly long. Amarok 2's interface is extremely painful, but at least it plays music. Songbird has a wonderful interface, much like Amarok 1.4 had a wonderful interface; if only I could get Songbird to make sound come out of my speakers, I'd be set.

I think it's interesting to compare Songbird and Amarok 2, both being bleeding-edge music players for Linux with a similar philosophy and feature set. So let's compare GUIs. I sized the two windows exactly the same and tried to have them display mostly the same bits of information, so it'd be easy to compare. Click below for larger versions.

Amarok 2:

Amarok 2

Songbird:

Songbird

Playlist

In Songbird the playlist dominates the window by default. This is good because seeing a list of music is what I want. It's the whole point of a music player.

I strongly dislike the "filter pane" style of browsing my music. Thankfully you can turn it off in Songbird. You can also install "cover flow" sorts of eye-candy extensions if that floats your boat. I avoid such things, and Songbird's interface is easy and comfortable by default.

In Amarok by default the playlist is a little sliver of GUI off on the right, and the middle context pane dominates the window. Enough people complained about this that in later versions you can turn off the context view entirely, in which case the playlist will stretch to a reasonable size. Whether the information in it will look good is another story (see below).

Amarok's "Local Collection" browser is an expandable tree. You can customize how things are grouped. This was great in Amarok 1.4. It works similarly here. It's not as lightweight or responsive as in 1.4, but I can't complain. By default it's way on the left, with the playlist way on the right and the context view in between, but in later version of Amarok you can change the order of the panes.

I'll call this a tie even though you have to fight for it in Amarok.

Sorting the playlist

Songbird has a bunch of columns with column headers. To sort things you click the headers. Note that this is how Amarok 1.4 worked. This is how every program in the universe works.

In Amarok you have drop-down menus that you can add and remove with buttons, and you pick sorting criteria from that list, left-to-right in order of priority. This is clumsy. According to the devs' blogs this part of the GUI is a work in progress, which is fine, maybe it'll improve.

But note that the design of Amarok's playlist fundamentally limits the ways you can sort it. There have to be some magic GUI controls floating up top, disconnected from the playlist. You aren't going to get a bunch of column headers that you can click because the playlist isn't just rows and columns. Each song in the playlist can take up more than one row and there are grouping-headers interspersed. This is painful and I imagine it's always going to be painful.

Playlist readability

There are no labels in the Amarok playlist to tell you what information you're looking at in the playlist. I initially customized my playlist to show disc number and track number. Doing so, you get a bunch of numbers. What do the numbers mean? At a glance you can't tell. Am I looking at an Artist or Composer? Play Count, or Score? Does that big empty space mean my song is missing a Genre or missing a Year?

In Songbird the columns have headers.

Playlist length

How many songs can you squeeze into the playlist vertically? This is an important metric for me. I want to be able to find a song quickly without scrolling through a list for a year and a half. Sure I can search, but search doesn't replace my eyes in all circumstances.

In Songbird even with those filter panes above the playlist it fits a few more songs than Amarok. You can turn off the filter panes entirely, in which case you can display tons more songs in Songbird than in Amarok. Songbird wins.

In Amarok, by default the playlist has a bunch of multi-row header stuff mixed into the middle of your playlist to show artists and album names and cover art. You can make the headers not take up so much room (or turn them off entirely), in which case Amarok gets pretty close to Songbird. You'll just do without album or artist names. Unless you can manage to cram them into the playlist in the rows beside the track titles.

Which brings us to our major problem...

Playlist customizability

In Songbird you can right click and add and remove columns. You can drag-and-drop columns to rearrange them. You can drag the edges of the columns to resize them. It's simple and it works. This is how Amarok 1.4 worked too.

Amarok fails hard in comparison. In Amarok to customize the playlist you go into a special dialog. You pick your components from a horizontally-scrolling list of huge icons. Then you arrange them into rows.

You can put two or more items side-by-side in which case they become multiple columns on that row in the playlist. Kind of. To control the width of the columns, you hover over that component in this magical dialog, and a weird circular icon appears. When you click it, a drop-down appears with a microscopic slider at the bottom that looks like it was pulled from KDE2. This is the only way to resize columns in the playlist. Here's a screenshot.

Amarok 2

What in the world is this? What are simple drag-and-drop operations in Songbird and every other application ever made, are buried in this cryptic dialog under non-standard controls in Amarok. I've been using KDE and Amarok for a long time and it took me a good couple minutes to even figure out how this thing works.

I think the widths are percentages and have to add up to 100%, I don't even know. The slider is so small that if you drag it one pixel it usually jumps 5-10%, so it's nearly impossible to get anything to look nice. And when you resize the Amaork window later, the columns don't resize sanely; some fields are smashed into each other or overlap as others take up too much space.

Maybe this will all be fixed before the next release; I realize I'm looking at bleeding-edge pre-release software. But this whole idea is so fundamentally broken I don't know how it's going to be salvaged.

I've heard many times that "You can make Amarok 2 look like Amarok 1". No you can't. You can tediously stuff lots of information into the playlist so that it approaches the level of info you could easily and painlessly get in Amarok 1.4. But it will neither look nor act anything like Amarok 1.4. Resizing the playlist will break things. Nothing is labeled. Nothing is easily customizable.

Playlist consistency

Songs in Amarok are grouped into albums by default. If you have a song that doesn't belong to any album, it's displayed completely differently than a song that does. You can alter this in the scary playlist editor dialog mentioned above, under the "Single" tab (as opposed to "Head" and "Body" which control the "grouped" songs). Sound confusing? It is. Needlessly so.

In Songbird songs are displayed the same whether they belong to an album or not, since the play list is just a list of songs. This seems like it should be a no-brainer.

Playlist: overall

Amarok 2's playlist is unique, imaginative, and I'm sure it's a clever bit of code. It's also nearly unusable.

Why can't we have a grid of rows and columns? There's a good reason so many apps use such a control. It's simple and familiar and it works. I'm open to learning something new if it's an improvement. Amarok 2's playlist is not an improvement. Why can't the playlist be a simple list of things to play?

There's nothing about QT4 preventing someone from making a good GUI. Look at ktorrent.

The little things

Say I want to email or IM someone and ask them if they like some artist, whose name happens to be Japanese and difficult to type on my gaijin keyboard. How do you copy and paste the name of an album or artist in Amarok 2? In Amarok 1 you could just click any field in the playlist twice, and it'd let you edit or copy/paste that field inline. Same in Songbird.

In Amarok 2, you have to right click and go into the Edit Song Details dialog, and do it from there, then close the dialog. A tiny step backwards.

How do you change the rating of a song? In Songbird you click the stars in the playlist beside the song you care about. Same in Amarok 1.4.

In Amarok 2, you can display the stars for each song in the playlist, but to change the rating you have to click in the context pane. (So if you dislike and therefore hide the context pane, you're screwed.) Clicking in the playlist does nothing. A tiny step backwards.

All of these tiny steps add up.

Extras

So how well does each player serve as a web browser?

This seems like a ridiculous question, except that both really do try to be a web browser. You can open song lyrics and wikipedia pages and such things right in the music player. I find these features nearly useless. Lyrics are nice when it works (which isn't often, for the music I listen to), but browsing Flickr? Really? Does someone really use this?

Songbird does use its inline browser in a nice way to let you browse and install addons from the Songbird website, and Songbird has a cool feature to let you rip audio files from web pages. Amarok doesn't have these, but I don't hold that against it. I can easily live without any of this stuff.

So in Songbird you have an embedded Mozilla engine. It's hidden behind a tab. You can just avoid opening such a tab and then you don't see it. You can even hide the tab bar itself. Victory.

In Amarok the browser stuff inhabits the middle context pain. The size is limited for this pane, which means information is crammed into the available space, which greatly limits its use. It's also clumsy and difficult to turn components on and off, and I can't figure out how to resize them. The context view itself is either in your face, taking up most of your screen real estate, or it's gone and not easily retrievable.

Note in the screenshot, how in Songbird the lyrics pane is big enough to display all the lyrics, yet small enough not to be annoying. You can also hide the pane (as you can hide every other pane in the GUI) via that tiny button with an arrow under the pane. Amarok's lyrics widget is either too big (if you let it occupy the whole content pane) or too small (if you want to have anything else in the pane with it).

Note that Songbird's lyrics pane is added via an addon. It's a completely optional part of the GUI, which is nice. (Note that Songbird also mangles certain text in the lyrics due to encoding problems, which is a point against it.)

Wasted screen real estate

See that tiny little red icon in the bottom-right of Songbird? That's the Last.fm integration. It's all hidden in a little square of pixels, out of my face, not sucking up screen real estate. This is a common theme in Songbird. Everything is tiny and/or hideable. Tiny is good.

In Amarok everything is huge and round. Even ignoring the content pane, there's white space everywhere. There are buttons strewn all over the interface, like the seven in the lower right. Export Playlist? Does that really need a button? And other buttons appear (and disappear) in awkward positions at the top. "Add Position Marker"? Does this really deserve a prominent button right beside the main play controls?

And yet things I do need buttons for, such as changing the Skip or Repeat options, have no buttons. This is possibly the first player I've ever used that doesn't have a button for Skip and Repeat.

GUI skinning

Songbird is skinnable. So was Amarok 1.4, to a degree. Amarok 2 isn't and I don't know if it ever plans to be. I can live without skins but it's nice to have the option.

Desktop environment integration

As one might imagine, Amarok wins here, if you use KDE, as I do. Global keyboard shortcuts are already set up, it sits in the system tray, and there are nice Plasma applets you can put on your desktop.

Songbird meanwhile does not play nice. First, it has window hints set to hide its border and window title bar, and it tries (and fails) to manage windows itself, giving your window manager the middle finger. I had to force kwin to display the title bar and border just so I could resize certain dialogs that were otherwise broken.

Then, Songbird doesn't sit in the system tray. You can force it down there via alltray, but right-clicking the icon doesn't give you Play/Pause/Next/Back options like in Amarok.

There are no global hotkeys, but you can easily fix this in KDE too because you can set your own global hotkeys to do anything, and Songbird has a commandline interface to let you do what you need. It's still not as graceful as Amarok.

So KDE thankfully rescues Songbird from its own deficiencies, which is nice. Except...

Playing music

Ah, Songbird. Why oh why won't you work? Songbird uses gstreamer. In my years of bouncing between Gnome and KDE and XFCE and others, and using various distros, gstreamer has never worked for me consistently. I can get Songbird to play music, but Flash videos stop producing sound while Songbird is running. This is a known and reported bug, I'm not the only one. While Songbird is playing, other KDE apps randomly produce sound or not depending on the phase of the moon.

Amarok actually plays music, so I'm stuck with it. Unless I go back to Amarok 1.4 which I may still do.

Conclusion

Songbird is pretty good. If I can figure out how to make gstreamer play nice, I'll probably use it.

Otherwise just consider this yet another voice in the wilderness wishing for a Qt4 version of Amarok 1.4. There was nothing wrong with it, from a user's perspective. I'm not the first wishing for this, and won't be the last. If I had a couple years to get good at C++ and a team of programmers to help, I'd probably try it myself.

Why write an 87-page essay about the GUI of a music player? Because Amarok 1.4 was a really good program. I'm a programmer and I appreciate a good program. Songbird has a pretty darned good GUI too. It's painful to see Amarok 2 going in this direction.

July 12, 2009 :: Pennsylvania, USA  

Nicolas Trangez

First Clojure experiments

Some weeks ago I attended JavaOne (a pretty neat conference, even for non-Java-heads like me) and got in touch with several non-Java languages running on the JVM (nothing really new next to Project Fortress, but I never got into most for real).

Since I wanted to learn some language not resembling any other I already know (even a little), I decided some hours ago to start digging into Clojure, which is a LISP dialect running on the JVM using STM (Software Transactional Memory) and created with concurrency in mind. Check the website for more information.

After some hacking I got a first ‘application’ running. Since recently there’s been some little meme at work regarding echo servers, I decided to write a very basic line-oriented echo server in Clojure.

The result is a server using one thread per connection which just sends back lines to a connected client as-is. Nothing fancy, but might be a useful start for developing basic network applications using Clojure.

Enjoy!

July 12, 2009

July 11, 2009

Ciaran McCreesh

Paludis 0.38.1 Released


Paludis 0.38.1 has been released:

  • Various fixes when using the Portage configuration.
Posted in paludis releases Tagged: paludis

July 11, 2009

Iain Buchanan

Broadcom BCM4306 wireless LAN without ndiswrapper

I've been updating an old laptop as you might have read.

Last night I tried to start the wireless LAN, but too many kernel upgrades had obsoleted my setup! When I first got the laptop around 2004, ndiswrapper was the only option. By now I thought there must be a better way! I settled on the b43legacy drivers. Many thanks to that great site for all the specific details.

As I write, I'm using the wireless LAN with b43legacy without problems!

But how? I'll show you the details for the specific WLAN controller in the Dell Inspiron 9100.

According to wireless.kernel.org (wko)
If your card is a BCM4306 Rev 2, or only has 802.11b capability, it uses b43legacy. All other models use b43.
As you can see, I have revision 2, so I have to use the b43legacy driver. To identify your card, type `lspci -vnn | grep 14e4`. This is my response:

Subsystem: Broadcom Corporation Device [14e4:4d64]
02:00.0 Ethernet controller [0200]: Broadcom Corporation BCM4401 100Base-T [14e4:4401] (rev 01)
02:03.0 Network controller [0280]: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller [14e4:4320] (rev 02)
The 14e4 is necessary to use any b43 driver.

At wko, b43legacy is specified for revision 2, and b43 for revision 3.
Supported chip types
* bcm4306 (Rev. 2 uses b43legacy, Rev. 3 uses b43)
Now to configure your kernel. (This may be done for you). Check these options are set:
  • Networking support > wireless
  • Generic IEEE 802.11 Networking Stack (mac80211)
  • Enable LED triggers (MAC80211_LEDS) (if you have LEDs)
Also enable:
  • Network device support > wireless LAN
and the following options:
CONFIG_B43LEGACY=m
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
CONFIG_B43LEGACY_LEDS=y
CONFIG_B43LEGACY_DEBUG=y
CONFIG_B43LEGACY_DMA=y
# CONFIG_B43LEGACY_DMA_AND_PIO_MODE is not set
CONFIG_B43LEGACY_DMA_MODE=y
# CONFIG_B43LEGACY_PIO_MODE is not set

Now make, install, and reboot! The module b43_legacy was loaded automatically for my by udev.

I use wpa_supplicant to connect. Your config files may vary. Somehow you need to specify that wpa_supplicant should be started like this:
wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplement.conf

In gentoo, edit /etc/conf.d/net:
modules_wlan0="wpa_supplicant"
wpa_supplicant_wlan0="-Dwext"
config_wlan0="dhcp"
dhcpcd_wlan0="-L"


There's one final step. The BCM cards need firmware which is loaded by the proprietary windows drivers. You must download this in addition to a firware cutter called b43-fwcutter. In Gentoo, emerge b43-fwcutter. Then run these commands (thanks again to wko).
export FIRMWARE_INSTALL_DIR="/lib/firmware"
wget http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o
sudo b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" wl_apsta-3.130.20.0.o
The output looks like this:
This file is recognised as:
ID : FW10
filename : wl_apsta.o
version : 295.14
MD5 : e08665c5c5b66beb9c3b2dd54aa80cb3
Extracting b43legacy/ucode2.fw
Extracting b43legacy/ucode4.fw
Extracting b43legacy/ucode5.fw
Extracting b43legacy/ucode11.fw
Extracting b43legacy/pcm4.fw
Extracting b43legacy/pcm5.fw
Extracting b43legacy/a0g0bsinitvals2.fw
Extracting b43legacy/b0g0bsinitvals5.fw
Extracting b43legacy/a0g0initvals5.fw
Extracting b43legacy/a0g1bsinitvals5.fw
Extracting b43legacy/a0g0initvals2.fw
Extracting b43legacy/a0g1initvals5.fw
Extracting b43legacy/b0g0bsinitvals2.fw
Extracting b43legacy/b0g0initvals5.fw
Extracting b43legacy/b0g0initvals2.fw
Extracting b43legacy/a0g0bsinitvals5.fw

You may need to specify a different firmware directory. /lib/firmware is correct for Gentoo.

Now you should be able to start your network script. In Gentoo /etc/init.d/net.wlan0 start. syslog shows:

b43legacy-phy0: Loading firmware version 0x127, patch level 14 (2005-04-18 02:36:27)
b43legacy-phy0 debug: Chip initialized
b43legacy-phy0 debug: 30-bit DMA initialized
Registered led device: b43legacy-phy0:tx
Registered led device: b43legacy-phy0:rx
b43legacy-phy0 debug: Wireless interface started
b43legacy-phy0 debug: Adding Interface type 2
b43legacy-phy0 debug: Radio initialized
b43legacy-phy0: Radio turned off by software
b43legacy-phy0: Radio turned on by software
/etc/init.d/net.wlan0[12885]: WARNING: net.wlan0 has started, but is inactive
wlan0: direct probe to AP --:--:--:--:--:-- try 1
wlan0 direct probe responded
wlan0: authenticate with AP --:--:--:--:--:--
wlan0: authenticated
wlan0: associate with AP --:--:--:--:--:--
wlan0: RX AssocResp from --:--:--:--:--:-- (capab=0x431 status=0 aid=2)
wlan0: associated
wpa_cli: interface wlan0 CONNECTED
dhcpcd[13080]: wlan0: dhcpcd 4.0.13 starting
dhcpcd[13080]: wlan0: broadcasting for a lease
dhcpcd[13080]: wlan0: offered x.x.x.148 from x.x.x.1
dhcpcd[13080]: wlan0: acknowledged x.x.x.148 from x.x.x.1
dhcpcd[13080]: wlan0: checking x.x.x.148 is available on attached networks
dhcpcd[13080]: wlan0: leased x.x.x.148 for 604800 seconds
I removed IP addresses, hostnames, and MAC addresses.

And that's it! Let me know how you go, especially if you have an Inspiron 9100. If not, be sure to check out the official site for more details: http://wireless.kernel.org/en/users/Drivers/b43

July 11, 2009 :: Australia  

July 10, 2009

Dan Ballard

Old and improved

Just a note, I updated my 2008 how to set up a git repository entry. If you're curious, here it is
http://www.mindstab.net/wordpress/archives/288

July 10, 2009 :: British Columbia, Canada  

Dion Moult

Chrome in the Clouds: The Google OS

If you read my initial post about Google Chrome (the OS, not the Brow- wait a minute, is there even a clear distinction anymore?) you would have realised that I didn’t really give opinions on what I felt about it but instead  how I visualised it to be. I believe in designating some mull-over time before making a judgement. (hypocritically speaking, I did not do that when constructing my conspiracy theory when Google Wave came out)

Now is the time to see what exactly is going on.

My feelings in a nutshell

  • Would I buy such a product? If it were cheap (100 dollars or so), yes.
  • I feel Google is harming open-source.
  • Cloud computing is very important to me for accessibility and synchronisation.
  • We cannot fight, and should not fight.

The story behind it

The first point is easy to justify and I do believe this is very agreeable. This is an area of the markt people have always looked towards with an expectation of a “trustworthy” brand, and Google has just provided that to them. People will buy for this OS.

To a company, Google is probably executing its marketing strategy in the most effective way possible. They use a product-orientated approach, making the product first then selling it to the market – or so it seems. Google knows two things: 1) They have craploads of data, and 2) They own (pretty much) the biggest mass marketing device in the world. However they do know that even though they “own” this realm, they cannot control it. It’s like a pet – you own but cannot control it.

They way you control it is by feeding it. Such is the nature of open-source development. However Google is able to turn open-source into money by producing a good percentage of the product before open-sourcing it. This allows Google to keep the leash on the project. You developers aren’t building the product side by side – no: you are doing the grunt work that turns a framework into something consumers will love – something with the name Google slapped onto it.

Let’s move onto my third feeling. This is because of a trend I have noticed over time. Computers is no longer about being in full control of your data – it’s about being in full control of your data no matter where you are. Cloud computing sorts this out – it’s no wonder Google’s objective is “to be the hub through which all the world’s information passes through“. Sorry guys, but the fact is that most consumers want this. The only time they won’t is when the company providing it has a bad reputation – but Google? No, Google’s never been evil have they? Not to the average joe they haven’t. It’s the average joe that changes the workflow – it’s the average joe that makes such a way of working part of your daily routine.

You see, Chrome isn’t about making an operating system to do useful stuff – Chrome is all about changing people’s workflow to become web-centric. Instead of moving into the desktop market, what Google is doing is moving consumers into the web market.  Why do you think it’s named Chrome after their browser? It saves on the advertising costs. You advertise the OS, you advertise the browser. Google is pushing ahead HTML 5 specifications to redefine what the web is capable of, and their browser Chrome going to be the biggest, baddest boy in the playground that knows the meaning of the word “compatibility” backwards. Advertise them both at the same time – what you get are people getting the “wow” experience Google can provide with all its toolkits online from the browser, and making it easy as pie to integrate it into how they work. It’s not because Google Docs is simply an application that allows you to edit documents online, it’s because it’s a shared, accessible, compatible, synchronised alternative.

We cannot and should not fight.

Yes. My last point is so awesome it deserves its own special section.

You cannot fight once a market leader has made a choice on a product/system. We saw it with Windows and we may very well see it again. (I assume you have all seen Google Wave?) Instead we have to understand the market. What does the market want? How do we provide for it?

Now, I am a KDE user myself but what I see as major areas for Linux and DEs in general to focus on are:

  • Plasmoids (in KDE at least) – this is a stepping stone to integrate new technologies and the web into the desktop workflow
  • Provision of private clouds, complying with open-standards – for private, secure and PERSONALISED (imagine giving users the freedom to shape their cloud environment) mobility and synchronisation
  • The social desktop
  • The semantic desktop

Am I right, am I crazy, have I missed out stuff?

Shower me with your thoughts please.

Related posts:

  1. The Google Operating System – Chrome.
  2. Beware of Google.
  3. How to install Chromium (Google Chome) on Gentoo Linux

July 10, 2009 :: Malaysia  

Matija Šuklje

Cloud computing on netbooks — Why?

All this talk about Google's Chrome OS has made me think a bit.

While in general I agree with both Dion Moult and Christian Weilbach and am in general mistrusting to cloud computing (at least in its currently most popular form), there is something else that bothers me with this hype.

As of late a lot of talk and effort about cloud computing was being done in the direction of making it work on netbooks and similar mobile devices. To me this makes no sense! Having your documents and data online is a great idea if you have no computer of your own or you have to migrate a lot, but only have a stationary system.

But if you can take all your data with yourself on a ultra-portable device with hours of autonomy time (e.g. netbook, smartphone), why would you rather have it online out of your direct reach? It is neither practical, because you need a network connection all the time, nor does it spare you much diskspace (if we completely ignore IP and privacy complications). Yes, SSD's are still small, but frankly, all that music and movies take up a lot more space then your calendars, inbox and documents put together!

There are cases when clouds make sense. But it always depends on what they are used for and how they are implemented. For example, I am very happy with SpiderOak's encrypted and clouded backups and am looking forward to SocialDesktop if its done right (and it seems like it might be). I even have some insane ideas about binding together NEPOMUK with P2P and F2F technology. But I will write about all this some other time.
<!--break-->

July 10, 2009 :: Slovenia  

Iain Buchanan

Dell Inspiron 9100 Internals part 3: CPU cooling assembly

After removing the video card, the next step was to access the CPU fan. In the picture on the right you can see the Microprocessor Thermal-Cooling Assembly starting with the CPU fan at the bottom middle, running over the northbridge copper heat transfer pipe, and finally to the CPU heatsink. This Aluminium block has two copper pipes running to the left and right fans, for extra cooling.

Once I had got this far, I suspected the blockage was after the fan, but before the Aluminium block. I removed the video card (as you saw previously) and then the four screws on the block.

The block gave a bit of resistance, and then lifted. Experts would recommend you do this to a hot machine, and this is the reason why: There's the CPU nicely stuck to the block. oops! The CPU pulled right out of the closed ZIF socket! Note that you can't do this to a warm laptop, unless you're fast, as it takes time to get this far.

There's a great thread here about removing a stuck CPU. I think the dental floss is a bit over the top (and time consuming), so I used a heat gun. I placed the assembly upside-down so the CPU wouldn't fall off, and blew the heat gun (or hair dryer) on the two end fins. Stop when it's only just too hot to touch. Then only a tiny bit of pressure was required to lift the CPU. Don't apply pressure to the corner of the CPU with a screwdriver!

Here's the final shot showing no CPU or video card.
Make sure you cover the ZIF socket
with something to keep it dust free. And don't touch the CPU or heat sink heat transfer surface, as your skin-oils can deter the heat transfer.



Here's the cooling assembly. You can see the thick dust covering the channel. There was also dust all through the fins. (Again, sorry for the bad photos).






Now I cleaned the CPU surface and heat sink surface with alcohol and a lint-free cloth, and applied a covering of Arctic Silver. The next two photos show why it needed cleaning:




And now it's time to reinstall! Follow the pull-apart instructions backwards.

Take careful note of where the screws go as some screws were different sizes to the ones listed in the Dell guide. Also make sure you take care with re-inserting the parts. I cracked the display bezel and one hinge because I couldn't fit the centre hinge cover properly. Nevermind, they're only about US$25!

On the right you can see a gcc compile at 100% CPU usage. The CPU has only just started to heat up at 43 degrees C. It didn't pass 58 degrees after compiling my system for hours, and the fans were all at low / medium speed.

Finally, at idle, it's now 40 degrees C. (woot).

Oh, and by the way: I suspended before taking out the CPU, and I resumed days later without any software issues!

July 10, 2009 :: Australia  

July 9, 2009

Iain Buchanan

Dell Inspiron 9100 Internals part 2: Video card

Part 1 of pulling-apart my laptop is here.

In this part I'm showing pictures of the video card before and after removal.

Here is the exposed shot again:
At the top left you can see two sets of cooling fins with a copper pipe running diagonally to a daughter board. This board is my ATI Mobility Radeon 9700 M10 with 64Mb RAM (woohoo!). Other options are the Mobility 9700 with 128Mb RAM, and the Mobility 9800. (I wish I had the 9800...)

Below the heat sinks on the far left is a fan. One heat sink transfers heat from the video card (furtherest back) via the copper pipe you can see. The other heat sink transfers heat from the CPU via a copper pipe that runs under the video card. You can just see it running parallel to the back edge.

Follow the Dell instructions for removing the video card (and my disclaimer) in Post 1. It looks like this:
You can see the copper transfer pipe, and the cooling fins. Copper is excellent at transferring heat! You'll see why in Part 3.






The next photo shows what the system board looks like without the video card!
You can now clearly see the CPU heat transfer pipe, as well as a third copper pipe under the video card. The third pipe looks like its attached to the northbridge heat sink. This third pipe runs diagonally to the CPU cooler, and ends in a small aluminium heat transfer block under the black plastic cover you can see.

The video card slot is visible next the the fan. Kudos to Dell and other laptop manufacturers for making laptops almost as modular as desktops, however replacement video cards are hundreds of dollars! I can't find any cheap second hand parts. If you can, let me know!

July 9, 2009 :: Australia  

Dell Inspiron 9100 Internals part 1: accessing the components

So I've had my Inspiron 9100 since 2003 or 2004 - when they were quite new. Back then the 3.0GHz P4 was a super machine, and even now it beats most light laptops with boot-up time and performance.

Lately it's been under a desk as a remote server, so I haven't seen much of it. I pulled it out recently and noticed the fans were spinning quite a lot, and the CPU temp was quite high - 60 - 70 degrees.

I pulled out the two side ventilators (fans) and cleaned a large amount of fine dust from the fans and heat sink fins. This has massively reduced the fan usage, and the CPU temperature is now down to 40 degrees at idle.

However there's one more fan - the CPU fan - that I couldn't easily reach. I could hear it all the time so I assume its suffering from the same problem: dust. I finally decided to pull it apart and clean it, and here is my progress. This is also an interesting look into how a Dell laptop wears over time - not too bad in my opinion.

First, CONTINUE AT YOUR OWN RISK! The pull-apart starts easy and low risk, but as soon as you pull apart the display assembly, video card and CPU you're in the high-risk area. If you break your laptop, you can keep the change from selling the parts on eBay!

Second, follow the instructions from Dell - they're the ultimate pull-apart guide and I only found them lacking at the very last stage (CPU fan removal).

Here's a grainy shot of the left hinge cover - there's plenty of dust there. (sorry about the bad quality - it's my phone camera). See the dust near the display attachment:


Now I've taken off the keyboard and surrounds. There's more dust:


Here is a shot of the laptop from the top as you would sit at it to work, but without the display, keyboard, touchpad, etc. The CPU fan is at the bottom centre.


Here is just half of the screws I removed (I count 30 so far). Next to them is the hinge covers:


This got me to some of the system board components. In the next post I'll show the removed video card, CPU and heatsinks.

Enjoy!

July 9, 2009 :: Australia  

Ciaran McCreesh

Vim Plugins on Github


I’ve moved some of my Vim plugins from vim.org to Github. This means that rather than having to spend hours painfully updating things on a site with an uptime on par with ahf’s, I can now spend a few seconds updating things locally and then automate waiting hours to be able to push to a site with an uptime on par with ahf’s.

You can now get, and more importantly, send patches that won’t get ignored for:

  • inkpot, the original and best 88/256 colour scheme
  • detectindent, if you have to work with heretics who don’t use four-space indenting
  • securemodelines, if you like modelines but don’t like malicious documents being able to trash your terminal
Posted in vim Tagged: detectindent, inkpot, securemodelines, vim

July 9, 2009

Dirk R. Gently

A Beginners Setup to Quake Wars


Header

If you are just getting into Quake Wars, has a Strogg just thrown a grenade in your area and then quickly pulled out his Lacerator jumping around the corner to finish you off, all before you could say, “What the…”? Welcome to Quake Wars. Quake Wars has been around for a couple years and has some very devote followers. I almost threw out Quake Wars, discarding it as too tough and moved on. I’ve played a good bit of Urban Terror and thought I could mesh skills pretty well in QW but I couldn’t. For one, QW is a completely different game that UT. It is highly team-based and class-independent game. Second, experts there have a highly configured setups that can make your twist-left-hand stretch-forefinger setup into minchmeat. This is a guide that will get your setup somewhat on par with the experts and put you on evener ground.

ETQW is highly configurable. It literally has thousands of settings that can be changed. Thankfully we will only have to change a number of them the get on par with other players. Be of warning though that changing some settings are considered cheats and the built-in cheat system (Punkbuster) may disallow some settings. I have built a configuration that will work on just about all servers. If there are values that are not allowed by Punkbuster, Punkbuster will let you know in the chat window.

Keyboard Layout

The most important thing you can do is to build a keyboard layout where most commonly used keys are close to the fingertips. Here’s the layout I use. Green keys are at the fingertips, blue require a bit of reach, yellow are just out of reach, and red are need be.

A couple notes. Sprint toggle is the always running toggle. Sprinting is useful most of the time but makes scoping opponents and moving impossible. All keys to right are automated responses that I frequently use. 9 and 0 will respawn you in either the original spawn or the foremost spawn.

User Configuration File

Configurations are put in the users autoexec.cfg file. There won’t be one originally so you will have to create it. The autoexec.cfg file in Linux goes in the user configuration folder: ~/.etqwcl/sdnet/<playername>/base. In Vista it goes in in the users Documents\Id Software\ETQW…\sdnet\base. This file gets loaded when the user logs in. To be able to test it though it needs to be in ETQW’s global location <ETQW-config-folder>/base. Create an autoexec.cfg in the user folder and redirect to the global one:

exec global.cfg

You can name it anything you want. Once you have your global config set up you can test it from a running QW by opening console (~) and running exec global.cfg. QW will let you know of any error exist in the configuration file.

Global Configuration File

I could explain all the details of the configuration file but rather I’ll just give it to you. It has all the explanations in it plus links you need to look up an details. A couple notes: A smooth, even frames per second is critical to QW. You’ll want 30fps or 60fps without any hitching. Good graphics and great light don’t mean a thing when you’re looking to make that great hit and find yourself fighting your hardware. The config is for a nvidia 9600 GSO which at 2009 this is a medium level graphic card that handles shaders and lighting poorly, the config will reflect that. I haven’t give away all my secrets, so, well here it is:

Enjoy!

// Contributor akau <dirk.r.gently@gmail.com> // http://www.planetquakewars.net/Guides/Config_Guide?locale=en_US // http://4newbies.planetwolfenstein.gamespy.com/ETQW/iffy_autoexec.php // http://wiki.battle.no/index.php/Quake_Wars_Cvar_list - cvar listings /// Hardware /// // FPS 30 or 60 decision - "showcom_fps 1" to draw fps // http://community.enemyterritory.com/forums/showthread.php?t=2042 seta com_unlockFPS 1 seta com_unlock_timingMethod 2 // Texture Quality (-2 to 2) // Texture and Visual Quality mirror those found in Settings > Advanced seta image_diffusePicMip "0" seta image_bumpPicMip "0" seta image_specularPicMip "-1" seta image_anisotropy "0"       // (0 off, to 16 by 2^) // Visual Quality/Performance // Terrain Quality, Effects Level, Debris/Weather many settings seta r_megadrawmethod "3"             // Lighting Quality   (3 low, 0 high) seta com_lastFoliageLevel "0"         // Foliage Quality    (0 low, 2 high) seta seta com_lastGraphicsLevel "0"   // Shader Effects     (0 low, 2 high) seta com_lastGraphicsDetailLevel "0"  // Effects Level      (0 low, 2 high) seta com_gpuSpec "0"                  // Shader Level       (0 low, 3 ultra) seta r_multiSamples "0"               // Anti-Aliasing      (0,2,4,8,16,32) seta image_filter "GL_LINEAR_MIPMAP_NEAREST" // bilinear antialiasing (faster) seta r_swapinterval "0"         // Vsync                    (0 off, 1 on) seta r_shadows "0"              // Shadows                  (0 off, 1 on) seta r_softParticles "0"        // Better explosions/smoke  (0 off, 1 on) seta r_useAlphaToCoverage "0"   // Smooth foliage           (0 off, 1 on) // Good FPS boosts // r_megaDrawMethod, r_shadows, r_softParticles, com_gpuSpec above seta com_machineSpec "1"        // Processor                (0 low, 2 high) seta g_decals "1"               // Bullet marks             (0 off, 1 on) seta g_showPlayerShadow "0"     // Player shadows           (0 off, 1 on) seta r_skipMegaTexture "1"      // Skip mega textures       (1 off,  0 on) seta r_skipStuff "0"            // grass and foliage        (0 off, 1 on) // Additional FPS boosts seta r_skipBump "0"             // Skips rendering bumpmaps on textures seta r_skipSpecular "1"         // seta r_shaderQuality "2"        // Shader quality (0 high 2 low) seta r_detailTexture "0"        // Detail level textures seta r_detailFade "0"           // Detail level fades seta r_useThreadedRenderer "2"  // For multiple cpus seta com_videoRam "768"         // usually ETQW can detect video memory // Resolution // r_mode list: // http://community.enemyterritory.com/forums/showpost.php?p=349547&postcount=4 seta r_mode "10"                // -1 for custom seta r_aspectRatio "2"          // 0=4:3, 1=16:9, 2=16:10, 3=5:4 TFT, -1 custom seta r_fullscreen "1" //seta r_customAspectRatioV "10" //seta r_customAspectRatioH "16" //seta r_customHeight "900" //seta r_customWidth "1440" //seta cg_fov "90"              // field of view, default depends on aspect                                 // ratio.  Note: wider fov increases view depth // seta image_lodbias "-1"      // viewable distance        (-1 high, 1 low) // seta r_visdistmult "1.2" // Gamma/Brightness seta r_brightness "1.18" seta r_gamma "1.05" // Sound seta s_volume_dB "-10" seta s_volumeMusic_dB "-16" seta s_force22kH "0"            // lowering audio quality helps FPS a bit // Network - http://ucguides.savagehelp.com/Quake3/connection.html //seta cl_maxpackets "100"      // max packets 100 for PunkBuster bandwidth. //seta cl_packetdup "1"         // If high PL - make 1. //seta snaps "40"               // Leave this at 40, servers will adjust. //seta rate 25000               // DSL/Cable best at 25,000 servers will adjust. //seta cl_timenudge 0           // Leave at 0 for less lag and less trouble. //seta cg_lagometer "0"         // Displays network lag // Mouse seta sensitivity "13.0"         // sensitivity seta m_smooth "1"               // smooth mouse movements seta m_pitch "0.022"            // vertical sensitivity scale seta m_yaw "0.022"              // horizontal sensitivity scale seta m_helicopterPitch "0.022"  // mouse/joystick no inverted when flying // VOIP - team, global, fireteam (1 on, 0 off) seta ui_voipReceiveTeam "1" seta ui_voipReceiveGlobal "1" seta ui_voipReceiveFireTeam "1" /// General Settings /// seta g_skipIntro "1"                  // Seen intro, doesn't work in Linux seta com_allowconsole "1"             // For Windows tilda key seta gui_showTooltips "0"             // Enough of the tooltips seta g_tooltipTimeScale "0" seta net_clientPunkbusterEnabled "1"  // Punkbuster is our friend // Limit rolling and bobbing motions (Warning few servers may not allow this) seta pm_crouchbob 0 seta pm_bobpitch 0 seta pm_bobup 0 seta pm_runroll 0 seta pm_runpitch 0 seta pm_runbob 0 seta pm_walkbob 0 seta in_toggleSprint "1"              // I find the run toggle useful seta ui_advancedFlightControls "1"    // No auto-correcting of flight controls seta ui_drivingCameraFreelook  "1"    // Freelook on vehicles with no weapons seta ui_rememberCameraMode "1"        // Remember vehicle camera mode /// HUD settings /// // http://community.enemyterritory.com/forums/showthread.php?t=14167 seta g_rotatecommandmap "0"           // No rotating command map seta gui_showRespawnText "0"          // Unneeded respawn text (1 on, 0 off) // Chat colors seta g_chatDefaultColor 1 1 0 .60       // Global chat color (RGBa color) Y g_chatTeamColor .8 .8 .8 .7             // Team chat color Gray g_chatFireTeamColor 1 .6 .6 .7          // Fireteam chat color seta gui_chatAlpha "0.7"                // seta g_chatLineTimeout "12"             // Chat timeout (default 5 seconds) //seta g_chatDefaultColor .6 .8 1 .7      // global chat color (RGBa color) B //g_chatTeamColor 1 1 .6 .7               // team chat color Purple? //g_chatTeamColor .94 .96 .50 .7          // team chat color //g_chatFireTeamColor .72 .44 .44 .7      // fireteam chat color // Less distracting waypoints, player info, mines, objectives, crosshair, // vehicles, fraglist, commandmap, fireteam list seta g_waypointAlphaScale "0.5" seta g_waypointDistanceMax "3084" seta g_waypointDistanceMin "16" seta g_waypointSizeMax "15" seta g_waypointSizeMin "10" seta g_playerIconAlphaScale ".5" seta g_playerIconSize "8" seta g_playerArrowIconSize "5" seta g_drawVehicleIcons "0"             // Disable the vehicle icons seta g_friendlyColor ".8 .8 .8 .5" seta g_enemyColor ".55 .20 .16 0.5"     // Gray red seta g_neutralColor "0.45 .45 .45 .5" //seta g_friendlyColor ".14 .88 .32 .5" //seta g_enemyColor "1 .2 .21 0.5"        // Brighter-red seta g_drawMineIcons "0" seta g_mineTriggerWarning "0" seta gui_objectiveListAlpha "0.4" seta gui_objectiveStatusAlpha "0.4" seta gui_crosshairColor "1 1 1 .70" seta gui_crosshairSpreadScale "0" seta gui_crosshairGrenadeAlpha "0.286585" seta gui_crosshairStatsAlpha "0" seta gui_crosshairSpreadAlpha "0" seta gui_crosshairAlpha "0.7" seta gui_crosshairKey "pin_14" seta gui_crosshairDef "crosshairs" //seta gui_crosshairColor "0 1 0 .70"     // Green seta g_showVehicleCockpits "0" seta gui_vehicleDirectionAlpha "0.5" seta gui_vehicleAlpha "0.8" seta gui_obitAlpha "0"                    // remove leftside kill message seta gui_commandMapAlpha ".8" seta gui_fireTeamAlpha "0.8" seta gui_personalBestsAlpha ".4"           // Disabled because of bug? seta gui_showRespawnText "0" /// Player /// seta ui_name "akau" seta ui_clanTag "" seta ui_clanTagPosition "1" /// Keybindings /// // Dont' unbind all unless you plan to bind every key. ETQW will just replace // otherwise. //unbindall // Actions // // Movement bind "e" "_forward" "" "default" bind "s" "_moveleft" "" "default" bind "d" "_back" "" "default" bind "f" "_moveright""" "default" // Lean - lean with shift key and s and f bind "s" "_leanleft" "shift" "default" bind "f" "_leanright" "shift" "default" // Crouch/Prone/Sprint/Walk bind "shift" "_movedown" "" "default" bind "v" "_prone" "" "default" bind "r" "_sprint" "" "default" bind "CTRL" "_speed" "" "default" // Toggle sprint key behavior. // On: move forward always sprints, Off: hold sprint key to sprint bind "F4" "toggle in_toggleSprint" // Weapons - melee, second, primary, grenades, gadgets (packs, cameras, // explosives, airstrike), designators, tools (construct, revive, hack), deploy bind "q" "_weapon0" "" "default" bind "a" "_weapon1" "" "default" bind "w" "_weapon2" "" "default" bind "c" "_weapon3" "" "default" bind "z" "_weapon5" "" "default" bind "4" "_weapon6" "" "default" bind "x" "useweapon weapon_tool1" "" "default" bind "3" "useweapon weapon_tool2" "" "default" // Reload bind "t" "_reload" "" "default" // Use bind "g" "_activate" "" "default" // Vehicle bind "capslock" "_usevehicle" "" "default" // enter vehicle bind w "_leanleft" "" "vehicle"            // strafe in Desecrator bind r "_leanright" "" "vehicle" bind "shift" "_sprint" "" "vehicle"        // use shift as vehicle boost bind "1" "_weapon0" "" "default"           // decoys with right mouse click bind "MOUSE2" "_weapon0" "" "vehicle" // Fireteam Menu bind "o" "_fireteam" "" "default" // Type Chat - team, global, fireteam bind "y" "clientMessageMode 1" "" "default" bind "u" "clientMessageMode" "" "default" bind "i" "clientMessageMode 2" "" "default" // Automated Chat bind "MOUSE3" "_context" "" "default" bind "MOUSE3" "_quickchat" "shift" "default" // VOIP - team, global, fireteam bind "5" "_teamVoice" "" "default" bind "6" "_Voice" "" "default" bind "7" "_fireteamvoice" "" "default" // Respawn bind "h" "kill" // Sane screenshot button bind printscreen screenshot // Spawn at default spawn and forward-most spawn bind "9" "setSpawnpoint base" bind "0" "setSpawnpoint default" // Load configuration bind "F9" "exec akau.cfg" // GreasedScotsman's insta-class changes and announce // GDF use CTRL + (1234-qw-asd-5-zx) - (ALT Strogg) // soldier bind "1" "clientTeam GDF; clientClass Soldier 0;wait;kill;sayTeam '^7'Respawning as a'^m'Soldier'^7'with an '^d'Assault Rifle'^7'" "CTRL" "default" bind "2" "clientTeam GDF; clientClass Soldier 1;wait;kill;sayTeam '^7'Respawning as a'^m'Soldier'^7'with a '^d'Rocket Launcher'^7'" "CTRL" "default" bind "3" "clientTeam GDF; clientClass Soldier 2;wait;kill;sayTeam '^7'Respawning as a'^m'Soldier'^7'with a '^d'GPMG'^7'" "CTRL" "default" bind "4" "clientTeam GDF; clientClass Soldier 3;wait;kill;sayTeam '^7'Respawning as a'^m'Soldier'^7'with a '^d'Shotgun'^7'" "CTRL" "default" // medic bind "q" "clientTeam GDF; clientClass Medic 0;wait;kill;sayTeam '^7'Respawning as a'^m'Medic'^7'with an '^d'Assault Rifle'^7'" "CTRL" "default" bind "w" "clientTeam GDF; clientClass Medic 1;wait;kill;sayTeam '^7'Respawning as a'^m'Medic'^7'with a '^d'Shotgun'^7'" "CTRL" "default" // engineer bind "a" "clientTeam GDF; clientClass Engineer 0;wait;kill;sayTeam '^7'Respawning as an'^m'Engineer'^7'with an '^d'Assault Rifle'^7" "CTRL" "default" bind "s" "clientTeam GDF; clientClass Engineer 1;wait;kill;sayTeam '^7'Respawning as an'^m'Engineer'^7'with a '^d'Shotgun'^7" "CTRL" "default" bind "d" "clientTeam GDF; clientClass Engineer 2;wait;kill;sayTeam '^7'Respawning as an'^m'Engineer'^7'with an '^d'Assault Rifle w/ Gren. Launcher'^7" "CTRL" "default" // field-ops bind "5" "clientTeam GDF; clientClass FieldOps 0;wait;kill;sayTeam '^7'Respawning as a '^m'Field Ops'^7'with an '^d'Assault Rifle'^7" "CTRL" "default" // covert-ops bind "z" "clientTeam GDF; clientClass CovertOps 0;wait;kill;sayTeam '^7'Respawning as a'^m'Covert Ops'^7'with a '^d'Scoped Assault Rifle'^7" "CTRL" "default" bind "x" "clientTeam GDF; clientClass CovertOps 1;wait;kill;sayTeam '^7'Respawning as a'^m'Covert Ops'^7'with a '^d'Sniper Rifle'^7" "CTRL" "default" // aggressor bind "1" "clientTeam Strogg; clientClass Aggressor 0;wait;kill;sayTeam '^7'Respawning as an'^m'Aggressor'^7'with a '^d'Lacerator'^7" "ALT" "default" bind "2" "clientTeam Strogg; clientClass Aggressor 1;wait;kill;sayTeam '^7'Respawning as an'^m'Aggressor'^7'with an '^d'Obliterator'^7" "ALT" "default" bind "3" "clientTeam Strogg; clientClass Aggressor 2;wait;kill;sayTeam '^7'Respawning as an'^m'Aggressor'^7'with a '^d'Hyperblaster'^7" "ALT" "default" bind "4" "clientTeam Strogg; clientClass Aggressor 3;wait;kill;sayTeam '^7'Respawning as an'^m'Aggressor'^7'with a '^d'Nailgun'^7" "ALT" "default" // technician bind "q" "clientTeam Strogg; clientClass Technician 0;wait;kill;sayTeam '^7'Respawning as a'^m'Technician'^7'with a '^d'Lacerator'^7" "ALT" "default" bind "w" "clientTeam Strogg; clientClass Technician 1;wait;kill;sayTeam '^7'Respawning as a'^m'Technician'^7'with a '^d'Nailgun'^7" "ALT" "default" // constructor bind "a" "clientTeam Strogg; clientClass Constructor 0;wait;kill;sayTeam '^7'Respawning as a'^m'Constructor'^7'with a '^d'Lacerator'^7" "ALT" "default" bind "s" "clientTeam Strogg; clientClass Constructor 1;wait;kill;sayTeam '^7'Respawning as a'^m'Constructor'^7'with a '^d'Nailgun'^7" "ALT" "default" bind "d" "clientTeam Strogg; clientClass Constructor 2;wait;kill;sayTeam '^7'Respawning as a'^m'Constructor'^7'with a '^d'Lacerator w/ Plasma Launcher'^7" "ALT" "default" // oppressor bind "5" "clientTeam Strogg; clientClass Oppressor 0;wait;kill;sayTeam '^7'Respawning as an'^m'Oppressor'^7'with a '^d'Lacerator'^7." "ALT" "default" // infiltrator bind "z" "clientTeam Strogg; clientClass Infiltrator 0;wait;kill;sayTeam '^7'Respawning as an'^m'Infiltrator'^7'with an'^d'Accurized Lacerator'^7" "ALT" "default" bind "x" "clientTeam Strogg; clientClass Infiltrator 1;wait;kill;sayTeam '^7'Respawning as an'^m'Infiltrator'^7'with a'^d'Railgun'^7" "ALT" "default" // Automated responses quick-keyed // // http://4newbies.planetwolfenstein.gamespy.com/ETQW/vsay.php // Global Replies / End Games bind "HOME" "clientquickchat quickchat/global/yes" "" "default" bind "END" "clientquickchat quickchat/global/no" "" "default" bind "INS" "clientquickchat quickchat/global/taunts/owned" "" "default" bind "PGUP" "clientquickchat quickchat/global/taunts/meh" "" "defaults" //broke bind "DEL" "clientquickchat quickchat/global/cheers/goodgame" "" "default" bind "PGDN" "clientquickchat quickchat/global/cheers/wellplayed" "" "default" bind "UPARROW" "clientquickchat quickchat/global/hi" "" "defaults" //bind "DOWNARROW" "clientquickchat quickchat/global/sorry" "" "defaults" bind "LEFTARROW" "clientquickchat quickchat/global/sorry" "" "defaults" //bind "RIGHTARROW" // Team Replies //bind "KP_NUMLOCK" bind "KP_SLASH" "clientquickchat quickchat/responses/onit" "" "default" bind "KP_STAR" "clientquickchat quickchat/responses/sorry" "" "default" bind "KP_MINUS" "clientquickchat quickchat/responses/thanks" "" "default" bind "KP_HOME" "clientquickchat quickchat/need/team/medic" "" "default" bind "KP_UPARROW" "clientquickchat quickchat/need/engineer" "" "default" bind "KP_PGUP" "clientquickchat quickchat/need/team/covertops" "" "default" bind "KP_LEFTARROW" "clientquickchat quickchat/need/team/radar" "" "default" bind "KP_5" "clientquickchat quickchat/need/team/apt" "" "default" bind "KP_RIGHTARROW" "clientquickchat quickchat/need/team/avt" "" "default" bind "KP_PLUS" "clientquickchat quickchat/need/medic" "" "default" bind "KP_END" "clientquickchat quickchat/enemy/indisguise" "" "default" bind "KP_DOWNARROW" "clientquickchat quickchat/enemy/deployables/aptspotted" "" "default" bind "KP_PGDN" "clientquickchat quickchat/enemy/deployables/avtspotted" "" "default" bind "KP_INS" "clientquickchat quickchat/commands/captureforwardspawn" "" "default" bind "KP_DEL" "clientquickchat quickchat/self/disguise/enemydisguisedasme" "" "default" // State Class // bind "KP_ENTER" "clientquickchat quickchat/self/imsoldier" "" "soldier" bind "KP_ENTER" "clientquickchat quickchat/self/immedic" "" "medic" bind "KP_ENTER" "clientquickchat quickchat/self/imengineer" "" "engineer" bind "KP_ENTER" "clientquickchat quickchat/self/imcovertops" "" "covertops" bind "KP_ENTER" "clientquickchat quickchat/self/imfieldops" "" "fieldops" bind "KP_ENTER" "clientquickchat quickchat/self/imaggressor" "" "aggressor" bind "KP_ENTER" "clientquickchat quickchat/self/imtechnician" "" "technician" bind "KP_ENTER" "clientquickchat quickchat/self/imconstructor" "" "constructor" bind "KP_ENTER" "clientquickchat quickchat/self/imoppressor" "" "oppressor" bind "KP_ENTER" "clientquickchat quickchat/self/iminfiltrator" "" "infiltrator"

July 9, 2009 :: WI, USA  

July 8, 2009

Daniel Robbins

Funtoo-dev Mailing List - Initscripts

Funtoo now has a Google Groups mailing list called funtoo-dev, which can be used for Funtoo discussion, patch submissions or bug reports.

On the list, I've posted an overview of upcoming planned changes to Funtoo's init scripts. With dhcpcd-5, all that will be required to configure a new Funtoo install for wired DHCP ethernet is:

# rc-update add dhcpcd default
# rc

Pretty nice!

I'm looking for feedback on the new initscript plan. Please feel free to post feedback here as well as on the mailing list. Talk to you soon!

July 8, 2009

Dan Ballard

Much needed server maintenance

I've finally gotten around to some long overdue server maintenance on Kvasir (mindstab.net et all). This is where running a Gentoo server can kind of be fun. I can mostly ignore it for ages, just poking at it when a GLSA (Gentoo security advisement) comes out for software it's running, and then when I feel like sitting down to it, I can upgrade all the software it's running to the latest stable versions.

The difference in comparison to other distros is of course that you are always current with their stable, but their stable can only stay current so long before they have to release a new version or else everything will break on some upgrades. In Gentoo they give you the tools to deal with it and pass the breakage onto you. So I upgrade slowly and cautiously and then fix a few things when config files change or libraries change and more things need to be recompiled, but it works. I installed Gentoo on this server 4 or 5 years ago and look, it's still going and running all new software. I think that's pretty cool.

And to top off the changes, I finally got around to installing a "new" 512MB ram stick in the server as well, now doubling its ram to 1GB. Which is cool, and just in time because the new clamav is eating RAM like candy. I'm actually wondering if something is wrong with it because it's really eating ram...

Ah well, anyways, the server got some well needed love and attention and is feeling much better.

July 8, 2009 :: British Columbia, Canada  

George Kargiotakis

Vodafone, Cosmote 3G on Linux (wvdial and umtsmon)

The following configs can be used when you have either Vodafone Mobile Internet or Cosmote Internet on the Go or both 3G USB sticks and you want to connect to the 3G Internet (in Greece) while using Linux. I’ll provide two ways to connect to 3G, the command line way using wvdial and the GUI way using umtsmon.

1) Using wvdial
Create /etc/wvdial.conf:

[Dialer Defaults]
New PPPD = yes
Dial Command = ATDT
Dial Attempts = 1
Modem = /dev/ttyUSB0
Modem Type = Analog Modem
ISDN = 0
Baud = 460800
Username = user
Password = pass
Init1 = ATZ
Init2 = AT&F E1 V1 X1 &D2 &C1 S
[Dialer cosmote]
Phone = *99#
Stupid Mode = 1
Init3 = AT+CGDCONT=1,"IP","internet"
[Dialer vodafone]
Phone = *99#
Stupid Mode = 1
Init3 = AT+CGDCONT=1,"IP","internet"
[Dialer vfPIN]
Init4 = AT+CPIN=1234
[Dialer cmPIN]
Init4 = AT+CPIN=5678

WARNING: You HAVE to change the PINs on the last part of the config

To connect to Cosmote, plug in the usb stick:

# wvdial cmPIN
# wvdial cosmote

To connect to Vodafone, plug in the usb stick:

# wvdial vfPIN
# wvdial vodafone

2) Using umtsmon
Connection->Manage Profiles and create the necessary profiles with settings that look like these:
umtsmon
Username and Password does not really matter. Enter something like User/Pass or Username/Password.

Both versions tested on Debian and Gentoo and they are working just fine.

If someone has the Wind ADSM settings please provide them as a comment so I can complete the post with all three Greek 3G providers.

References: List of AT commands

July 8, 2009 :: Greece  

Ciaran McCreesh

Paludis 0.38.0 Released


Paludis 0.38.0 has been released:

  • The =...* dependency operator in configuration files and command-line arguments now matches component-wise rather than character-wise.
  • Support for EAPI 3 is present and used during tests but excluded from the install target.
Posted in eapi 3, paludis releases Tagged: paludis

July 8, 2009

Dion Moult

The Google Operating System – Chrome.

Read Google’s original blog post about it.

That’s right, my conspiracy theory about Google (orignally posted a good month back) has come true, and it’s going to be out there around late 2010.

Brief summary: Google is making an operating system (Linux-based too) with help from the open-source community that focuses on getting the user online and into a browser as quick as possible. The browser is now the ultimate tool on the system. It is currently mainly meant for stuff like netbooks (note this is a separate project from Google Android) but will apparently also be able to provide a good experience for any desktop setup.

Since it’s too late to grimace at Google during their drawing board sessions, I like to ask myself what would an OS be in a time when many of our activites are web-centric.

Most of the main problems I outlined for Google in my conspiracy theory was how they could convice people to change their workflows. Apparently Google has decided to give them an operating system. This interface can easily be optimised to make it feel natural to shift their workflow completely into what they can do in a browser, some tabs and the new shabang HTML 5 will come with.

I took a look at Moblin, another netbook Linux-based OS – one thing instantly popped through my head: this doesn’t look like any window manager, it looks like a website or single application. Something you might expect similar to MythTV. (If I am wrong please correct me).

The first decision I would make on designing a UI for Google’s purposes is not to have any start menu. Something similar to Apple’s dock with modifications (also with an auto-hide) would be great for optimising screen real estate. I would also integrate what I now see as KDE Plasmoids as part of the entire interface (as in within applications itself too instead of only the desktop shell). I would also ask myself what applications could be and should be replaced by web applications. Such examples are email, document editing, chatting, and social networking. What could not and should not be are graphics and multimedia editors, games, and system management tools. It seems very much now that we can split our activities into 2: if you want to make technology, do it offline. If you want to use technology, do it online.

Personally, I can easily now see how easily I can adapt my workflow to this internet-centric pattern.

What about you? What do you expect from Google’s OS?

Related posts:

  1. Chrome in the Clouds: The Google OS
  2. Beware of Google.
  3. How to install Chromium (Google Chome) on Gentoo Linux

July 8, 2009 :: Malaysia  

July 7, 2009

Sean Potter

Server and Linux

I'm finally getting around to rebuilding my server. I've got an Intel Q6600 CPU, 8gb of ddr3 ram, and five 160gb hard drives for a raid5 array. On top of that, I have two tv tuners if I set up a MythTV server.

At the moment, I haven't decided on a distro for it. I'm by far the. Most familiar with Gentoo. However, it has never been the best choice for servers. So I'm more or less between Ubuntu and Debian as final choices. Suggestions are very much welcome.

The server is mostly going to be used for storage purposes, so I'm fairly sure I'm going to rely on ext4 as the filesystem for my raid array. Again, it's still up in the air. Off the top of my head, I don't entirely remember what other services I wanted to run on it... But it isn't a machine I plan to leave on 24/7 for the moment. I'd really like to build a mini-itx Atom machine to take care of email and other network services for my home.

So more updates will come from this in the near future as I finish assembling the machine itself.

July 7, 2009

Nikos Roussos

greek coding camp 2009


hackers in action

diary post for the greek coding camp 2009 that took place at paleochora (chania, crete, greece) for 5 days (4-7 july 2009).

day 1 (4/7)

we reached the island at 5.30 in the morning. we made a stop to enjoy the local hospitality with a rich breakfast and an hour of sleep. we travelled by car (about 1.30h) to the camping (paleochora) and we set up our tents.

first thing to do is share the projects:
- OpenOffice Templates translation
- OpenOffice greek numbered lists
- OpenOffice greek build testing
- Transifex work-flow support
- Letterscript for greek final “s” bug

lunch break with greek mousaka and tsikoudia :D

personally i was more interested on openoffice projects and especially the greek build testing.

day ended with a quick visit at the cold sea and a few glass of wine.

day 2 (5/7)

day started with some network problems. it seems that some lady rested her bag over the router, so it got warm beyond accepted limits :P

two more new guys arrives, so during lunch break we had some great conversations.

after some installation problems we managed to install the latest release candidate on cmpachar’s fedora laptop and on ubuntu virtualbox installation on my netbook. thanx to ntua we had access to a (12g ram, 16 core cpu) fast machine, so we also compiled openoffice straight from the subversion.

day 3 (6/7)

early waking. some of us did a nice conversation about lost and its timeline :D

later we had a sort seminar-like conversation about pgp essentials and gpg usage. just to convince everyone who didn’t have a key to sign ours :P

later at night we visited the near by village and we were enlightened by hoo2 about rubick cube solution mind algorithms.

day 4 (7/7)

day began with openoffice testing again. cmpachar did a great job there.

a new page added to the event wiki, since we managed to convience a young user for the benefits of free software (potato guy really helped on this one).

playing potato guy

highlights: openoffice greek build testing completed for the greek build by cmpachar and me, glezos and alupo completed the transifex task, elias and manolis translated openoffice templates to greek, pantelis and hoo2 almost finished adding usb dsl modems support at the network manager.

totally 16 hackers joined the greek coding camp. we had great fun, combining swimming at the libyan sea and tsikoudia with coding. i hope this will be a new event series in greece, so we can terrorize every greek camping with our geek conversations and habits :D

July 7, 2009 :: Athens, Greece

Dion Moult

A little math probablility problem.

I was originally planning tomorrow to post the new Perspective Magazine for you to ogle at (distribution on Friday!) but I shall delay that and you shall be rewarded for waiting with a PDF you can download of the magazine. Ooh.

Instead tonight I had some free time (because tomorrow I shall be skiving school spending time productively at home) So I decided to look at an NRICH problem. Yes, that’s right. I was so bored I decided to do math. Edit: Apparently I didn’t notice the star rating system so it seems as though I picked an easy one.

Click to see problem: Succession in Randomia

Let’s consider a probability tree:

Diagram2

… OK. The first thing we notice is that it looks prettier. Let’s see the series for B now: 1/4 + 1/16 + 1/64 + … . This is identical to T. We can do the same for L and say we have 2/8 + 2/32 + 2/128 … which is exactly the same as B and T. Plugging it into a/1-r (r being 1/4) we get 1/3 for all three. Hence we can say that in fact it is a completely unbiased way of choosing a successor.

My answer to that question is therefore: “Yeah they have an equal chance

Well, I wasn’t going to stop here. Why don’t I simulate it? Here is the coding that simulates the situation (the cheapest brute force technique to tackle the problem):

If you don’t know programming, go take a read through the code anyway and see if you can get a grasp of what’s going on :)

<?php
// The number of times each king as won.
$bingo = 0;
$toto = 0;
$lotto = 0;

// How many times we are going to do the crowning ceremony
$ceremonies = 10000;

// Loop through these instructions to carry out the crowning ceremony.
for ($i = 1; $i < $ceremonies+1; $i++)
{
    $win = FALSE; # Nobody has become king yet.
    $oddeven = 1; # Because the first throw is odd. Assume 1 = odd, 0 = even.
    $firsttoss = TRUE; # We are tossing for the first time.

    // This variable is used later to determine which variable $x or $y is
    // reassigned a value and which keeps the previous toss value.
    $a = 0;

    // Keep on tossing the coins until somebody wins the kingdom.
    while ($win == FALSE)
    {
        // Here we only flip one coin, this will alternate between $x and $y.
        // The one ($x or $y) that isn't assigned a new value will retain the
        // previous toss value so we can find out whether or not we have got
        // two HH or TT in a row.
        // Assume H = 1, T = 2
        if ($a == 0) {
            $x = rand(1,2);
            $a = $a + 1;
        } elseif ($a > 0) {
            $y = rand(1,2);
            $a = 0;
        }

        if ($firsttoss == TRUE) {
            // Nobody can win on the first toss.
            $firsttoss = FALSE;
        } else {
            // If it is HH and ODD...
            if ($x == 1 && $y == 1 && $oddeven == 1) {
                // Lotto will become King.
                $lotto = $lotto + 1;

                // Somebody has won the Kingdom.
                $win = TRUE;
            }

            // If it is TT and ODD...
            if ($x == 2 && $y == 2 && $oddeven == 1) {
                // Lotto will become King.
                $lotto = $lotto + 1;

                // Somebody has won the Kingdom.
                $win = TRUE;
            }

            // If it is HH and EVEN...
            if ($x == 1 && $y == 1 && $oddeven == 0) {
                // Bingo will become King.
                $bingo = $bingo + 1;

                // Somebody has won the Kingdom.
                $win = TRUE;
            }

            // If it is TT and EVEN...
            if ($x == 2 && $y == 2 && $oddeven == 0) {
                // Toto will become King.
                $toto = $toto + 1;

                // Somebody has won the Kingdom.
                $win = TRUE;
            }
        }

        // ... If nobody has won anything ...
        if ($win != TRUE) {
            // We flip again, so Odd->Even or Even->Odd.
            if ($oddeven == 0) {
                $oddeven = 1;
            } else {
                $oddeven = 0;
            }
        }
    }
}

// Tell the computer to print out what results we have.
echo 'Bingo: '. $bingo .'<br />';
echo 'Toto: '. $toto .'<br />';
echo 'Lotto: '. $lotto .'<br />';
?>

I ran it and here is an example result I get. Out of 10,000 ceremonies, this is the number of times each king has won:

Bingo: 3322
Toto: 3340
Lotto: 3338

Pretty close, eh?

No related posts.

July 7, 2009 :: Malaysia  

Roderick B. Greening

usb-creator-kde - available for testing

So, I meant to post this up a couple of weeks ago... better late than never.

I have posted an early beta copy of usb-creator package in my PPA. It contains packages for both the gtk and kde front-ends and a common package, which contains the back-end, and some other common bits.

If you are interested in trialing the beta, feel free to download the debs or add my PPA to your sources.list (if you add it to your list, please read the warning on my PPA page).

To get the files, navigate here.

Here are some screenshots showing the kde front-end in action. Enjoy!







July 7, 2009 :: NL, Canada  

July 6, 2009

Brian Carper

Tokyo Cabinet, Engage

I posted recently about being dissatisfied with how my blog was playing with MySQL. I was going to try for some kind of file-based storage, but in the end I decided to go with Tokyo Cabinet, which is a very lightweight key/value store.

This simplifies a lot of code, because a blog is pretty much one list of objects (posts) with a bunch of sub-objects (tags, categories, comments). An SQL DB is made for independent objects that are related to each other via keys. So storing a post means deconstructing it into its parts and stuffing all the parts into their own tables, and fetching a post means fetching all the parts and putting it back together. A bit of a bother.

With a key/value store, a post is a hashmap, and it has sub-lists of comments and tags etc., and you serialize the whole thing and stuff it into the DB; when fetching you un-serialize it and you're good. Clojure being a Lisp, there's already a nice serialization format (s-expressions), so there's hardly any work to be done.

I'll give it a few days and if everything actually works, I'll push the code to github. The code is still pretty nasty and ad-hoc; I did this rewrite in the matter of a couple of hours on a weekend. But parts of it may be useful to someone.

I also plan to do some kind of simplified "How to make a blog in Clojure" tutorial in the near future. The code for this blog is bloated with a lot of functionality that is pretty specific to my site and that most people don't need. A more to-the-point tutorial would probably be more helpful.

July 6, 2009 :: Pennsylvania, USA  

July 5, 2009

Daniel Robbins

Apache/Slowloris DOS Mitigation Guide

My friend Ryan Vick and I just finished up our Slowloris DOS Mitigiation Guide. We hope you find it useful. We detail various ways to protect against the Slowloris DOS, and have a few surprises along the way. Give it a read and let us know what you think!

Covered in the article: anti-slowloris.diff, iptables connlimit, proper hardware load balancer configuration, Cherokee web config

July 5, 2009

July 4, 2009

Dan Ballard

cl-pack 0.1.1

I've released cl-pack 0.1.1. Just a few code improvements suggested by Zach. This is just light stuff, some slight tweeks to be more in line with lisp standards and a few small speed up using native functions I didn't know about instead of my own code.

He'd suggested some more radical changes too, the biggest being to turn the two pack/unpack case statements into macro-foo so that I could just go

 
(define-directive #\i ...)
 

all on its own. I gave it a good try and pretty much got it working, but it unfortunately spits out about 125 style warnings, increased the code by about 100 lines or ~ 20% and I'm not sure in the end if it really was any clearer, so I scrapped that for now and am just releasing the basic easy changes and moving onto a few more features.

The planned release will be hopefully something like a few more features for 0.2.0 and then if nothing explodes, release it as 1.0 and cl-pack should be done-ish.

July 4, 2009 :: British Columbia, Canada  

Roy Marples

On the importance of MTU

So, I'm now finally natviely IPv6 enabled :)

This led to an  interesting debtate about my internet connection. In a nutshell my  Drayetk Vigor 100 is broken, but apparently by design. The problem is this - for IPv4 goes through my NAT whose public IP has an MTU of 1492 so Path MTU Discovery works fine. However IPv6 does not need NAT and the PPPoE interface does not have a public IPv6 and nor do the internal clients use it even it there was one. So the path MTU is 1500, which is too big for the PPPoE to handle.

The correct solution is to obviously terminate the IPv6 on a PPPoA connection, but only the  Cisco 877 router does this and that's outside of my price range, even on eBay. One solution is to clamp the MSS on the router to 1430 so that all clients work. But this is a hack. The best solution with my hardware is to force the MTU to 1492 for all nodes inside my network, so they share the same MTU as the PPPoE so that Path MTU Discovery works.

You can see this working for yourself on IPv6 now, as this site is IPv6 enabled and sits behind the PPPoE link. You'll need to query IPv4 servers for the address though as I don't yet have a glue record for IPv6, but as I'm changing registrar that should change in a few weeks :)

Because of this, I've made the dhcpcd default to request and use the MTU value if offered by the DHCP server. You'll be seeing this in dhcpcd-5.0.5 (now out). dhcpcd-5.0.6 will feature restoring the MTU correctly between leases.

July 4, 2009

Dan Fego

Auto-detecting a USB Headset

After a lot of trial and error today, I’ve still only gotten part of the way to my objective: making my new Plantronics USB headset get auto-detected in Gentoo, and make it my “primary” ALSA device. That is, when it’s plugged in, all audio goes to it, and when it’s not, all audio goes to the speakers. Much, much easier said than done.

The first hurdle was coming to the realization that ALSA in fact sees this headset as its own sound card. Once I got that far (it took me a while, with some help on IRC), all I needed in the end was 4 additional lines in my /etc/modprobe.d/alsa file:

alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd-hda-intel index=1

alias snd-card-1 snd-usb-audio
alias sound-slot-1 snd-usb-audio
options snd-usb-audio index=0

The first 2 lines were already there, and then I added the two lines about snd-card-1 and sound-slot-1. Easy enough. The other two lines (not counting the whitespace) are to tell the system what order they go in. 0 is primary, 1 is second, etc. So by having index=0 for snd-usb-audio, that device is my first card, and the on-board is my second. Easy enough. I kept getting fouled up in testing my various configs by not actually removing the modules; I was just restarting ALSA. Not good. Once I got that config working, I wrote a couple of bash scripts to flip those variables, update the configs, etc. Here's my "on" script:

#!/bin/bash
# Script to swtich around audio devices when headset plugged in
if ( grep -q "options snd-usb-audio index=0" /etc/modprobe.d/alsa )
then
echo "Exiting..."
exit 1
fi

sed -i '/options snd-hda-intel/ s/0/1/' /etc/modprobe.d/alsa
sed -i '/options snd-usb-audio/ s/1/0/' /etc/modprobe.d/alsa
update-modules -f
/etc/init.d/alsasound stop
sleep 0.5
modprobe -r snd-usb-audio
modprobe -r snd-hda-intel
/etc/init.d/alsasound start
sleep 0.5
/etc/init.d/mpd start

It's simple enough, in retrospect, and it works. The "off" script is identical except it does the reverse flip at the beginning. I could have made it one script, but whatever.

The next step was to make this all happen automatically. That's where I'm stuck. I've been tinkering with udev for hours now, and I can't seem to write the rules right. My current rules look like this:

ATTRS{id}=="U0x47f0xc001", ACTION=="add", RUN+="/home/dfego/bin/udev-headset-on.sh", ENV{IS_PLANTRON}="yes"
ENV{IS_PLANTRON}=="yes", ACTION=="remove", RUN+="/home/dfego/bin/udev-headset-off.sh"

I don't even remember now if this particular "add" works, but some of the ones I wrote today did. However, not one, not a single one of my "remove" lines worked. All day. None of them. It's almost depressing. For some God-forsaken reason, I can't make anything trigger on a remove event. So I tried using a single script and having it go on all events, but that fell on its face because udev insists on running it lots and lots of times every time an event happens, even when I built protections into the script that it couldn't run more than once simultaneously. So I don't know what to do. For now, I'm just going to be happy with what I've done and use the script. It's not like I plug my headset in and out all that often (except, of course, today). But I feel sad and defeated, and very much like I wasted a ton of time doing something that doesn't work for some reason beyond my comprehension. It should work... it just doesn't.

Maybe I'll try again one of these days. Maybe not.

July 4, 2009 :: USA  

July 3, 2009

Steven Oliver

AUTO_INCREMENT Part 2


Back in June I discussed how Oracle databases don’t have an AUTO_INCREMENT type. In the process of this discussion I showed a way around this. While I like this method in certain situations, in others it has several flaws that really bug me. First off and foremost if you are using your table as a log tracking the progress of a process than you’ll have to reset the sequence every time you restart the process. Well, I guess that assumes you, like myself, truncate or delete * from that table every time you run the process. Either way, I think that should be an unnecessary step. It’s sort of like having an UPDATED_ON column and actually feeding it the SYSDATE every time you do an insert. Why not just set DEFAULT SYSDATE when you create the table?

Now my second method for replacing the AUTO_INCREMENT type has it’s flaws as well, but it works quite well for the log style table I described above. This time we won’t use a SEQUENCE at all though. Instead we’ll simply use the rowcount(*).

CREATE OR REPLACE TRIGGER state_trg
BEFORE INSERT
ON scheme.state_table
FOR EACH ROW
BEGIN
SELECT rowcount(*)+1 INTO :NEW.column_pk FROM state_table;
END;

Now before you go crazy and start adding this to all kinds of tables be careful, this method isn’t perfect either. First if you ever delete from the table without truncating or deleting * you’ll (hopefully) get a unique constraint violation error. Hopefully why will be obvious. Again, the code has it’s uses, it’s up to you decide when and where it’s a good or bad idea.

Enjoy the Penguins!

July 3, 2009 :: West Virginia, USA  

Paulo Roberto

HOWTO – Servidor DAAP no FreeBSD

O Firefly (antigo mt-daapd) é uma implementação DAAP (Digital Audio Access Protocol) que é o protocolo utilizado pelo iTunes para compartilhar as bibliotecas de audio na rede. É compativel com iTunes no Windows e no Mac OS X assim como players compativeis com DAAP como o Amarok. Portanto é uma boa idéia manter um repositório de mídia centralizado em um servidor na rede.

A homepage do projeto é http://www.fireflymediaserver.org/. Além de servidor DAAP o Firefly provê mais alguns goodies. Vale a pena checar.

Instalação:

A instalação no FreeBSD é bastante simples. Considerando que voce tenha o ports (e saiba usa-lo) apenas instale-o a partir de /usr/ports/audio/firefly. Não há qualquer problema em manter os padrões sugeridos para as dependencias.

Configuração:

Adicione “firefly_enable=”YES” e edite o arquivo de configuração /usr/local/etc/mt-daapd.conf. Lembre-se de criar as pastas usadas para a database e certificar-se de que pertencem ao usuário daapd. Inicie o serviço via /usr/local/etc/rc.d/mt-daapd start. As configurações e atualizações manuais da biblioteca de midia podem ser manipulados pela interface web http://<server>:3689.

O firefly se anuncia na rede utilizando o Bonjour da Apple e pode conflitar com o Avahi.

Se voce completou os passos descritos acima com sucesso, poderá visualizar sua biblioteca de audio nos computadores de sua rede local através do iTunes ou Amarok.

July 3, 2009 :: Brazil  

Dion Moult

Blender 2.5 Features Video

blender2.5-dev1Hello everybody, I’m back from my 5 day jungle trek and I’m just catching up on what I’ve missed throughout the week. I was initially going to award you all with a post about the trek itself, but it turns out Jonathan Williamson from Montage Studio (the very same who does the Blender screencasts and gave some good tips for ThoughtScore) has got himself a Blender build for Windows 7 and has recorded a short screencast demo-ing the development.

I am truly amazed with what has been going on and I will definitely throw myself back into Blender this holiday and its stuff like this that really shows what open-source is capable of. Blender is one serious threat to the huge commercial monopoly in the 3D industry. Here is a short list of the features he describes:

  • New design/look
  • Panel splitting/deleting/management
  • Not limited to one window only
  • Massive reorganisation of features that make it more intuitive
  • Real-time playback animation while editing
  • Real-time playback animation while rendering
  • Every single value in Blender can now be animated
  • Support for macro options
  • New transform panel
  • Search option for features

Without further ado:

Clicky here to watch the video.

Related posts:

  1. The Blender Model Repository and BlenderNation: open-source merger?
  2. Blender 3D: Architecture, Buildings and Scenery – Review
  3. Blender Suzanne Awards announced.

July 3, 2009 :: Malaysia  

Iain Buchanan

The Twouble with Tcl

From time to time I do a bit of tcl. Mostly as maintenance for existing tcl programs. I haven't made up my mind entirely about it yet - I've seen some very powerful programs in tcl, and yet occasionally I'm still "surprised" by a feature.

I spent a couple of hours today trying to figure out why a tcl program of mine wasn't running, and so I've made some notes:

Real languages don't have reserved words


In tcl, you can redifine parts of the language in tcl itself. For example if you wanted to redefine if, just write a new function:
proc if {cond expres} {
puts "cond is $cond"
puts "expr is $expres"
}

set a 1
if {$a == 1} {
puts hello
}
Sounds neat. In fact proc itself is just a command that takes 3 arguements (name, arguements, and body). However, don't start using simple names in your tcl languages like this:
proc open {} {
set ::alarm_socket [open_socket $::options(-alarm_host)]

foreach host $::options(-hosts) {
verbose "open $host"
set ::sockets($host) [open_socket $host]
# set up an event handler for when data is readable on this socket:
fileevent $::sockets($host) readable [list process $host]
# initialise socket timeout with open time
set ::socket_t($host) [clock seconds]
}
}
Because open is what you might call a reserved word. (I should have known with open, but should I really have to remember all the reserved words?)

The error looked something like this:
$ ./test.tcl
invalid command name "::tcl::tm::UnknownHandler"
while executing
"::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4"
("package unknown" script)
invoked from within
"package require msgcat 1.4"
("uplevel" body line 2)
invoked from within
"uplevel \#0 {
package require msgcat 1.4
if { $::tcl_platform(platform) eq {windows} } {
if { [catch { package require registry 1.1 }] } {
..."
(file "/usr/lib/tcl8.5/clock.tcl" line 23)
invoked from within
"source -encoding utf-8 [file join $TclLibDir clock.tcl]"
(procedure "::tcl::clock::format" line 3)
invoked from within
"clock format [clock seconds]"
(procedure "alarm_timeouts" line 3)
invoked from within
... and so on. Yeuch! And it was encountered with this one line:
   puts "$::argv0: [clock format [clock seconds]]"
The problem? I redefined open, which was used internally by clock.

Real languages don't have types:


You can do lots of nice things in tcl without types, in a similar (but different) way to perl.
set a world
puts "Hello $a" ;# prints 'Hello world'
set a 1
incr $a
puts "$a + 2" ;# prints '2 + 2'
This looks normal to someone used to perl and tcl. Noticed how I don't need format specifiers or concat functions. You can also do this:

set a pu
set b ts
$a$b "Hello World"

Which prints:
Hello World

Real languages don't have comments


They have a comment command of course! And the comment command is a command that takes arguments (the comment itself) that aren't evaluated. Except that because of this, you can't have an unmatched brace in a comment:
# if ($sometest) {
$somecode
#}

The tcl solution?
if (0)
blocks or the like...

Conclusion


So if you haven't yet learnt tcl, I encourage you to find a tcl hackers tcl program, and delve into it to see just how it works.

If you try to learn tcl only by writing it and not by reading others' code, then you'll learn tcl with the habits you're used to, and you will possibly miss some of the powerful features.

After all, C programmers can program C in just about any language!

July 3, 2009 :: Australia