Three years before Google Chrome, four years before the Chrome OS announcement, one year before the Writely acquisition, one year before the launch of Google Labs Spreadsheet, and two years before the ‘netbook revolution’.
24 Aug 2005, 19:42:
Google has a strong API on top of the browser, and is building a large enough collection of Apps running on that API that they can realistically do ‘typical office work’: Web Surfing, Word Processing, Spreadsheet, Email, IM, and Solitaire.
They get the Web Surfing for free since you need a browser for the other apps, they have IM and Email, and PopCap and friends take care of the simple games. There are a couple Ajax-based spreadsheets out there, and it’s not too difficult to imagine a Word Processor based around Mozilla’s designMode or IE’s contentEditable. Especially since Google is already parsing Word and PDF files (and converting them to HTML) for their search engine.
So far, no platform, but the idea I keep hearing is that with that suite available Google will move down the stack, releasing a ‘Google Browser’ (say, a rebadged Firefox) and then a full-on ‘Google OS’. That is, something along the lines of a Knoppix CD-based system that boots and puts you straight into the browser. The logic behind the OS idea is usually something like “They run Linux on all their servers, and they have a lot of smart people, so building a custom distro would be easy.” It’s complete speculation on the part of everyone, but it has enough internal consistency that it makes a decent ‘what if’ topic. (Personally I prefer “What if Apple had put more resources into A/UX rather than Copland?”, but I’m not quite mainstream…)
Actually, now that I’ve written that all down in one place, it’s basically Larry Ellison’s Network Computer idea, but running on commodity hardware and without the Oracle badge.
(And yes, I do recognize that while you’d be able to access you information from any machine with net access and have complete searching through everything, you would be trusting Google to store your data, only mine it when you ask them to, and you’d never be able to go offline.)
If you follow the thread a little further, however, I go off into the weeds and say that this doesn’t make sense for home users. Which is completely ridiculous. Not having to install fifteen applications and transfer a bunch data every time a harddrive fails or a computer is replaced or added is a tremendous benefit to the home/SOHO market.
Posted on 6 March 2010 in Uncategorized
No Comments »
yes no yes no yes yes
no yes no yes yes yes no yes yes no no yes
no yes yes no no no no sadly-no no no yes yes no no
no no no no no
Personally, I’m hoping Apple reaches back in time, naming-wise: Apple Macintosh Tablis 4220. With different CPU/storage combinations as the 4225, 4235, and 4250.
Key
Posted on 25 January 2010 in Uncategorized
1 Comment »
C’est functional programming:
array_walk($line, function (&$i) { $i = trim($i); });
Or, at least, close enough. Either way, a vast improvement over the old method.
Also nifty: the ternary shortcut: ($a ?: $b) is just like ($a ? $a : $b), but without the double evaluation.
It’s a nice little update.
Posted on 27 September 2009 in Uncategorized
Comments Off
Around three years ago I posted a simple slugification function that used iconv() to coerce a string into URL-friendly ASCII. It had a couple of drawbacks in that it dropped characters rather than transliterating them (oops) and it fell flat on its face if iconv() wasn’t available.
Thus, I present here an improved version.
/**
Clean up a string and make it suitable for inclusion in a url.
@param $str The (UTF-8) string to be slugified
@return a string containing a sanitized, url-safe version of $str
*/
function slugify ($str)
{
if (function_exists('iconv')) {
$old_level = error_reporting(0);
$old_locale = set_locale(LC_ALL, '0');
setlocale(LC_ALL, 'en_US.UTF-8');
$slug = iconv('UTF-8', 'UTF-8//IGNORE', $str);
$slug = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $slug);
set_locale(LC_ALL, $old_locale);
error_reporting($old_level);
} else {
$slug = preg_replace('/\s+/', ' ', $str);
$slug = preg_replace("/[^a-z0-9 ]/i", "", $slug);
}
$slug = preg_replace('/\W+/', ' ', $slug);
$slug = trim($slug);
$slug = strtolower($slug);
$slug = preg_replace('/\ +/', '-', $slug);
return $slug;
}
The basic mechanism is to take a string, remove non-ASCII characters, strip punctuation, collapse whitespace and replace it with hyphens. Which will (ideally) turn “I lìke: Icé Crëam!” into “i-like-ice-cream”.
The non-iconv() path doesn’t quite live up to that goal. It collapses white space and then strip anything that isn’t an alphanumeric ASCII character or ASCII space. This means it turns the previous example into “I lke Ic Cram”. I’m not too worried about that as it’s intended solely as a fallback. I added it because had a development machine without iconv() and a server with it, and didn’t want to waste time installing it on the development machine at that moment.
The iconv() path is much nicer, and I’ll take it step by step. First error reporting is disabled because iconv() loves to spew errors even when everything is operating as expected. The old reporting level is recorded so that it can be restored once iconv() is done spewing errors. Next the current locale is set to a UTF-8 value. The function assumes its input is UTF-8 and this ensures iconv()’s transliteration works properly. As with the error level, the current locale is recorded for later restoration.
Now comes the heart of the function, in which the input string is first stripped of invalid UTF-8 byte sequences (just in case $str is composed of random gibberish), then bounced down from UTF-8 to ASCII. It’s the second iconv() call, with the ‘TRANSLIT’ command, that makes up the real magic, transliterating accented character into non-accented versions. That is, it turns “ß” into “ss” and “é” into “e”. Unfortunately it doesn’t do much for non-European scripts, merely converting the characters into question marks. At this point the example has been transformed into “I like: Ice Cream!”.
After the string has been converted, the error reporting level and locale are restored.
The remainder of the function is the same for both paths from this point. All runs of non-word characters (i.e., whitespace, control characters, punctuation) are replaced with spaces (I like Ice Cream ). Then leading and trailing whitespace is stripped (I like Ice Cream), and the string is lowercased (i like ice cream). Finally, the remaining runs of whitespace are replaced by hyphens (i-like-ice-cream or i-lke-ic-cram for the non-iconv() path) and the string is returned to the caller.
My original function was adapted from an early version of Rick Olsen’s permalink_fu.rb but there has been significant divergence since.
Posted on 17 September 2009 in Uncategorized
Comments Off
Grabbing a meme from Glyph, here’s my list in rough chronological order:
- LOGO
- Apple Integer BASIC
- HyperTalk
- AppleScript
- Pascal
- Object Pascal
- Microsoft QBASIC
- HTML
- C
- C++
- MPW Shell
- Java
- NewtonScript
- 68k assembler
- AppleSoft BASIC
- Perl
- Bash
- Haskell
- Prolog
- Ruby
- PHP
- CSS
- Javascript
- Scheme
- Python
The boldface entries are languages I consider myself proficient in. And Pascal, as always, remains very near and dear to my heart.
Languages I intend to learn in the near future:
- Emacs Lisp
- Erlang
- Objective C
Edit: Forgot about NewtonScript!
Posted on 15 October 2008 in Uncategorized
Comments Off
Since Bare Bones seems to have eliminated the legacy versions from their servers, it took me a few hours to scrape copies together from other sources. So I thought I’d share my findings with the world. Just in case anyone else needs a good text editor for an old System 6 machine…
For Mac OS X 10.3.5 and better, BBEdit’s current free text editor TextWrangler is the better choice. At least until Bare Bones deems it discontinued and unsupported, at which point the lack of a redistribution clause in its license is going to hurt.
While I’m on the topic of ancient software, I might as well point out that NoLobe has full collection of Anarchie versions available (appropriately enough) on their File Transfer Protocol server. And, likewise, iCab is available for every system all the way back to Mac OS 7.5.5.
Edit: fixed link to 6.1.2
Posted on 12 October 2008 in Uncategorized
Comments Off
In my values, freedom is more important than “serving users” in a mere practical sense. Of course, in many cases we can achieve both, so we do not need to choose between them. But once in a while that isn’t so. — Richard Stallman, 2000 (source)
That is my favourite Richard Stallman quote because it, to my mind, perfectly encapsulates why he is largely irrelevant to day-to-day software development. If I want to write a document I will choose and suggest Microsoft Word over a GPL-licensed Hello World program. I suppose that makes me philosophically unclean to the Free Software community, but I can’t shake the idea that the only reason software exists is to serve users in a mere, practical sense.
I view Nicholas Negroponte in much the same way, though Negroponte’s philosophical contribution is as a futurist, rather than an ethicist. I think “Being Digital” was what cemented Negroponte in that role for me.
Do not misunderstand me, both Negroponte and Stallman have immense value to the software industry. Without people publishing proclamations and nailing manifestos to doors nothing truly innovative, and thus nothing better, ever happens. The MIT Media Lab, emacs, the OLPC, and the GNU Project all represent huge contributions to the state of the art. Both in their practical effects and in the fainter ripples of opinion and thought they cause.
Today, it was with little surprise that I read Ivan Krstić’s insider view of the OLPC project. And it was with even less surprise that I read RMS’s response to the news of the OLPC switching to Windows.
Respect these men, value their contributions, and give serious thought to their ideas. But when it’s time to actually write code, concentrate on what you can do for users today.
Posted on 14 May 2008 in Uncategorized
Comments Off
print( plus(&ten, &three) );
print( times(plus(times(&two, &three), four_fn), &ten) );
Result:
13
100
Reverse Polish Notation and a plethora of parentheses does not a functional language make. But they do impart a superficial resemblance. However, add a little context and suddenly it becomes a lot more ugly:
#include "functional.h"
#include "integers.h"
DType* plus (DType* a, ...)
{
TWO_ARGS_ATOMIZED(a, b)
return new_atom(a->atom + b->atom);
}
DType* times (DType* a, ...)
{
TWO_ARGS_ATOMIZED(a, b)
return new_atom(a->atom * b->atom);
}
DType* _four (DType *a, ...)
{
return new_atom(4);
}
int main (int argc, char* argv[])
{
DType* four_fn = new_nonatom(&_four);
print( plus(&ten, &three) );
print( times(plus(times(&two, &three), four_fn), &ten) );
}
This really needs lists and the usual suspects (car, cdr, cons, map, filter, and reduce). As well as some sort of call(List(fn, arg1, ...)), which I am pretty sure is as close to functional notation as I can get. As a bonus, lists will allow me to drop the varargs magic. Maybe I’ll add that next weekend. I had forgotten how much fun C can be, it was nice to go back to it for a while.
Git repo here.
Posted on 13 April 2008 in Uncategorized
1 Comment »