update http://sas-spidey01.livejournal.com/12253.html Vi user how-to
sync my bookmarks
An orange in an apple orchard
update http://sas-spidey01.livejournal.com/12253.html Vi user how-to
sync my bookmarks
Could this bring the power of the command line, to the GUI?
An interesting idea, I wonder how it works from a security and flexibility point of view.
One reason I enjoy the Unix Shell is it is very easy to solve problems with the vast and expandable workbench provided. And to automate various tasks quickly, not to mention many good programs are extensible/scriptable 🙂
The only sad thing for new users of traditional unix-likes is that the interfaces are often different, such as Emacs Lisp Vs Vim Script, Various Shell scripting languages vs DOS/Windows batch files e.t.c. Although most of the best programs I’ve used do run on many different platforms hehe.
Nothing is faster than the speed of light.
To prove this to yourself, try opening the
refrigerator door before the light comes on.
To days date is: Mon Nov 26 04:24:21 UTC 2007
Terry@Dixie$ 4:41
That so reminds me of some thing Lake posted xD
Since KateOS was a tad bit disappointing, I booted back into my PC-BSD v1.4 partition and set out to use Window Maker, by far my favorite window manager. I love the look and feel wmaker has but rarely have used it. The main reason I use PC-BSD, is I don’t want to go through the bother of installing/upgrading KDE, given the time involved…. If I used FreeBSD, I’d probably use Window Maker instead of KDE lol.
Here is some initial work,
PC-BSD v1.4, running Window Maker 0.92.0
I’ve installed docker to gain a system tray, which I have done with Blackbox in the past. And I’ve used wmclock which I find less obstrusive then the wmclockmon program I’ve used in the past. I might experiment with running Window Maker as KDE’s window manager but I don’t mind hacking up my menu hehe.
About 25:17 woth of downloading later I burnt the disk, install went great but Linux hangs during the boot 🙁
I installed KateOS on my laptop using a spare storage partition. It works great aside from not auto-detecting my Atheros based PCMCIA card with the rest of my hardware. The default Desktop Environment is Xfce4, never used any of the Xfce’s but it’s a dandy GTK+ based one. I found it some one suprising that I had to create my own ~/.xinitrc to be able to log in through the GUI but it was as simple as coping roots to my home directory.
Surprisingly with the exception of Live CD’s, I have never had a Linux Distro that just ‘worked’ with my hardware :. I’ve always had to screw with them to get them work, even in Ubuntu when I tested 6.06 to try Gnome. Although I must admit having to rewrite Ubuntu’s /etc/fstab was not as annoying as Debian and NetBSD telling me I have no hard drive xD
FreeBSD has always worked well for me, except on one laptop. Which I could swear should have been marketed as a ‘Wintop’ lol.
Maybe it’s just a strange twist of fate, I generally get along with FreeBSD/OpenBSD more readidly and vice versa in terms of getting things done.
I must admit, I am tempted to either to use OpenBSD (for the first time with X11) or FreeBSD on the new system. Although I could probably roll my own Linux From Scratch but that’s a tad more time consuming !
Well, 10% of download complete in about 2 1/2 hours (two and a half)… Interesting although the download speed is only about 20~28kbyte/sec, it is generating enough network traffic that page loads are very slow, normally I can ping www.google.com and get a response average in the 48-62ms range, and maybe 150ms or so to my primary DNS server set by the ISP.
By contrary, the *US* mirror alone for KateOS pinged at > 400ms and still has a just as bad D/L rate, so since it would mean downloading 3 disks from them as they don’t have a copy of the DVD ISO, there’s no loss by a server from a far off place… But I’ve got to admit, if I had the $6… I would by the bloody disk instead of download it LOL.
As I do with many of my pre-planned operations, I’ve assigned this one a code name: Phoenix. Both because it will be raising an old cannabolized PC out of the ashes; and will probably end up either enflaming my rageometer or proving to be worth the trouble…
Here is part of my ~/phoenix.outline file, I’ve worked out a number of things so far. Software needed on the system once it’s ready op, General goals of the overall plan, changes to Vectra, which PC gets what drive, Suggested file system schemes, estimated the probable cost ($95), since time can only be guessed at I factor that as a level of involvedness it will take to get changes done. I’ve also worked out a strnger concept of what each system will be doing. What follows is the tail end of my outline, pointing out the major placement alternitives. I think points 0 and 2 are best, 0 is annoying but probably the best solution given the terrain, although idea 2 is also a nice idea if I didn’t have a fscking parakeet screaming my head off from morning to just before bed time — No wonder they invented WORK !
Ideas:
| 0/ Remote Workstation {
| | Move either Vectra or Phoenix into my room and set the other up
| | in Vectra's current position (Living Room, my PC desk, lower
| | store point).
| | Set up Phoenix? to make use of xrdp server and access it from
| | Dixie, SAL1600, and also if necessary Josephine.
| | Pro's:
| | | Grants a *decent* working environment from my Desktop
| | | without forcing me to use the Cywgin provided x-server
| | | (also an option here, since it's installed on SAL1600).
| | | And without making me use my laptop for every thing.
| | | Takes best advantage of space, e.g. my Desktop (SAL1600) is
| | | the only place I can actually set up a PC to sit at and
| | | use comfortably, hence why my Laptop (Dixie) has been
| | | such a life saver, because I can sit in bed or at a
| | | regular table -- hole problem could be solved with an
| | | LCD Monitor, which I can't afford... Only have 2 CRT's
| | | in the 19 and 17 or 19 inch range.
| | | Further integrates remote access across the LAN, which
| | | is currently limited to all BSD boxes running OpenSSHs
| | | ssh daemon and all systems having SSH Clients installed.
| | | My Desktop having WinXP MCE's built in RDP capabilities
| | | and all other systems RDP Clients.
| | Con's:
| | | Lack of (me) testing RDP based operations for indented
| | | purposes, also no configuration experience with xrdp.
| | | The 'annoyance' of having to use my Desktop as a client
| | | to access another box for getting work done.
| | | Wireless adaptor must be supported by either Linux or
| | | OpenBSD, which could be a bit *hard* to confirm based on
| | | the local shops generic stockpiles.
| | | Due to the amount of local network traffic, it might be
| | | bet to setup the File Server with the Wireless instead
| | | of the Linux system.
| }
| 1/ Bedroom Work Platform {
| | Set up Phoenix? in my room with Wireless adapter,
| | possibly attempt to cannibalize Vectras CD-ROM drive so
| | that Vectra becomes reliant on Floppy disks only. Wish I
| | had a way to either give all systems a card reader or a
| | floppy drive... Would make life easier!
| | Pro's:
| | | Less disturbing of existing systems then other
| | | ideas.
| | | Gets me further away for
| | | disturbances/distractions
| | | Can use Monitor, Keyboard, and Mouse, as well as
| | | rest of PC physically rather then remotely
| | Con's:
| | | No decent working environment in my room to use
| | | a full size PC without purchasing either an LCD
| | | Monitor or setting up a /or another PC Desk in
| | | my room; I only have the one that SAL1600 and
| | | Vectra are hooked up to.
| | | I can hear my family from at least 10 metres
| | | out side of the building! Let along every where
| | | inside of it.
| | | My laptop might get a lot less use, since most
| | | times I use my laptop it is in my bedroom.
| | | Any possible working environment I could arrange
| | | in my room is likely to be much less then
| | | comfortable for physically sitting at a PC
| | | without buying another PC Desk.
| | | Requires Wifi to be compatible with Linux.
| }
| 2/ Bedroom Game box {
| | Move SAL1600 into my room and swap the Ethernet NIC with
| | the Wireless Adapter.
| | Place Phoenix? in SAL1600's place in the living room
| | Pro's:
| | | Eases shopping for wireless adapter
| | | Moves my Gaming system away from most common
| | | 'interruptions'
| | | Better chance of hearing people on TeamSpeak !
| | | Limits potential for using my laptop less
| | Con's:
| | | No decent working environment in my room to use
| | | a full size PC without purchasing either an LCD
| | | Monitor or setting up a /or another PC Desk in
| | | my room; I only have the one that SAL1600 and
| | | Vectra are hooked up to.
| | | Any possible working environment I could arrange
| | | in my room is likely to be much less then
| | | comfortable for physically sitting at a PC
| | | without buying another PC Desk.
| | | With a work platform placed in the living room
| | | (in SAL1600's place), it would be even *HARDER*
| | | to get freaking work done.
| | | Being in my room on the game box would likely
| | | make it harder for Ma to call me when she needs
| | | things done.
| }
The braces denote folds and the pipes I inserted into the copy/paste so it displays as I see it in my text editor. I’ve configured vim to run a function when ever reading or writing a file with a .outline extension, the function sets settings that I find help write an outline and try to categorize my thoughts more clearly. This is actually how my vimrc file sets different style and other minor options to suit the language I am currently editing, for example a standard tab (visually equal to 8 spaces) when working with C files, and 2 actual spaces for Ruby, e.t.c.
The Pipes or ‘|’ are not really in the file, they just show the tab-deliminated indentation. While I don’t use this when editing source code, I find it works nice for things like this. Normally foldmethod is set to indent, and changed to ‘syntax’ where supported suitably. For outlining, since I didn’t have time to work on a more suitable method of folding, I mearly set it use single braces and fdm=marker; usually it uses 3 braces but I rarely use the marker foldmethod.
Heres my function in vimrc:
function! My_OutlineMode()
setl tabstop=8 shiftwidth=8 noexpandtab
setl listchars =tab:| " Mark t's with |'s
setl list
setl spell
setl autoindent smartindent
setl showmatch matchtime=3
setl matchpairs+=(:),{:},[:],<:>
" Fold by tabs
"setl foldmethod=expr
"setl foldexpr=getline(v:lnum)[0]=="\t"
" Fold by braces
setl foldmethod=marker
setl foldmarker={,}
endfunction
autocmd BufNewFile,BufRead *.outline call My_OutlineMode()
Although it is probably unnecessary on most vim builds but the autocmd should probably be wrapped in an
if has(“autocmd”)
autocmd goes here
endif
hmm, supper time
Since it’s time to plan for a probable addition to my LAN this December/January I want to start planning now.
I have my brothers old Dell 4500 PC on hand, well what is left of it hehe. The Pentium 4 is still there, which should be a Northwood core @ 2.0Ghz but it could possibly be a Willamette with a slower clock-speed, only a successful boot will tell.
Before I can boot her, I need some RAM. So the plan is to buy Ma a pair of 512MB (total 1GB) chips for her PC. And to take her old 2x256MB (total 512MB) for this salvage operation. The PC’s are very close models and as far as I can tell the Mother Boards are the same chipset and as much research as I’ve had time to do shows that I shouldn’t run into an problems here.
The box also needs a Networking card, because even if there was a way to get two 56K Winmodems chained together, I wouldn’t want to LOL. I’m figuring that I’ll try to buy a Wireless adopter or an Ethernet NIC depending on my final plan. One of these computers, my Desktop (SAL1600), File Server (Vectra), or this Dell 4500 I’m repairing will likely go in my bedroom with a Wifi card. While the other remain/swap into place with its/its swapped Ethernet card.
If I can, I’ll probably leave it on 24/7 as a workstation or use it to transition my File Servers OpenBSD install over to better hardware. If I do make use of it as a Work system, I’d like to run GNU/Linux on it, because most of my experience has been with FreeBSD and OpenBSD. The problem with that is there are very few Linux Distros I can stand using…. Ether way I need to start planning and testing for what I’m going to do, and this damn blasted parakeet is not helping with the insensent squaking… After ~8 years or so, you’d think he’d STHU!
The only GNU/Linux distributions that I respect are Debian and Slackware. Debian, can be a bit of a hard case about things but you’ve got to give them credit to sticking to their guns. The differences between Debian’s Iceweasel, Icedove, Iceowl, Iceape and Mozilla’s Firefox, Thunderbird, Sunbird, and the communities SeaMonkey come to mind… Slackware, well hehe enough said. The only problem is they are both more trouble then they are worth in this case, I want to get the system set up but without having to screw with it to much along the way.
Other then Debian and Slackware, the only distro to interest me is Gentoo, I think if I ever put the effort into setting it up, Gentoo and I would get along very well. The only problem is I don’t have time to fiddle with it. I would probably have to go with trying a Stage 1 install, and that is a little time consuming… Hehe.
Other Distros that I have considered are Ubuntu, I’ve tested Ubuntu when it was at 6.06 but I don’t care for it. It is a nice system but I don’t really ‘dig’ it. It’s just not my cup of tea, although it’s what I would recommend to users who just want an easy to use OS, without having to learn more then using Synaptic. One of my reasons for FreeBSD, is I wanted to learn about the underlaying system and it’s complexity, not just write an E-Mail without having to tell it my POP3 server (for which no MUA can do, until they invent mind-reading ones). I have no interest in using Ubuntu on this system unless I *have* to.
The install is likely to be a cross between a server and a desktop as far as software goes, it will include X and a proper development environment either way. My OpenBSD box basically only has what it needs to run the services I use it for by comparison.
Two suggestions that came up were PLD Linux and KateOS, both from Poland. PLD looks like a nice system but not my style. I’m not found of the RPM’s either… KateOS on the other hand is based on Slackware. So far it looks like a very nice system to my tastes, my plan is to test it on my desktop (SAL1600). Because I maintain my ‘gaming’ install of WinXP on it along with a dedicated Linux and BSD partition for testing purposes. I might even use KQEMU if it supports DVD ISO’s.
It looks like a good system for me but no one told me that the Polish and US mirrors download at about 20~26kb/sec !!! Since I’d want at least 2 or 3 of the 3 CD sets… I figured I would get the DVD since I don’t want to test the minimal install. There are also 2 ‘extension’ disks, one for GNOME and one for KDE so one can skip installing them over the Internet. It’s looking like an 11 hour download for my initial testing…. Joy.
I need to get to work on the planning for when I’ll need to get the system working, so while KateOS 3.6 downloads I may as well get cracking, current factors are:
location
use/purpose
software
hardware
management
cost
time
I’ve yet to think of any thing else I need to do yet, the biggest issue is going to be location, most importantly what systems physically go where. And which system will be doing what.
Managed to get some nice time off today, read some of the library books, watched Tron, Ghost Busters I, and Spaced Invaders, but most of all got to relax. I’ve also placed my VIMRC file into a cvs repository on my OpenBSD box, that should make syncing changes with my Desktop/Laptop easier, plus allow me to see what I’ve changed hehe.
Had an interesting idea and started playing with some Ruby today also.
Normally when I start a new program I make a new directory in ~/code/Lang/src/ and copy a template makefile over from ../../makefiles/ and edit it to my needs. In one of the library books, I found a GNU Makefile that essentially automates building a C/C++ program where by all C/C++ source files (subject to make handling the dependencies) are compiled into corresponding files and get linked together into the binary, nice little thing when you look at it. With a little tinkering it could probably be made semi-language independent but I don’t really have time to dig into GNU Make’s syntax and features to do that.
I’ve basically written makefiles in the past that should work with just about any ol’make program. For much the same reason I write shell scripts that should run on most any /bin/sh, because I don’t want to edit the freaking thing if I ever meet a Unix like OS it won’t run on lool.
The idea I had was a enlazynating program that by knowing a fair bit about a given languages normal build process (such as C, C++, and Java), it could then automate the process of building it without having to generate a makefile, kind of like a ‘smart-makefile’ of sorts. I’ve got a alias set in my shell so that gcc is called on the command line with my usual settings. I also tend to include a few more once the things done.
It’s probably a stupid idea to do this, a decent BSD or GNU Makefile would likely serve much better (and be worth the learning of each ones extensions to make). But I rather like to be able to just ‘have fun’ playing with and testing stuff.
Right now, it seems to be able to handle a simple compile/link of files in one directory but needs some work to properly link files in subdir’s, lots of other stuff to do. But working on it has been a good way to pass the time.
Currently I classify this as a toy rather then a program for serious usage. But if I ever finish it, I might use it just for the sake of keeping a fairly fast build/test cycle.
If I could, I would’ve made a machine to manage VHS-Tape/DVD-Disk changing but hey, I’m not an inventor when it comes to to building some thing out of thin air…
Here is what I’ve done over the past couple hours, it’s not very good but it’s a starting point for later play.
#!/usr/local/bin/ruby -w
# usage: make [opt] project [dir]
# TODO:
# rdoc...
# handle header files and linking properly in C
# support more then C
# implement a way to set lang opts/debug/profiler stuff correctly
# reduce usage of $globals
# clean up code... looks like sludge
require 'getoptlong'
require 'rdoc/usage'
$lang=nil
$project=''
$startdir=Dir.pwd
$debug=false
$profiler=false
$verbose=false
def main()
opts = GetoptLong.new(
[ '--help', '-h', GetoptLong::NO_ARGUMENT ],
[ '--lang', '-l', GetoptLong::REQUIRED_ARGUMENT ],
[ '--lang-opts', '-o', GetoptLong::REQUIRED_ARGUMENT ],
[ '--debug', '-d', GetoptLong::OPTIONAL_ARGUMENT ],
[ '--prof', '-p', GetoptLong::OPTIONAL_ARGUMENT ],
[ '--clean', '-c', GetoptLong::NO_ARGUMENT ],
[ '--verbose', '-v', GetoptLong::NO_ARGUMENT ]
)
begin
opts.each do |opt, arg|
case opt
when '--help'
RDoc::usage()
when '--lang'
proc_lang( arg )
when '--lang-opts'
puts "#{arg} -> --lang-opts not implemented!"
when '--debug'
$debug = true
when '--prof'
$profiler = arg
when '--verbose'
$verbose=true
end
end
if ARGV[0]
$project = ARGV[0]
end
if ARGV[1]
$startdir = ARGV[1]
end
puts ARGV #debug
puts "nn"
n=LangC.new()
n.make()
unless $lang
$stderr.puts( 'WARNING: --lang not set!, defaulting to ISO C99' )
end
# call usage() on *any* error and print the problem
rescue StandardError
puts( $! )
RDoc::usage()
end
end
def proc_lang( str )
case str
when 'c','C'
# set up for C
$lang=str
when 'c++','cpp','C++','C++','cc','CC','cxx','CXX'
# set up for C++
when 'java','Java'
# set up for Java
when 'Perl','pl', 'plx'
# Setup for Perl
when 'Python','py'
# Setup for Python
when 'Ruby','rb'
# set up for Ruby ;-)
end
end
class Lang
def make()
end
def each( startdir, &block )
dp = Dir.open(startdir) do |dir|
dir.each do |node|
if node == '.' or node == '..'
next
end
p = File.expand_path( node, startdir )
yield( p )
if File.directory?( p )
self.each( p, &block )
end
end
end
end
end # !class Lang
class LangC < Lang
@@compiler = 'gcc'
@@cflags = "-Wall -Wpointer-arith -Wcast-qual -Wcast-align " +
"-Wconversion -Waggregate-return -Wstrict-prototypes " +
"-Wmissing-prototypes -Wmissing-declarations " +
"-Wredundant-decls -Winline -Wnested-externs " +
"-std=c99 -march=i686 -pipe "
@@ldfags = nil
@@debug = '-g'
@@prof = nil
@filelist = Array.new()
# The very bloody boring constructor which serves only to override the
# defaults for our static class variables.
#
def initialize( compiler=false, cflags=false, ldflags=false,
debug=false, prof=false )
if compiler then @@compiler = compiler end
if cflags then @@cflags = cflags end
if ldflags then @@ldfags = ldflags end
if debug then @@debug = debug end
if prof then @@prof = prof end
@@ldflags=nil;@@prof=nil#debug
end
# Assemble project
def make()
@filelist = Array.new()
self.compile()
self.link()
end
# Walk the directory tree and compile all .c files into .o
#
def compile()
$stdout.puts '------- COMPILING -------' if $verbose
self.each( $startdir ) do |file|
if file =~ /.*.c$/
p = file.to_s.gsub( File.extname(file),".o" )
@filelist.push( p )
# Don't compile unless the source is newer then the object files
if File.exists?( p )
next unless timecheck(file,p)
end
system( "#{@@compiler} #{@@cflags} #{@@debug} #{@@prof} " +
"#{file} -c -o #{p}" )
end
end
end
# Walk the directory tree and link all object files
def link()
$stdout.puts '------- LINKING -------' if $verbose
@filelist.each do |obj|
system( "#{@@compiler} #{@@cflags} #{@@ldflags} #{@@debug} " +
"#{@@prof} #{obj} -o #{$startdir}/#{$project}" )
end
end
# Return true if first filename has a newer time stamp then the second
#
def timecheck( f1, f2 )
File.mtime( f1 ) > File.mtime( f2 ) ? true : false
end
end
if __FILE__ == $0
main()
end
I got off wok early today, about 1400 local and home for lunch by 1445, hit the Forums over at www.sasclan.org, ate, and got my movies list ready… Taking the rest of the day off as a personal vacation/holiday.
Blog, radio, tv, food, code, books, e.t.c 🙂
Raided my bookshelves bottom shelf for the VHS collection. We’ve got like 150-250 VHS tapes in the house but I’ve maintained only a small collection (20-40) in my room, so I know where to find them lol. We’ve taped just about every thing but watch almost none of it unless it’s on TV HAHAHA ! It set off my nose but I’ve complied my watch list, probably will take me a few weeks but it’s nice considering that I have not seen most of them in ages.
Links the the plot outlines on the Internet Movie Database (IMDB) for convenience.
Robot Jox
Indiana Jones and the Last Crusade
Dune — A great book also
The Three Amigos
Dear GOD — A goodie I found on late-tv years ago.
Mission Impossible
Legend of Drunken Master
Ghost Busters I and II
Ernest Goes to Jail
Jackie Chan’s First Strike
The Freshmen
Tron
Hot Shots
Spaced Invaders
Hook
El Dorado
Not all of them are my favorites although a few are, they all are however good movies xD
“It’s 5:50 a.m., Do you know where your stack pointer is?”
I saw this one and I couldn’t help but smile 🙂
Especially since if I get any decent edits done, it’s usually after 0500 when I get to sleep.. and a fair bit of time using GDB hehehe.
“Programming is a lot like sex. One mistake and you could have to support it the rest of your life.”
“You can’t make a program without broken egos”
“There are two ways to write error-free programs; only the third one works. “
“You never finish a program, you just stop working on it.”