HNHacker News
TopNewBestAskShowJobs

rquirk

437 karma · joined December 12, 2009

@richq | http://quirk.es
submissionscomments
rquirk··on Google releases its own Javascript Lint tool
I'm not sure what easy_install does exactly, but I guess you could replace latest with a version number. On http://code.google.com/p/closure-linter/downloads/ there's a 2.2.1 there, so instead of using "latest", you could use "2.2.1". If you care enough about this, then you probably could do some digging. Having a "latest" means they don't have to update the instructions every release, and for most people this will Just Work.
rquirk··on Oracle sues Google over use of Java in Android
Oracle must be pretty sure of victory, or a positive outcome at least, otherwise why would they go after Google right away? They could have gone after HTC, as Apple did. That would have been a more likely victory, which Oracle could have used as leverage against Google.
rquirk··on Android-apktool: reverse-engineer Android apps
Rather ironically the source code for the tool is not available. You'd have to use a Java disassembler to reverse-engineer how the reverse-engineer tool works.
rquirk··on Ask HN: What Vim Plugins do you use?
vindect: vim indentation detection. Set the tabs vs spaces settings and shift width to what the file currently uses. Indispensable for hacking code someone else wrote.

a: flip between .c and .h files a bit easier.

snipMate: code snippets. Filling out the shebang line, and C/python main idioms in throwaway experiments are the main reason I use this.

vcscommand: I only really use VCSVimDiff, but it works great for viewing changes in the current file when using git, mercurial and subversion.

emacs: inspired by vimacs[0], I also fixed ex command line editing to work with readline/emacs keys. Mapping Alt in insert mode is really buggy, so I use to ctrl-g instead of esc.

patchreview: like diffpatch, but for multiple files and you can specify a base path.

I have a whole bunch of my own silly plugins that I've created over the years, mostly unreleased, that do lots of great stuff. The :make and :grep quickfix highlighting I lifted from eclim is particularly useful.

I miss emacs.vim and vindect the most when I use vim on some other machine that doesn't have them.

[0]: http://www.vim.org/scripts/script.php?script_id=300

rquirk··on "Google Alarm" Firefox addon alerts you when you're sending data to Google
I'm just glad that analytics is on its own domain. Google could easily have placed it at google.com/analytics and it would be much trickier to block. As it is, an entry in hosts or blacklist it in NoScript is all you need.
rquirk··on Will it optimize?
gcc 4.4 spitting out ARM code does that. It gives you `mov r0, r0, asl #1` and for thumb `lsl r0, r0, #1` when using -O2 or -Os.
rquirk··on Stack Overflow's "Food and Cooking" site is in public beta
Substantial commitment is not necessary in practice. Joining the private beta of gaming.stackexchange.com required me to commit, but the site turned out to have a high XBox 360 and (surprisingly) Dwarf Fortress to everything else ratio and I have not returned with any enthusiasm.

I've outgrown games perhaps, but committing didn't require anything. Maybe if it had cost me 1000 Stack Overflow reputation points I would have thought twice about signing up? If it did cost that much, it would be a high barrier to entry for non-programmer-non-stackoverflowers and the site would get less people committing (resulting in the "ghost town" effect).

rquirk··on Varnish guy's hatred for autoconf
I have mixed feelings about Waf. Given its lack of popularity, I probably wouldn't recommend it, at least not yet. Unless you want to be a pioneer, or have no plans to give the source code to anyone else.

Pluses:

Fast, probably the fastest build system there is after a hand-coded Makefile. MD5 sums are clearly not the bottleneck in SCons, and it is a fundamental design problem there.

Waf uses Python. This means that you can use all the right idioms for lists of things, loops, etc.

Not just a Make-clone, waf has build-system features. For example, it can check for headers, libraries, use pkg-config, has cross-compilation support, can create distributions, etc. Waf has separate configure and build steps too - in SCons if you use the autoconf-like features, they are checked every time you build (albeit cached).

Waf by default does an out of source build. This is also a minus though, as it is only available as a sub-directory of the source directory. You cannot build a single source from read-only media on various platforms, as waf wants to write files below the source tree whatever you do.

Intra-project dependencies are easy to use. Convenience-style libraries add the right -L and -I values to executables that use them.

File globbing works well. It isn't like CMake where using FILE(GLOB *.c) has a bunch of caveats.

Minuses

Waf uses Python. This means you have to quote everything. In make or CMake, it's main.c. In Waf (and SCons) you have to write "main.c". Similarly for command line arguments and so on. Being a proper programming language means you can "over-engineer" the build system, ending up with something that is perhaps well-written, but far more difficult to follow that the equivalent almost-declarative CMake input file.

Writing your own tools to process types of inputs that are not supported by default seemed tougher to me than with SCons or with CMake. Waf uses Python decorators to add methods to the default build context, which are then executed depending on the decorator-filters for the types of file in question. It is an elegant solution, but in practice too magical and it is tricky to debug.

Waf is really unstable (in the sense that it changes regularly, not that it crashes). The API changes every release, features are removed and deprecation warnings are rare. So if you hit a bug that gets fixed in a newer version and want to upgrade, chances are that your wscript file will no longer work. You are encouraged to ship a Waf binary-blob version with your source, similar to the configure "shell-blob" I guess, so if you can work around any bugs or live without newer features and stick to a specific version then this may be less of an issue.

There are warts in the API - sub_options vs sub_config vs add_subdirs to recurse directories, variable and function names randomly shortened (blddir, env, add_post_fun, uselib), having to pass an argument 'features="cc cprogram"' to compile an executable vs a dedicated cprogram method.... Version 1.6 will address most of these, but again you face the upgrade issue then.

Conclusion

I would use CMake for new stuff. It is not as cool, doesn't have an uninstall target, but is more compatible with people's expectations (the way an out of source build works, for example), has code coverage, unit tests, as well as being tested on more platforms. It's language is easy to learn - there is only COMMAND(arguments) - and the build scripts you write are generally "brain dead", it's impossible to write code that is difficult to follow. You can tell it has been used by more people and has a lot of the wonky parts hammered out.

rquirk··on Stack Overflow Fatigue
The WP pages on Chrome or Git only mention major features of those pieces of software. Features don't change that much. Part of the articles talk about the historic aspects of the projects, and again the past doesn't really change.

SO tends to go into minute detail on a particular aspect of something, so the staleness effect is amplified. For example, questions on how to write a Chrome extension tend to be stale, as do ones on specific features of Git such as integration with Subversion, or submodule support.

rquirk··on So You'd Like to Send Some Email (Through Code)
Here's the original on SO http://stackoverflow.com/questions/1200882/ - the author looks pretty angry in his photo! :-)
rquirk··on Git's New Smart HTTP functionality
It's not entirely unlikely, there is an issue open that has been reviewed and not rejected:

http://code.google.com/p/support/issues/detail?id=2454

On a similar issue requesting darcs support (which was closed WontFix), a google engineer wrote:

>Supporting Subversion and Mercurial is a lot of effort for our small team. >Adding another version control system is a lot of work and darcs would not be >our first choice.

I read that as meaning Git would be next in line, but they are not in any hurry to add it. Personally, I'd rather they concentrated on really making what they do support shine. You can always host the source on git(hub|orious) and add a Sources wiki page that points there.

rquirk··on DreamPie: The Python shell you've always dreamed about
http://code.google.com/p/conque/

From the site: Conque is a Vim plugin allowing users to execute and interact with programs, typically a shell such as bash, inside a buffer window.

rquirk··on Google Hack Attack Was Ultra Sophisticated, New Details Show
"Although the initial attack occurred when company employees visited a malicious web site, Alperovitch said researchers are still trying to determine if this occurred via a URL sent to employees via e-mail or instant messaging or some other method, such as Facebook or other social networking sites."

It still needed an employee to make the usual "install the dancing pigs"-style gaff while using IE6.

Also: Employees using IE6, inside Google, in 2010. Why weren't they using Chrome?

rquirk··on Gnome to Split Off from GNU Project?
I imagine that given the context, they are talking about Tomboy[1] and F-Spot[2]. These run on the Mono platform, which is an implementation of C#. It has patent issues, and RMS has recommended[3] that Free Software projects do not write code that relies on Mono.

[1] www.gnome.org/projects/tomboy/ [2] http://f-spot.org/Main_Page [3] http://www.fsf.org/news/dont-depend-on-mono

← PreviousPage 6 of 6