Ever since I decided to remove firefox on my desktop, I have had functionality problems since webkitgtk just doesn't like certain sites. Trying to debug whatever the problem is using gdb is not going to work very well. So I am playing the waiting game with webkitgtk. The way I have coped is by using X11 forwarding over ssh onto my desktop from my laptop with firefox. Now, it can't do flash very quickly, but I can go to my laptop for videos and such. It's just when I need the Internet that I can't keep turning to it (it's behind me).
Today, five times in a row, firefox crashed on me. So I compiled a debugging version of firefox. Maybe I can start actually being useful instead of complaining to the wall. Maybe not. But at least I extended a package for my distro that I might submit later.
I'm also starting on a python project. I want to make a database system. This is strictly a project for my own personal amusement to understand databases. And to learn python. Mostly learn python. So far I finally wrote a function to separate a row by a delimiter. That's probably more than I've done for the past month.
Thursday, December 17, 2009
Friday, November 27, 2009
The problem with software in general
Okay, so earlier last week I was having a lot of trouble with firefox. I am a really lazy bastard, so I did the wrong thing. I didn't try to find the source of the problem with the development team. I deleted and exiled firefox from my system for a week, but now it's looking to be very permanent.
A few issues I have with firefox. First, it's bloated. I have a thing in general against bloated software unless that bloat isn't apparent, or if I am starting off with other packages in the general field. Back when I had Windows, firefox was not. I started off around the beginnings of version 2, and it flew on my Pentium 4 processor, clocked at 2.4GHz. It was much faster than the Internet Explorer, which I switched from. Not a problem, until now.
Well, firefox gradually became more and more slow, and I liked it less and less. First, they added features in firefox 3 that I wasn't crazy about, and I had to add plug-ins to remove something that wasn't in the code before, as well as change a couple of obscure configuration variables! Namely speaking, it was the 'smart search' feature. There are two reasons I don't like it. First, it took up two lines instead of one, which made it harder for me to glance through the list of urls and pick the website I wanted. Second, I already new the /exact/ url I wanted, so the search feature that searched anywhere within the title/URL was stupid to me. If I wanted to search for something, I always googled it. I'll admit, the addition of being able to use `google foo' was accepted, but I'd rather trash that feature than have the other two annoyances tacked on.
Why is it that version 2 of firefox flew, but now firefox seems to require a multi-core? firefox flies on my new laptop with a Dual-Core T4200 @ 2.0Ghz. My philosophy is that software should not need to require more excessive resources in order to function properly, but merely use them if they can and not out of need.
This is the reason I changed from firefox to uzbl.
uzbl is a very minimalist web browser, and its tagline is "Uzbl follows the UNIX philosophy". I find this true. Now, it may not adhere to strict definitions (or maybe it does, and my ignorance is talking), but I find this to be highly true. Its utilization of text streams for near everything makes it much closer to a unix philosophy than almost every web browser out there today will ever hope. It's highly configurable, and I give it a recommendation to anyone who doesn't like bloat. For most, it will be a novelty, but for me, it's productivity.
The nice thing about uzbl is really how its core binary is just a rendering spot for WebkitGTK and it uses other minimal libraries to do very basic things like just get the pages. Its magic lies within text streams. It makes heavy uses of pipes and sockets, and it strings together either scripts to make things work or applications to make things work more easily. For example, the defaul download script had a basic amount of functionality (just save the binary to the home directory). I wanted just a bit more. So, now I tooled it to notify me with the stock notify-send binary from libnotify and save to a different directory. That's all the functionality I need. If I wanted more, I'd have to make my own program, and I might do it so I can save under different directories.
Now, there are some pitfalls. It isn't the glorious end-all browser, yet. It is still in its alpha stages. Its configurability is somewhat limited, as I have found so far. And it inherits the bugs from Webkit, which I can't get the debugging binary to compile, and fairly limits what I can debug on Webkit. Since I always plan to have my laptop with me at home, I can just use firefox on it. It gives me an incentive to make the netfifo script I'm working on, as well, so I can quickly copy urls and text files over the network.
I'll post that up once I'm done. I keep getting sidetracked on working on the script with my Python book. And that gets sidetracked by Reddit ^_^
A few issues I have with firefox. First, it's bloated. I have a thing in general against bloated software unless that bloat isn't apparent, or if I am starting off with other packages in the general field. Back when I had Windows, firefox was not. I started off around the beginnings of version 2, and it flew on my Pentium 4 processor, clocked at 2.4GHz. It was much faster than the Internet Explorer, which I switched from. Not a problem, until now.
Well, firefox gradually became more and more slow, and I liked it less and less. First, they added features in firefox 3 that I wasn't crazy about, and I had to add plug-ins to remove something that wasn't in the code before, as well as change a couple of obscure configuration variables! Namely speaking, it was the 'smart search' feature. There are two reasons I don't like it. First, it took up two lines instead of one, which made it harder for me to glance through the list of urls and pick the website I wanted. Second, I already new the /exact/ url I wanted, so the search feature that searched anywhere within the title/URL was stupid to me. If I wanted to search for something, I always googled it. I'll admit, the addition of being able to use `google foo' was accepted, but I'd rather trash that feature than have the other two annoyances tacked on.
Why is it that version 2 of firefox flew, but now firefox seems to require a multi-core? firefox flies on my new laptop with a Dual-Core T4200 @ 2.0Ghz. My philosophy is that software should not need to require more excessive resources in order to function properly, but merely use them if they can and not out of need.
This is the reason I changed from firefox to uzbl.
uzbl is a very minimalist web browser, and its tagline is "Uzbl follows the UNIX philosophy". I find this true. Now, it may not adhere to strict definitions (or maybe it does, and my ignorance is talking), but I find this to be highly true. Its utilization of text streams for near everything makes it much closer to a unix philosophy than almost every web browser out there today will ever hope. It's highly configurable, and I give it a recommendation to anyone who doesn't like bloat. For most, it will be a novelty, but for me, it's productivity.
The nice thing about uzbl is really how its core binary is just a rendering spot for WebkitGTK and it uses other minimal libraries to do very basic things like just get the pages. Its magic lies within text streams. It makes heavy uses of pipes and sockets, and it strings together either scripts to make things work or applications to make things work more easily. For example, the defaul download script had a basic amount of functionality (just save the binary to the home directory). I wanted just a bit more. So, now I tooled it to notify me with the stock notify-send binary from libnotify and save to a different directory. That's all the functionality I need. If I wanted more, I'd have to make my own program, and I might do it so I can save under different directories.
Now, there are some pitfalls. It isn't the glorious end-all browser, yet. It is still in its alpha stages. Its configurability is somewhat limited, as I have found so far. And it inherits the bugs from Webkit, which I can't get the debugging binary to compile, and fairly limits what I can debug on Webkit. Since I always plan to have my laptop with me at home, I can just use firefox on it. It gives me an incentive to make the netfifo script I'm working on, as well, so I can quickly copy urls and text files over the network.
I'll post that up once I'm done. I keep getting sidetracked on working on the script with my Python book. And that gets sidetracked by Reddit ^_^
Saturday, November 21, 2009
Learning Python
I'm using the book Learning Python by Mark Lutz through O'Reilly to learn Python. I give it a recommendation for starting out in programming in general. Alas, I have not had the experience of programming well in anything more than most scripting languages, so I do not know how it fares as a general language introduction vs. a more reference-style book.
So far, studying Python has taught me how to make code reusable very well. Code reusability is obvious, yes, but I was never sure of the extent to which it should be done. Combined with my Intro to CS course, I've been advancing farther than I've ever gotten. The Python is still an individual study thing that I'm doing, and it will be especially helpful before I hit Java programming next semester.
So far, studying Python has taught me how to make code reusable very well. Code reusability is obvious, yes, but I was never sure of the extent to which it should be done. Combined with my Intro to CS course, I've been advancing farther than I've ever gotten. The Python is still an individual study thing that I'm doing, and it will be especially helpful before I hit Java programming next semester.
dzen_notify.sh script
This is a script I created to notify me of things such as attempts to break into my box with ssh, etc. I have unused screen space where there are no toolbars or windows touching, so these are the perfect places to put these notifications. They only notify me once.
This script is mostly dependent on metalog, but, with modification, should be able to be used for other tasks. The only reason that it is mostly dependent is that I executed the script using metalog, and so the arguments to the script got a bit jumbled.
For readability, I don't give it a high score. I could also split the socket checking routine into a function of its own for reuse.
The in-script configuration was done on purpose. A simple script like this, in my opinion, hardly deserves an entire configuration file, but I could see splitting the case statements into a separate rules file.
But I do like the idea of socket files, and these are used to their perhaps fullest extent that I could use them.
Pastebin: http://minozake.pastebin.com/f60670c14
Dependencies: bash, dzen2
Note: I didn't bother cleaning this up while posting, so the comments of explaining my thought are still there.
This script is mostly dependent on metalog, but, with modification, should be able to be used for other tasks. The only reason that it is mostly dependent is that I executed the script using metalog, and so the arguments to the script got a bit jumbled.
For readability, I don't give it a high score. I could also split the socket checking routine into a function of its own for reuse.
The in-script configuration was done on purpose. A simple script like this, in my opinion, hardly deserves an entire configuration file, but I could see splitting the case statements into a separate rules file.
But I do like the idea of socket files, and these are used to their perhaps fullest extent that I could use them.
#!/bin/bash
#---
# This script allows dzen_notify to notify of certain things. This was
# currently tooled to use metalog and fluxbox, but can be extended to
# other things. Runs from main(). This accepts three arguments, the
# first one is the title which will create a socket in
# /tmp/dzen_notify.$argument.socket, and the last two arguments are
# descriptions.
#
# This notification is supposed to be small and simple. This was tooled
# to the fact that I had spaces that windows don't touch around my
# screen, so I could use small notifications there. This is why dzen2
# slave windows aren't used.
#
# This accepts three parameters: Description 2, Title, and Description
# 1. This is because metalog passes the paramters as date, program, and
# summary.
#---
export DISPLAY=":0"
#---
#dzen_popup()
# Makes the dzen_popup exist. Different socket names can be matched to
# different configurations.
#
#---
function dzen_popup()
{
local title="$1"
local desc="$2 $3"
#Define some default values...
local fg='-fg grey80'
local bg='-bg darkred'
local fn='-fn fixed' #font
local w='-w 150' #width
local x='-x 860' #x pos
local y='-y 945' #y pos
local e='-e entertitle=grabmouse,;leavetitle=ungrabmouse;button1=exit:0' #event
local other='-p'
#...overwritten here!
case "$title" in
sshd)x='-x 245'
y='-y 930'
bg="-bg darkred"
fg="-fg grey80";;
clamd)x='-x 400'
y='-y 930'
bg="-bg yellow"
fg="-fg black";;
*fail2ban*)x='-x 555'
y='-y 930'
bg='-bg orange'
fg='-fg black';;
pure-ftpd)x='-x 710'
y='-y 930';;
*)fg='-fg white'
bg='-bg black';;
esac
local options="$fg $bg $fn $w $x $y $e $other"
echo "$title: $desc" | dzen2 $options
#echo $options
#echo $arguments
}
function main()
{
local socket="/tmp/dzen_notify.$1.socket"
local title="$1"
local desc1="$2"
local desc2="$3"
if [ -f $socket ]; then
return 1
else
touch $socket
dzen_popup "$title" "$desc1" "$desc2"
rm $socket
fi
}
main "$2" "$3" "$1"
Pastebin: http://minozake.pastebin.com/f60670c14
Dependencies: bash, dzen2
Note: I didn't bother cleaning this up while posting, so the comments of explaining my thought are still there.
Monday, October 26, 2009
Another first post
So, you can't see the other first posts. This blog has been renamed so many times, but I don't care.
Anyway. I'm minozake. Feminine name, but I'm a guy. My real name is Donald Johnson, and I am a Free Software proponent. I work on the FLOSS project Source Mage GNU/Linux. It's pretty fun, laid back. I am part of the Tome Team which manages the documentation.
I've lately taken up the task of rewriting all of the man-pages because they need it. They are outdated, un-technical, and aren't standardized well. And, since that is something I'd like to see and help other people with, I am rewriting.
It worked fine for the first few days. I was pumping out a man-page one every couple of days. I've done 3 so far and submitted the bugs for them. However, I've dropped off, but hopefully I will get back on track soon. It's a combination of both the fact that troff syntax can kiss my ass and that I've been busy. Hopefully with my new laptop, which has been configured using Source Mage over the past 2.5 days, I can finally do useful things while I'm over at the college.
Overall, I'm thinking I might want to try and take up Python again or struggle with C. I'm weighing Python by that it's touted as simple and it's very readable. I'm weighing C on that it has very simple syntax. I'm probably heading over to Python. I want to make scripts for a very easy-to-use notification binary that has similar options to dzen2, but that it isn't dzen2.
It seems I only like popup notifications if I make them. Maybe it's the fact that I know how to disable them easily. Go figure.
Anyway. I'm minozake. Feminine name, but I'm a guy. My real name is Donald Johnson, and I am a Free Software proponent. I work on the FLOSS project Source Mage GNU/Linux. It's pretty fun, laid back. I am part of the Tome Team which manages the documentation.
I've lately taken up the task of rewriting all of the man-pages because they need it. They are outdated, un-technical, and aren't standardized well. And, since that is something I'd like to see and help other people with, I am rewriting.
It worked fine for the first few days. I was pumping out a man-page one every couple of days. I've done 3 so far and submitted the bugs for them. However, I've dropped off, but hopefully I will get back on track soon. It's a combination of both the fact that troff syntax can kiss my ass and that I've been busy. Hopefully with my new laptop, which has been configured using Source Mage over the past 2.5 days, I can finally do useful things while I'm over at the college.
Overall, I'm thinking I might want to try and take up Python again or struggle with C. I'm weighing Python by that it's touted as simple and it's very readable. I'm weighing C on that it has very simple syntax. I'm probably heading over to Python. I want to make scripts for a very easy-to-use notification binary that has similar options to dzen2, but that it isn't dzen2.
It seems I only like popup notifications if I make them. Maybe it's the fact that I know how to disable them easily. Go figure.
Subscribe to:
Posts (Atom)
