News for hackers. Stuff that matters.

huwigs

Re:Rich Hickey stops Clojure funding appeal from 2011 onwards on Tuesday January 04, 2011 @04:01PM (#2068446)
As a longtime Lisp observer, I can't say that I've ever seen Jon Harrop conduct himself as a "heavyweight" in forums unrelated to OCaml, Mathematica, or F#.
I don't know of any way to link them. I post using my real name on StackOverflow, for precisely the reason of "brand management" or what-have-you. Presumably my name and current employer were unique enough for the recruiter to put two and two together on his own.
A Google recruiter cold-called me -- well, cold-LinkedIn me -- based on my Stack Overflow responses. I did a phone interview even though I wasn't really interested in leaving my current job.

That, plus my location requirements, plus a so-so interview, plus the fact that I wasn't particularly qualified for the job, surely led to the following "Thanks, but no thanks" followup call.

Re:Language for Unix command line utilities? on Wednesday September 01, 2010 @12:50PM (#1653333)
> Since I cannot tell Python to produce succinct unixy error messages instead of rambling stack traces

`sys.excepthook` is how you can do that.

Without:

     x = {}
     def f():
         print(x['foo'])
     f()
     # ...

      Traceback (most recent call last):
	File "stack.py", line 6, in <module>
	  f()
	File "stack.py", line 4, in f
	  print(x['foo'])
      KeyError: 'foo'
With:

     import sys

     def short_err(exc_type, exc, tb):
         sys.stderr.write("error: tracebacks too long\n")

     sys.excepthook=short_err

     x = {}
     def f():
         print(x['foo'])
     f()

     #...

     error: tracebacks too long
So don't worry about catching exceptions if you're just printing errors.