Recent submissions

Comment · 4 years ago
Ken Thompson's famous paper on implementing regular expressions is surprisingly simple and yet extremely sophisticated at the same time. The "heart" of the method he proposed was the use of a stack in order to compile the expression to code that parses it, which in this case was IBM 7094 object code.

I find this idea beautiful, and wanted a chance to play around with it for myself, as well as demonstrate to anyone interested the way the algorithm works. Since the aim is demonstration rather than a concrete (or usable) implementation, it makes sense to compile to a high-level language, which is why I have started by targeting Go.

All suggestions are welcome!

Comment · 9 years ago
He emphasized in the article that he was talking about patterns, not individuals. So there's no way you could draw the conclusion that he meant to suggest that his female colleagues were any less capable than their male counterparts.
Comment · 9 years ago
That is preposterous. What if they're just more interested in other things? Why do you assume a priori that men and women share the same interests internally? What evidence do you have which suggests this? OR are you just making an assumption because it seems "unsexist"?
Comment · 9 years ago
I don't mean to be offensive or inflammatory, but how is this a discovery? Yes, money and success don't buy you happiness; living in a complete community is healthy. How was this not completely obvious?
Comment · 9 years ago
Yes, to dismiss theology along with alchemy -- in the same sentence -- as altogether useless is childish oversimplification. Rejecting Biblical faiths is one thing, but to ignore the impact the Christian worldview has had on Western science, including the life of Isaac Newton (who would never have invested time in studying the physical world if he didn't believe it had a Creator, and therefore order), either shows a gross lack of historical knowledge or poor taste. It's a pity because I agree with him otherwise about the risk taking, which was the main point of his article.
Comment · 10 years ago
Another point is that a lingua franca is a common tongue for communication between people with different mother-tongues: not a replacement for native languages. For example in East & Central Africa Swahili is used for cross-communication, but individual ethnic groups maintain their cultural identities by holding onto their own languages. In this sense, I don't think you could easily find a developer who would struggle to understand anything (simple enough) written in Python, even though they don't use it on a day-to-day basis, so I think languages like Ruby/Python are already sufficient lingua francas for today's developers.

One more thing, maths notation is ridiculously diverse and overloaded and is in no way entirely uniform -- or even close. This is a problem when the disparity exists within a branch of maths, but an advantage when it's between very different areas, such as Analysis and Combinatorics.

Comment · 10 years ago
I couldn't disagree more strongly. DSLs are at the heart of efficient programming because they encourage separation of concerns; that's why the Unix shell is so powerful, fundamentally it's a collection of different programming languages with well-defined interfaces for communication.

Secondly, personally speaking I've never had much difficulty understanding programming languages I'm unfamiliar with provided their syntax is sufficiently similar to those I use. For example, I've never much worked in Ruby but glancing at Crystal there's nothing really confusing about its syntax. Yes, we see new languages popping up here almost weekly, but we don't see new paradigms: usually most of the stuff here is procedural and on occasion it's functional. Furthermore, having seen the remarkable benefits the introduction of different paradigms has had for the community at large (think about a world without LISP for a moment) I for one believe we should encourage the development of new and strange ideas; most of them will fail, but every so often we might get a new world.

Comment · 10 years ago
Very fair point, but what about the fraction of people who not only consider it an expense, but an affront to moral dignity? For example, Politico did a poll which showed that 46% of Americans believe that everyone should use the bathroom of their birth. Should their comforts be sacrificed for the sake of 0.6% of the population?
Comment · 10 years ago
I agree, in fact taste might rightfully be defined as that which is obvious to an experienced developer in the environment. Code which simply relies on conventions and avoids complexity is often immediately elegant.
Comment · 10 years ago
Worse even, the "once removed" notation has no notion of direction, so it's inherently ambiguous. I'm also pretty sure that less half of the people I hear using it know what it means (or tries to mean).
Comment · 10 years ago
Why use a file tree when you have a terminal? It's been shown to be the most effective (and before you shoot, by "effective" I mean fast) way to manage files, and that way you can do advanced searching through whatever code base you're using. Plus you can access all the other awesome tools (like Git) for managing your project.
Comment · 10 years ago
> A GUI editor can do everything a terminal based emulator can; there are lots of things a GUI editor can do that a text editor can't.

Really? I'd like to see sublime handle text manipulations with the same efficiency and precision that Vim provides.

> What is the advantage of terminal based editors? As far as I can see, ubiquity, which is made less compelling when you need a host of plugins to do the things you mention.

What about integration with the shell? It's not merely a matter of ubiquity: I don't really need a document tree when I have the entire terminal at my disposal a :sh or :wq away.

> Terminal editor enthusiasts seem to be under the effects of something like the Blub paradox, where any feature of a GUI editor described to them is dismissed with "why would I ever need that?" while anything in terminal emulator can do is considered essential.

This would be an apt description if the majority of "terminal editor enthusiasts" were as inexperienced with GUI editors as their GUI counterparts, but in fact the opposite is true. Most Vim/Emacs users tend to have hundreds of hours experience working with GUI editors, but are for some reason convinced that they (the editors) were inferior. Finally, let me give you an irrelevant (but fun) fact: PG, the original proposer of the Blub paradox, uses vi.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton