as a bonus, the waste is bio-degradable
348 karma · joined March 6, 2008
as a bonus, the waste is bio-degradable
for example, a site that compares different insurance policies/companies, etc
in my case (not from the US), i wanted to sell mutual funds and claim 1% marketing fee :) ... i even passed mutual-fund-manager-certificate-govt exam (just in case, also out of curiosity)
to my surprise (6 months and 1 web app later), only bank is allowed to sell investment packages to individuals (for security reasons)
so not only i cannot take 1% cut (i'm not a bank), banks also do not want to deal with unproven small fry
eventually, i changed my site into site that compares various mutual funds (tables, graphics - love jquery+flot)
but alas, most of them performs below the index; so comparing them shows how bad the funds actually are
anyway i ended up making it a non-profit site ... users love it and i got various feedbacks applicable to my other web apps
for example: 'reddit" can be redit, readit, red-it, read-it, red.it, read.it, redd.it "funbox" can be funboxes, funboks, funboss, fun-box, funnybox, funnyboxes, etc
the correct regex can indeed produce noise, consider this string in an ads where the poster uses '+' to join info: "please contact the owner, her info: 4041234567+owner@gmail.com ... thx!"
the correct 'boilerplate' regex will happily take 4041234567+owner@gmail.com ... which is not what i want; thus, noise
the less pedantic regex i use will just take owner@gmail.com, which is what i want
similarly with "?" char (legal for local part), the correct regex will catch "sendIM?owner@gmail.com"; which again, not what i want ...
the 'busted' regex will only take 'owner@gmail.com' ... which is what i want
that's the main reason the omissions of +,? and other legal chars in local part of my email regex, the second reason is speed
for email validation where what u get is just a string of less than 100 chars, it's fine to use complete email validation regex; however, for email scrapping of close to 1gb data, boilerplate won't cut it
i'm willing to sacrifice completeness for speed
my regex doesn't allow empty string, there's metachar '\s' for spaces, equivalent to [^ \t\n]
and i was wrong, '\w' is [^a-zA-Z0-9_] ... i forgot '^' and '_' are included in metachar '\w'
thx, your criticism forced me to reopen my regex book
the actual code is in newlisp: <code> (set 'p1 (regex-comp {[-\.\w]@\w+(\.\w+)+})) ;compile (map (lambda (f) (replace p1 (read-file f) (push $0 E) 0x10000) ) (directory "." "php|htm|html")) (set 'E (unique E)) (save "email.db" 'E) </code>
my newlisp code is not used for validation, it's for scrapping emails from ~30000 html pages totalling 870 MB <pre> ~/dl $ find . | wc 29546 29548 1423727 ~/dl $ du -h 870M </pre>
I used more complex regexes (slow) but only marginal improvement (< 0.1%) and a lot of noises
This code is pretty fast, almost an order magnitude faster than more complex, complete email regex
[-\.\\w] means ... match - or \. or word (a-zA-Z0-9) character ad nauseum (can put more chars inside [] but the regex is slower)
i didn't use it for validation, so no anchoring needed ... but it's an easy modification
anyway, this is the code i use for real world - i won't pretend that it's perfect for every corner cases, but hey it works fast for me :D short code solving 90+% cases
/[-\.\\w]*@\\w+(\.\\w+)+/
i also changed default ssh port to non-22 to prevent most brute force attacks
i can't stand GNU/linux folks bashing OpenBSD over trivialities like the root only first-ever boot
The first-ever boot you can only log in as root
This 'reckless (read: diff from linux distro)' installation practice made OpenBSD got 1 point deducted from a linux review article
Despite the root thingy, OpenBSD is "Only two remote holes in the default install, in more than 10 years!"
The US CS have better communication than technical -> "your call is important, the problem will be resolved within 24 hours bla bla bla" ... but things rarely get done
The German CS don't talk much but their competency is high so things get done quickly ... much faster than the US
"A biotech company (usually) faces positive uncertainty, a bank faces almost exclusively negative shocks. I call that in my new project "concave" or "convex" to model error."
concave to model error: Bank, Short volatility, security
convex to model error: Long options, biotech, technology, entrepreneurship, etc
had to be root to raise the user's maxproc-max (previous experiments locked me out --- "sh can't fork" messages ... can't even ssh in)
it's done in a 100mbps amd2000+ 256 mb 40 GB IDE OpenBSD colo ... but i don't think the hardware matters that much (the cilk is really the key)
that way i no longer need chair+table (i sit on the bed and readjust the shelf's height to put my laptop on)
win98 hd can be used across, good luck with XP / Vista
iBookG4 tiger hd can be swappable to mac mini
ubuntu hd, i had occasions when it's not swappable (always kernel panic on other mobo - must reinstall from scratch)
OpenBSD always works (tm) on every mobo, even on my 10 yo XD380 thinkpad
BUT YOU CAN USE VMWARE!!! errr, i use simpler, OS / hardware independent tech: VNC
my setup now is: win98 for legacies, win-only software / hardware mac mini for fancier hardwares bluetooth, firewire, DVI etc
OpenBSD for development, VNC to win98 and Mac Mini (powerPC)
It used to be OpenBSD+Ubuntu ... However, time tweaking Ubuntu is better invested in win98+mac ... i feel ubuntu is trying to be win/mac/BSD* and it's weak in the three fronts -- weak identity, designed by committee for mass
you may think supporting 3 OS is more complicated; however it's not true
if the OS misbehave and need complete reinstallation: win98: i could just dd if=win98 of=/dev/disk2 and it's ready in 10 mins shrug osx: reboot from install disc, format tiger partition, map the tiger-image and it's ready in ~30 mins OpenBSD: just do ftp reinstall, untar Site44.tgz and it's production ready in 15 mins Ubuntu: i dunno, ... i'll prolly waste another hour+half or two reinstalling it
NB: Can u operate 3 OS (Win/OSX-powerpc/Unix) on a single machine? * BSD is more powerful than linux ... err GNU/linux ... or should i say GNU/BSD ? ... I dunno, i just want to hack and use the most powerful tools available, no time for silly nerd politics
i rarely use point because it's an easily gamed metric
nowaday i filter news based on #comments (and title)
and only follow comments with <= 3 levels deep (5 if interesting)
and start searching /pg /paul /nickb if it's a >50+ comments
you may not be able to use the syntax/examples from other lisp/scheme books coz it's a bit different (people say it's a broken lisp)
but it's hell a lot of fun to program in it
The only thing I miss is attach/detach ... Does anyone know any alternative to Screen?
Thx!
alt+1: my main coding using vim (no mouse, no arrow key) alt+2: vncviewer to my mac mini for safari, ff3 (mouse) alt+3 ... alt+9: almost never used
i 1-1-map ~/www/pages/webapp{1,...,n) to my OpenBSD colo hg push/pull/update
i'm reconsidering attach/detach screen session between servers, but i can't stand emacs/GNU key-binding (even after xmodmap my caps to ctrl) ... anyone knows screen-like program that uses vi-keybinding?
and to be fair less / no support may mean the product is so good that noone complains (it just works TM) or it's simply dead
on topic: contrast ubuntu and openbsd
fast install: ~5 mins default + ~5 mins untar my-essentials.tgz + ~5 mins mercurial sync ... my box is production ready (sans user database)
easy upgrade: untar the tgzs, kernel, sync /etc from newer OpenBSD
no automatic update: it makes default install uniform, when $hit happens, just order another colo server with default install, ftp my-essential and resync
package & port & source: complete freedom ... for contrast, try to build (then patch) vim from source in ubuntu (you can't)
now the 'bad' thing: few forums: but most questions are answerable from OpenBSD's FAQ, afterboot and man pages
less new driver: good luck installing bluetooth (can't)
older software: only firefox 2, no ff 3 in packages and snapshot port (ff3 site lists binaries for xp, osx, and .mar? source ... no idea how to compile .mar)
i use OpenBSD as server (colo) and desktop ... then vnc my mac mini for ff3+firebug (i don't bother with linux emulation, dual boot, vmware etc)
old simple vnc works across OS/arch ... i avoid fancy newer tech. Can you run i386-ubuntu and powerpc-tiger in one desktop?
i had enough of ubuntu, can't install from source, auto-update always break things (i finally quit after my ubuntu retarded to 800x640 and failed attempts at xorg.conf)
oh wait, did i mention about the quality of the OS by OpenSSH maker? Last time my colo lasted 4xx+ days without reboot
in my country, the capital gain tax is only 0.1%, automatically included when one sells stock (0.15% fee for buying and 0.25% fee for selling any amount any time); however, income tax from working is 35% top
but the trend is ... tax on investment is substantially lower while it's much higher on working income ... social control perhaps?
The trick is to highlight comments with bright & contrast fg/bg color combo that hurts your eyes (it also serves to say 'hi i'm comment, i'm important, but delete me when u understand me')