62 karma · joined Mar 15, 2010 (16y ago) · 19 submissions
comment 16y ago · link · parent
For me personally the main source of unhappiness is error messages. In C I can say
if (!(f = open(name, "r"))) die(name);
where die is a tiny function that prints name, followed by whatever strerror has to say to the subject, formatted in the usual fashion. One line, done with it. The obvious, conventional Python equivalent is four lines long because both try: and except: insist on a line of their own. Since I cannot tell Python to produce succinct unixy error messages instead of rambling stack traces I have to catch and examine more or less every plausible exception. Some exceptions I can deal with close to the base level of my call stack in a butt-ugly fourty-line catch-all clause but a large proportion of my syscalls end up taking three lines extra each. I know it's a trivial problem, but I agree with pg you tend to get the more productive the more of your actual application logic you can see.
> I do a lot of coding in common lisp
We did experiment with clisp a while back; it turned out not to be a natural fit for problems that involve a lot of pathname, datetime, and stat info manipulation. If there was a reasonably modern Lisp that let me say things like (localtime (nth 9 (stat "/foo"))) I would go looking for it this very afternoon.
3.
Language for Unix command line utilities?
6 points · by gn · 16y ago · 10 comments
comment 16y ago · link · parent
I do not join a community that keeps telling me more or less daily people with my chromosomes don't really belong and everything was better when you didn't run into my kind all the time. Even if I knew that very few of them actually dislike me; that even the really boorish ones are mostly just harmless losers trying to hide their insecurity: I just wouldn't feel welcome.
(Edit: typo)
comment 16y ago · link · parent
Also, over millions and millions of years, certain aspects of hominine reproduction (large heads, long gestation times, preposterously long childhood, staggering maternal mortality) and simple statistics would have conspired to make women very, very picky about when and by whom they want to press their buttons. At the same time they would have conspired to make men want their buttons pressed as often as possible, and by pretty much any girl with a neck pulse.
The availability of people of the desired sex willing to press your button would be your default main source of serenity and self-respect. It would take experience and hard work for you to create other sources of fulfillment for yourself. It would be natural for immature, stupid, or bitter people to spend enormous amounts of energy trying to control access to other people's buttons.
If you could press your neighbor's button without risk of adverse side effects (killing months of their productivity, having them lose one of their four of five shots at producing healthy offspring, making them die in childbirth) offering someone to pleasure of a press of their button would be as harmless as offering them the pleasure of a smile, or of a glass of drink. There would be certain rules of etiquette, but there wouldn't usually be much debilitating drama.
comment 16y ago · link · parent
I think it would be nice if there was ONE aggregator without any April Fools' crap on it. If you want April Fools' stories you do know where to find them.
comment 16y ago · link · parent
comment 16y ago · link · parent
There should be a library for this. We have libraries that can handle the insanely capricious details of DST for all countries and subnational entities on the planet; we should have no problem providing one list of states and two regular expressions per nation.
(I know it's more or less impossible to reliably catch (e.g.) invalid UK postcodes, but we wouldn't have to. We'd mainly want to catch obvious typos without making things needlessly hard for customers overseas.)
comment 16y ago · link · parent
Your parent is an unsupported personal insult, you're not wrong about that, but if it discourages others from advertising esr essays it's legitimate and meaningful.
comment 16y ago · link · parent
Does HN encourage this kind of redirection so that the blurb linked to may serve as an executive summary or tl;dr or whatever you want to call it? Does HN encourage this kind of redirection to elicit submissions from people with blogs to draw attention to?
comment 16y ago · link · parent
I'm in Sofia, Bulgaria right now. There is a daily direct bus connection from here to Tehran. It does take 48 hours but it's safe, it's clean, and it gets me there.
I guess what I'm trying to say is, yes, there will be problems and setbacks, but more likely than not they will find a way eventually.
comment 16y ago · link · parent