9 ms·
It’s hard work printing nothing
- akkartik 10y agoI love the dry understated link to PHK's http://queue.acm.org/detail.cfm?id=2349257 http://queue.acm.org/detail.cfm?id=2349257 there.
- justinlardinois 10y ago> Here is one example of an ironic piece of waste: Sam Leffler's graphics/libtiff is one of the 122 packages on the road to www/firefox, yet the resulting Firefox browser does not render TIFF images. For reasons I have not tried to uncover, 10 of the 122 packages need Perl and seven need Python; one of them, devel/glib20, needs both languages for reasons I cannot even imagine. This is a better read than the linked article, really.
- icebraining 10y agoThat's rich coming from PHK, whose software requires a full C compiler as a runtime dependency. The reason Firefox pulls libtiff is simply because it uses a generic image manipulation library (libgdk-pixbuf), which in my system it's also used by many other applications - which do require TIFF support. I guess if you have a desktop with only FF installed that may be a waste, but how many people really have FF and not any kind of image viewer installed?
- justinlardinois 10y ago> That's rich coming from PHK, whose software requires a full C compiler as a runtime dependency. What software? And what does it use it for?
- icebraining 10y agoVarnish. It's in their FAQ: https://www.varnish-cache.org/docs/2.1/faq/general.html#why https://www.varnish-cache.org/docs/2.1/faq/general.html#why
- dkarapetyan 10y agoThat's a very sensible requirement. It says in the docs exactly what they use it for. Not like they put in a bunch of other dependencies and some 3rd degree dependency pulled in a C compiler.
- icebraining 10y agoThe C compiler in question pulls in a bunch of libraries for dealing with math problems (libgmp, libisl, libmpc, libmpfr) and zlib. Does their config language need support for "integer points bounded by linear constraints"? And why are they pulling zlib, when they also bundle it? I don't see the difference. Instead of including a specific compiler for their needs, they are bazaar-ing a full generic C compiler (along with irrelevant libraries) just like Mozilla is doing with a generic image manipulation library, which pulls libtiff since many packages that also use it need TIFF support.
- dkarapetyan 10y agoI mean I guess they could bundle tiny C compiler but your point about the C compiler is more about how modern distributions bundle and distribute compilers more than about varnish depending on a C compiler. You can choose to install the smallest subset of the libraries required to enable varnish to perform its job. Not like varnish explicitly requires libgmp to do bignum arithmetic. It's how your distribution of choice installs gcc and pulls in all the stuff with it.
- icebraining 10y agoNo, gcc requires libgmp, it's not just a choice by the distribution. But even if it was, that is exactly why Firefox pulls libtiff - it's not like it explicitly requires the library, it's just how the distribution installs libgdk-pixbuf. Yet PHK uses that as an example of the waste created by the development model.
- hannob 10y agoThe firefox example is not true. Firefox can render tiffs inside PDFs.
- LukeShu 10y agoI don't believe that was true when the article was written.
- justinlardinois 10y agoPossibly. The article is from August 2012, and Firefox started including PDF.js sometime in 2012, according to Wikipedia. I have no idea when PDF.js started supporting embedded TIFFs though.
- kuschku 10y agoYou should definitely post it as seperate story, I would have missed it if not for your comment.
- akkartik 10y agoOk, submitted it and another of my favorite links on the subject: https://news.ycombinator.com/newest https://news.ycombinator.com/newest
- Cogito 10y agoFor those coming later: A Generation Lost in the Bazaar (2012) https://queue.acm.org/detail.cfm?id=2349257 https://queue.acm.org/detail.cfm?id=2349257 https://news.ycombinator.com/item?id=12251323 https://news.ycombinator.com/item?id=12251323
- deleted 10y ago[deleted]
- zeveb 10y agoThe more I see of what goes on under the covers, the more surprised I am that anything works at all. As an example, every gtk+ program I run spews thousands of errors to the console. Why? Are they bad? The programs seem to run anyway, never crashing more than one would expect. So … why the console spam?
- JonnieCache 10y agoThey're probably warnings rather than errors.
- ryandrake 10y agoSo? If they indicate a problem or potential problem, they should be fixed in the software. The fact that there is a "warning" message means that someone, somewhere thought it serious enough to write home about. If they don't indicate a potential problem, then why even print them? Think about how you're supposed to treat compiler warnings: You don't ignore them--they are there for a reason. Quite the opposite--you should use your compiler to treat warnings as errors, enforcing good development practice from the start. The grandparent's comment was about the surprise and concern you feel when you see all of these warnings yet things still evidently "work". When I sit down to a new project, pull down the latest code, start to work with it and see thousands of compile-time and run-time warning messages, the alarm bells start going off in my brain: This project is barely held together.
- bb88 10y agoIt's a deprecation strategy. The warnings are typically for things that will break in the future. GTK can't control yet alone offer patches for the 1 million + programs that depend upon it as a library.
- rhubarbquid 10y agoPrinting those warnings to every end user isn't particularly useful though...
- overcast 10y agoSemi relevant, I just spent the last two hours getting an ancient machine printing to modern copier.
- MOARDONGZPLZ 10y agoI would love to hear the story if you have the inclination to go into details.
- amelius 10y agoPerhaps exception handlers should run inside a sandbox by default, because we know that exceptions are usually not well tested.
- allendoerfer 10y agoSo programs should just fail silently?
- amelius 10y agoThe sandbox could complain if the exception handler fails.
- dkarapetyan 10y agoI always thought low-level programmers (C, C++, assembly, etc.) cared more about minimal abstractions and minimizing dependencies. But it turns out it's the same story no matter what level of the stack you are on. Currently working on a project with 200+ requirements in requirements.txt and growing. Before anyone says microservices just realize that you have taken the same programmers that made this mess and shoveled the problem elsewhere. These people will find a way to introduce 100+ dependencies on other services.
- AnkhMorporkian 10y ago> Currently working on a project with 200+ requirements in requirements.txt and growing. That's incredible. I've worked on some very large python projects before, but 200? That's pure insanity. Can I ask what that project does? I just can't imagine a project where you'd need 200 libraries.
- dkarapetyan 10y agoI can't either. I'm surprised every day. The app is just another generic CRUD enterprise thing. I guess in that regard it's not bad at all. I've seen Java projects with way more requirements.
- ebola1717 10y agoEh, in Ruby, just installing Rails is like 80 dependencies. Would be surprised if Django wasn't 40+
- jokamoto 10y agoDjango itself has no requirements besides the standard library: % pip freeze Django==1.10 That's after a pip install in a fresh virtual environment.
- steveklabnik 10y agoRails itself is broken up into smaller packages, so you can only load parts of Rails if you want. Very few apps actually do. (and that's only like 8 of the 80)
- cperciva 10y agoThere’s an argument to be made that silly error messages are better than crashing browsers There's an argument, but it's a really lousy one. If you're passing NULL as a string to printf, your code is broken. A crash which results in someone tracking down and fixing the bug is far better than quietly doing something which is 100% guaranteed to be wrong.
- lotharbot 10y ago> "A crash which results in someone tracking down and fixing the bug is far better than quietly doing something which is 100% guaranteed to be wrong." Not necessarily. Wrong is relative and can have either small or large costs, and crashing also has a cost to the user (and to the developers if they lose users.) As an example, I play a very old video game (Descent). One of the major problems with one of the modern source ports is that the game crashed under certain conditions -- like if it received a malformed data packet. This is a game that's already fairly tolerant to lost data, so just dropping a bad packet is an acceptable result. By comparison, crashing in the middle of a competitive match is a much worse result, because it affects things like momentum and where various powerups have been left around the map. It would be great to fix the bug that was resulting in malformed packets -- but the cost of directly affecting a high-stakes match is not worth it. I'd rather tolerate a fraction of a percent of lost data every game for the next 20 years than ever have a high-stakes match where the result was tainted by a badly-timed crash.
- zubat 10y agoThere are two use cases there that end up with a conflict of interest: One is the UX of having a crash during an important play session(high stakes match) and the other is the developer ease of tracing and debugging errors, which favors crashing over letting erroneous behavior taint the whole system. In practice this means that during development you want the game to fail fast and loudly so that the biggest bugs are taken care of, but gradually add features to fail more quietly later, e.g. by moving more errors into logs and traces.
- lotharbot 10y ago
- qwertyuiop924 10y agoCould someone give an ELI5 on this? I know talloc's snprintf test is broken, but I'm not sure what the point is.
- acqq 10y agoI actually consider it a good engineering decision printing "(null)" when the 0 pointer is passed to the printing function.