156 karma · joined February 7, 2009
http://trac.assembla.com/bash-modules/
contact: gtalk:vlisivka@gmail.com , skype:vlisivka
if(foo instanceof SomeClassObject) ...
or if(SomeClassObject.isInstance(foo)) ... Class c = SomeRandomClass.class;
Object x=c.newInstance();The only thing I unlike more than installation itself is installation instruction.
If you saw logarithmic scale ( http://www.ieer.org/log.gif ), you know that distance between 1 and 2 on logarithmic scale is much wider than between 2 and 3, and so on. So, no surprise, if you seed linear data through logarithmic (non-linear) filter, then numbers will follow pattern of logarithmic scale.
1) bad posture;
2) improper positions of head, hands, hips, foots, etc.;
4) small steps or movements without power;
3) incorrect movements or steps.
So +1 on good posture, which is result of proper emotion. I even created special trainer for that. :-)
PS. 4 years in ballroom sport dancing (10 dances).
It will be much easier to understand what happen in Cameroon, if you imagine similar system you can understand.
Imagine, you have group of web-servers. You hire administrator to administrate your dedicated servers in dedicated data centre. He changed all locks, root passwords, identity information, and then installed his own servers in addition to your own. The only right you have now is to pay bills. His servers produces too much load on your system, his incompetent administration causes outages, so your own income is suffers down. There is no "provider" to complain to.
What you can do in that situation?
a) Pay more to administrator, so he will take some courses and will provide more competent service in future;
b) register new web-domain, create new, separate, data centre, hire new administrator;
c) hire a gang to kill old administrator, blow up doors, reformat hard drives, hire new administrator.
You talking about "Канцелярит" (kantceliaryt?). "Канцелярия" means "office". Suffix "ит" here means language or disease. So "канцелярит" means "official language/disease". See http://ru.wikipedia.org/wiki/%D0%9A%D0%B0%D0%BD%D1%86%D0%B5%... http://zhivoeslovo.ru/content/view/85/143/
"Fish" (рыба) - is template or form: you need just to fill gaps between prewritten sentences. It looks like "fish bones".
I targeted Linux (or Linux like) users: Ubuntu, Fedora, Android. I leveraged existing working and well tested infrastructure used in Linux. It is simple and working well (for Linux users), but I have no money to push it forward any more...
I replaced maven by ant+RPM+yum+Hudson in one large project, and everybody is happy.
~/projects/package-gen/dst/PROJECT — my personal projects in RPM package format, with automatic build system, various templates for new packages, repository of built binary and source packages;
~/work/PROJECT — work;
~/bin — various personal scripts and programs;
~/tmp — scratch, e.g. ~/tmp/1 or ~/tmp/foobar;
~/gtd/projects — various stuff, sorted by purpose, tag or/and date. Links from here to many other places;
~/gtd/income — various stuff, to be sorted;
~/examples — various working snippets;
/usr/share/bash-modules/ - various typical functions for bash scripts, e.g. "backtrace" or "..." (recently created as alternative to ~/examples/bash-..., see http://vlisivka.pp.ua/en/bash_modules ).
I use very simple tagging tool to speedup sorting, e.g. "s foo.tar.gz foo bar" will create two hard links to "foo.tar.gz" file in ~/gtd/projects/foo/ and in ~/gtd/projects/bar/ directories, and so on.
Currently, I use RPM packages only for my own projects, because they are easy to install/uninstall/upgrade, they contains documentation, changelog, and description, they are easy to verify or rebuild, and so on.
Processing of some human languages (like English)...
Perl5 backported "named captures" from perl6:
#!/usr/bin/perl
use warnings;
use strict;
use feature qw(switch say);
#use locale;
#use re 'debug';
my $expression = qr{
(?(DEFINE)
(?<expr> (?&space)* (?&term) (?&space)* (?&opterm)? (?&space)* ; (?&space)* )
(?<term> (?&identifier)
| (?&number)
| (?&string)
)
(?<opterm> (?&space)* (?&operator) (?&space)* (?&term) (?&space)* (?&opterm)? (?&space)* )
(?<operator> [=+*/-] )
(?<identifier> [A-Za-z_][A-Za-z0-9_]+ )
(?<number> [0-9]+ )
(?<string> (?"e) ( (?&char) | (?&bsquote) )*? (?"e) )
(?<quote> \" )
(?<char> [^\\\"] )
(?<bsquote> \\. )
(?<space> [ \t] )
)
(?&expr)
}x;
while (<>) {
chomp;
if ( /^ $expression $/x ) {
say "Correct expression: $_";
}else {
say "Incorrect expression: $_";
}
}Example of anonymous recursive function with arguments.callee:
var factorial=function(n) {
return (!(n>1))? 1 : arguments.callee(n-1)*n;
}
Example of anonymous recursive function without arguments.callee: var factorial=function factorial(n) {
return (!(n>1))? 1 : factorial(n-1)*n;
}is equivalent to int runs = (int) (Math.random() * 1000000);
This search is better ( "\s?[;)]" is added at the end): http://www.google.com/codesearch?hl=en&lr=&q=\%28int...
If you waste your time on debugger, then you will have just bug fixed and nothing else.
If you invest your time into code, you will have bug fixed AND much better code.
Computers can catch bugs much faster than humans. Programming is invented for that. Think like you already have programmable debugger inside your program. Invest your time into useful tools, which you can use to trace and check your program.
2) trackers, task focusing software: GTD-free, Trac, Mylyn, pyroom, etc.;
3) blind typing (to type fast), workrave (to stop typing);
4) somebody else, which will review my work.
Rules are simple: pay $1 and throw ball to basketball basket 6 times. 5-6 hits - $10-$20 worth ball, 4-3 hits - 10c worth prise, 1-2 hits - a sweet.
He started with single ball.
Similar policy is used in Linux for disk space: 10% of disk space is reserved for root.
PS. Linux OOMKiller already do something similar: it just kills a process to free some memory.
Where is direct marketing team?
My solutions:
Receipt one: * by bunch of cheap sport items; * walk to the park; * lease them; * hire and teach other people to do that instead of you for half of income. (Tested).
Receipt two: * by a sport item (e.g. ball); * walk to the street; * encourage people to play a casual game with you, alone, or with other people; * hire and teach other people to do that instead of you for half of income. (Tested).
GPE/X11 works much faster than QT/FB.
If you looking for new ideas to add to your language, then look at the world:
* hibernate mode decreased computer boot time from minutes to seconds. Is your new supper-pupper language supports that? Can you freeze your program and distribute it in that frozen mode?
* web-applications provide instant access to ready to work application. Is your new supper-pupper language supports that? Is your language support instant access, like built-in access to SQL data base or XMLRPC service?
* Is Map-Reduce supported directly by your language?
* Is your language has support for regular expressions in language?
* Can you create parallel constructs with ease, like "foo | bar" in shell?
* Did your language supports built-in tree system ("boxes", "DOM", file system, etc.) and ICRUD, XPATH, CSS for these trees?
* Can your language automatically take corrective actions in case of error? Like "on SQL error FooBar: rescue database OR restore database from backup OR switch to new database".
* Can your code depend on something? Can you write "Class FooBar. Requires application mysql >= 5.0, external resource myapp-application-scheme >= 1.2. Conflicts with module FooBarBaz. Provides fooBarBaz. Obsoletes FooB."?
* Can you upgrade your application on the fly without restart and losing data or breaking anything?
* Can you compose program without editing files, just by creating and copying of files and directories? (dot-dir pattern)
And so on.
Encapsulation is simple thing - just write setters and getters for all your internal data and you done. ;-)
PS.
«If the classes are immutable, there is no problem with this state of affairs. Circles satisfy all invariants of ellipses; and an (immutable) circle can be used in any context where an immutable ellipse is expected.»
Ext4 is not alone - other file systems (Ext3, XFS, maybe others) are patched to support new file rewrite semantic too.
PS. I saw lot of zero-padded files on XFS until switched to Ext3 with data=ordered.