[lug] An unusual C construct

Rob Nagler nagler at bivio.biz
Thu Jul 29 11:42:13 MDT 2010


On 7/29/10, Davide Del Vento wrote:
> Very interesting, indeed. Here is a (very partial and incomplete) answer:
>  http://stackoverflow.com/questions/1828654/

Interesting problem.  It gets worse when you think of all the code
that's in your job which isn't indexed at all.  We can browse and
interrogate names, but symbols are a lot harder.  One of my big
complaints as a Perl coder is that there are a lot of APIs which are
named funny things.

There's a great book/project called the Programmer's Apprentice which
addressed this idea in Lisp.  The advantage to Lisp is that it is
incredibly easy to treat code as data.  This was back in '78, I think,
and the project seems to have died.

Perhaps a way to solve the search engine problem is to identify the
source language, compile it to an AST so, pump that into a search
engine so that the entities are broken up into the right elements,
then do the same thing for the query strings. Probably would need to
identify the language on the query snippets.  Not as advanced as the
Programmer's Apprentice, but would be a cheap way to reuse search
engines.

$.02 of random thoughts.

Rob



More information about the LUG mailing list