HackerTrans
TopNewTrendsCommentsPastAskShowJobs

tehwalrus

no profile record

comments

tehwalrus
·12 anni fa·discuss
replace all: tk -> current_token
tehwalrus
·12 anni fa·discuss
Writing expressions concisely is an interesting problem, but in order to do, for example, tensor algebra in C you basically must use macros to define a DSL. It is not a goal which can always be achieved, but structures higher than variable names are what allow one to achieve it (usually.)

I didn't say that "verbose" variable names were mandatory everywhere - i and j have their place - but names which are at least pronounceable words are essential, especially if they appear in more places than a five line function.

This project is a special case, certainly, but toy compilers are nothing if not to learn from.
tehwalrus
·12 anni fa·discuss
I'm not against local variables for counting called i and j.

I'm against a big list of forward declarations, with tens of different variables, each with a very short name, and a comment explaining what this is an abbreviation for. Just replace the names with the comments, with underscores for spaces, using find and replace. two minute job for the whole code base, much more readable code almost everywhere.

I agree that functional languages may be a counter case; but codebases in C and python (in my experience), benefit greatly from well named variables.
tehwalrus
·12 anni fa·discuss
The variable names thing really annoyed me too - a habit of code golf, and people who were originally trained in an old FORTRAN edition that had a 6 or 7 char limit on names.
tehwalrus
·12 anni fa·discuss
To talk about "redeeming" oneself is a standard English idiom. When the pope uses it, maybe he does mean something else, but I don't see why we need to interpret a long-ish, otherwise non-theological piece uncharitably over the use of a single word once.
tehwalrus
·12 anni fa·discuss
umm, no it isn't (I mean, maybe he did say something like that afterwards, but that's not what he's saying here.)

The idea that humans are not just the product of their environment but have something within them is undoubtedly true; some of our behaviours are learned (from the economy, and from other places), and some are innate/genetic.

Similarly, humans placed in a "favourable economic environment" are not automatically perfect, or even good.

On these points, I agree with him (in spite of being an atheist and ex-Catholic.)
tehwalrus
·14 anni fa·discuss
did a FORTRAN course 3 years into a physics degree. In order to avoid using emacs over X11-forwarded SSH within windows (yes, this was how the course recommended you work.....) I built a proper computer (as opposed to ancient laptop which had been fine up to then) and installed openSUSE. I have not stopped playing with code since, and my first job on graduating was as a developer (although I've since quit to do a physics PhD that is mostly python programming.)