jsphp.co developments

I’m working on my jsphp.co web-site. I haven’t deployed my latest changes yet, so there’s nothing there on the main web-site just now, except if you head over to checkout the development area which has all my latest changes. Basically over the last couple of days I’ve added support for:

  • Home page
  • Category listing
  • Function listing
    • View function, tests and benchmark with linkable line numbers
    • Edit function, tests and benchmark with summary
    • Test the code using QUnit
    • Benchmark code and compare versions
    • List revisions and view, edit or change the release status
    • List developers including local and upstream contributors
    • Comments on functions or tests (incomplete)
    • Link to features, such as code downloads or the phpjs.org implementation
    • Administer the function
  • Contributor listing
    • Lists local contributors
    • Lists upstream contributors
  • Licensing info
  • Downloads
  • Links to other web-sites
  • Contact information
  • System administration
    • Manage categories
    • Manage functions
    • Manage users
    • Manage upstream developers
    • View errors

There’s still a little bit to do. Basically I need to review the entire code base for HTML injection and XSS vulnerabilities, I need to fix up the commenting subsystem to allow for editing and creation of comments, I need to protect from some changes (e.g. only administrators can release a function version), many of the forms need better/reviewed workflow for errors and omissions, there needs to be a facility for adding and removing upstream developers, and that’s about it. Once I’ve got those planned changes done I’ll release the latest version of the site and begin the process of importing the phpjs.org code base.

Words on Noam Chomsky’s computer

Today I watched reddit.com Interviews Noam Chomsky and in the video you can see a laptop in the background that pops up various words. I’m not sure why these words are there, it looks like some sort of screensaver. Anyway, I wrote down all the words that I could see properly and then wrote a program to put them in the following table:

Word Dictionary Google Define
groupthink dictionay google define
caustic dictionay google define
continuo dictionay google define
acrimony dictionay google define
anaphrodisiac dictionay google define
reinsure dictionay google define
diaphanous dictionay google define
nervy dictionay google define
conformity dictionay google define
pince-nez dictionay google define
austerity dictionay google define
transonic dictionay google define
piteous dictionay google define
advert dictionay google define
pillory dictionay google define
impassioned dictionay google define
lexicology dictionay google define
fearsome dictionay google define
intaglio dictionay google define
inviolate dictionay google define
pettifog dictionay google define
intensive dictionay google define
profligate dictionay google define
ectomorph dictionay google define
supererogation dictionay google define
consomme dictionay google define
chronicle dictionay google define
kaddish dictionay google define
corollary dictionay google define
anonymous dictionay google define
gargoyle dictionay google define
flambe dictionay google define
luxuriant dictionay google define
corselet dictionay google define
debouch dictionay google define
servile dictionay google define
filament dictionay google define
semiconductor dictionay google define
efficacy dictionay google define
edacious dictionay google define
roister dictionay google define
isthmus dictionay google define
emulate dictionay google define
elect dictionay google define
pet dictionay google define
bivouac dictionay google define
risorgimento dictionay google define
glossy dictionay google define

Bash aliases

I was reading my default .bashrc file, and found the following:

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

This suggested that I wanted a .bash_aliases file for my aliases, so I set one up:

jj5@sixsigma:~$ cat .bash_aliases
alias home='cd ~'
alias jj5='cd /var/www/www.jj5.net/'
alias profile='cd /var/www/www.jj5.net/profile/'
alias chomsky='vim /var/www/www.jj5.net/profile/chomsky/index.html'
alias henney='vim /var/www/www.jj5.net/profile/henney/index.html'
alias lakoff='vim /var/www/www.jj5.net/profile/lakoff/index.html'
alias norvig='vim /var/www/www.jj5.net/profile/norvig/index.html'

This is my basic “CMS” system for http://www.jj5.net/profile/.

Important: JavaScript does not have block scope.

I’m a little embarrassed to say that I only looked this up for the first time today. Although, I’ve been programming in JavaScript for so long that I must have known this years ago, but “forgotten” as I haven’t done much JavaScript programming in the last few years. Hey, at least I retained that niggling feeling like I had to look that up!

Important: JavaScript does not have block scope.

Basically:

 var x = 1;
 { var x = 2; }
 print( x ); // outputs 2