4 ms·
All these “X in less than Y lines of code” efforts strike me as fundamentally misguided because they seem to confuse succinct notation (short code) with efficie
by qubex 7y ago
All these “X in less than Y lines of code” efforts strike me as fundamentally misguided because they seem to confuse succinct notation (short code) with efficient computation. To whit: there’s absolutely nothing preventing anybody whipping together a de facto DSL wherein one can call a single render_terrain( ) function and get the task done with a single token, particularly in today’s environment of dime-a-dozen new programming languages.
- pickledish 7y agoI think any piece of code falls on a spectrum, somewhere between "software engineering" (efficient, well documented, etc) and "art" (interesting to look at in some way, someone had fun making it, etc). The two ends of the spectrum serve completely different purposes but I think both deserve to be appreciated! Just for different reasons. This post (IMO) veers pretty close to the "art" side of the spectrum, so it doesn't make much sense to talk about its efficiency.
- qubex 7y agoIt’s probably not so much a spectrum as it is a pair of orthogonal axes.
- sweetheart 7y agoI don’t think anyone is saying they are particularly computationally efficient. It’s just an extra limitation to make the process of writing the code more fun. It’s just for entertainment.
- nkrisc 7y ago> To whit: there’s absolutely nothing preventing anybody whipping together a de facto DSL wherein one can call a single render_terrain( ) function and get the task done with a single token Yeah they could. But it's not a competition and would anybody care if they did?
- dragonwriter 7y ago> All these “X in less than Y lines of code” efforts strike me as fundamentally misguided because they seem to confuse succinct notation (short code) with efficient computation. I've never seen any comment about any of them which confused the brevity for computational efficiency, so I don't think that's an issue at all, and don't know where you got that idea. > To whit: there’s absolutely nothing preventing anybody whipping together a de facto DSL wherein one can call a single render_terrain( ) function and get the task done with a single token Sure, but they don't, because that's usually not interesting. Leveraging and demonstrating ways to do a task with small amounts of code using tools that are available but flexible enough that they can be applied to other tasks or variations of the task that are not identical, OTOH, is interesting and useful, and tends to be what people do in these things.
- qubex 7y agoJudging by the downvotes I’ve really rubbed a lot of people up the wrong way.
- dahart 7y agoDownvotes always feel pretty harsh, but it helped me a lot to realize that downvotes are usually impersonal. Think about downvotes as symmetric with upvotes; upvotes don’t need justification, and they are given for a wide variety of reasons. Same with downvotes. In any case, I find it best to start by assuming not that people are getting rubbed the wrong way, but that I actually wrote something incorrect and didn’t know it. The primary reason downvotes are given is for information that is either incorrect or irrelevant to the thread. Without passing judgement or being upset, it is safe to say your top comment is incorrect about this article, and thus irrelevant here. Also, note the guidelines ask to not complain about downvotes, which is why the immediate comment above is getting them. See “In comments” https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html I realize that justifying downvotes or continuing to talk on a thread that’s gone south doesn’t necessarily make you feel any better, but I honestly hope that helps. These things have helped me in the past.
- qubex 7y agoThank you for your kind words. I didn’t mean to come across as ‘complaing’ about downvotes, just as I didn’t mean to offend anybody with my comment (which admittedly was rather generic and probably not a specific response to the posted article, rather something I’d been meaning to get off my chest for a while). I just hope I didn’t come across as dismissive, because that wasn’t my intention.
- username90 7y agoPeople weren't offended by your comment, it was just ignorant. 8 of these 20 lines are comments, so it is not code golf, just a very simple algorithm that anyone can read and understand. If you wish to not get down voted in the future you should probably try to read and understand things before commenting.
- dahart 7y agoSince the article is written in a generic programming language, not a DSL, and has the math derivation and notes on performance, maybe you got confused about what this is? It’s not code golf, it’s demonstrating that this algorithm for terrain rendering is fundamentally expressable in a small amount of code. > To whit: there’s absolutely nothing preventing anybody whipping together a de facto DSL That’s true, but that’s not what happened here, the author did not write a DSL, so this is not a valid example of your first sentence. As such, your phrase ‘to whit’ is misused, the phrase is synonymous with ‘specifically’. Also just FYI it’s spelled ‘to wit’.