Better HN
topnewbestaskshowjobs
Log inSign up

GrumpySloth

4,901 karma · joined Sep 13, 2020 (6y ago) · 1,641 submissions

Submissions

comment 5y ago · link · parent

> and you never examine the history of the submodule anyway, how often do you look at the history of your dependencies?

All the time. Software is made of bugs, each of your dependencies has bugs, it's on you to diagnose them and, quite often, fix them. Git history is invaluable in those scenarios.

Generally, I'm in favor of pasting the dependencies in your repo. It protects you against things like the leftpad incident and also keeps things nicely in one place, you don't have to go to multiple places to fetch the full source of your program. It also ensures that you have an accurate view of how complex your creation actually is.

But history of dependencies is also useful. At work, we have one giant, heavily patched third-party dependency and a lot of small ones. The big one lives in a submodule. The small ones are pasted in the repo. There is no end to the bugs in them, history is then very useful. And before you say anything, they aren't some random npm packages not vetted by anyone. They're widely-regarded foundational open source projects.

Package managers on the other hand discourage e.g. modifying the dependencies to debug problems in the application. There are more and less correct ways to do that, but generally it's a hoop to jump. With submodules or vendoring - no problem. They also create an illusion of your project being simpler than it really is and are prone to leftpad. And downloading things at build-time is an anti-pattern.

My perspective on software is this: all software has bugs, now the question is: how do we deal with it? How will we debug it? Sadly, there is a lot of "let's assume this works perfectly all the time and do something else" mindset going around as well. Like... How do you debug a malfunctioning GC in your managed language of choice? Will you be able to debug the dependency you've just pulled into your project? Is this language feature a compile-time nicety that will make the interactive debugging later miserable?

comment 5y ago · link · parent

Make itself has a race-condition (bug) built into its design, and its shell language is very ad-hoc. In particular, conditionals in Make are a mystery I'm afraid I'll never understand. Each time I end up having to write a normal shell script and call it from Make. You're not necessarily making your life better by switching to Make.

My static site generator builds the whole site from scratch every time, no caching of results, no caching bugs. It's instant and I use normal shell scripts, so I don't have to deal with Make's oddities.

comment 5y ago · link · parent

As usual, the programmer should look at the generated assembly, when reasoning about performance. Sometimes compilers are smart, optimizing away things people wouldn't imagine they can, and sometimes they are really dumb, pessimizing code in unimaginable ways (to the extent that just deleting code from the output, which doesn't naturally correspond to anything in the source code, makes the output better). Relying on the compiler to perform magic without verifying the results is an antirational stance. Personally, I'd prefer if optimizations were applied based on what's visible in the source code, instead of the wild-west that we have now. E.g. inline function calls based on annotations left by the programmer, not because you (the compiler) feel like it.

The Rust compiler can be very good at optimizing iterator pipelines, however a while ago I wrote a function which didn't have any branches whatsoever in it, but the generated assembly was ridden with them. What could have been 5 instructions consisting of simple bit operations (everything done in registers, not loading anything from memory), ended up as 12 (? IIRC) ridden with conditional jumps. No matter how I changed the source code, which operations I used, the output was the same. Getting to the desired result shouldn't be stifled by the compiler having a mind of its own, making its own decisions. A sane default could be set, but some annotations to have a greater control over the result would be appreciated.

Optimizing compilers also make debugging harder. Making the the output and the source code closer together would help making sense of a debugging session.

comment 5y ago · link · parent

I don't really understand the argumentation against virtual addressing. How else would an OS guard against access to memory that wasn't reserved by the process attempting to access it? And even without indirect addressing, some mechanism for controlling which parts of memory are readable/writable/executable is needed. So a page table of some kind would still be necessary. Or am I missing something?

comment 5y ago · link · parent

> A bit pedantic, but I think this statement "Probably the most popular non-POSIX shell" about fish may need this qualifier "For Linux Systems ...."

Both versions are true, given the chasm between the popularity of Linux vs other Unix clones.

comment 5y ago · link · parent

"The Dark Ages" is not a synonym for The Middle Ages. It refers to the period of 5th-10th century, when Europe experienced its biggest cultural stagnation.

It's not to say that the rest of The Middle Ages was particularly innovative, but The Dark Ages were the The Middle Ages of The Middle Ages.

comment 5y ago · link · parent

> I think if one thinks of mapreduce as an operation on sets not lists, it should be obvious that the monoid must be commutative.

If anything, you could think of it as an operation on multisets, but not sets. Sets don't have repeated elements.

comment 5y ago · link · parent

Right, Python2 is still the default on Debian, so I didn't notice.

comment 5y ago · link · parent

Socket programming never clicked for me before I learned about the protocols themselves first. My brain just rejected using an API for something I didn't understand. So if you're like me, I highly recommend reading Comer's "Internetworking with TCP/IP" first, and sitting down to socket programming later.

comment 5y ago · link · parent

Although Python seems to be the exception to the rule here, your example isn't exactly right. In your example, you're performing integer division, not floating point division. In most languages, integer division by zero is indeed some kind of exception (or UB, which will most likely result in a hardware exception, causing a signal sent to the process). However, floating point division by zero is well-defined, as per definition of floating point arithmetic (in some RFCs), and most languages don't throw exceptions in this case. Python indeed seems to be the exception to the rule.

comment 5y ago · link · parent

Which languages would those be?

comment 5y ago · link · parent

No, you don't. You get Infinity. That's how floating point works.

comment 5y ago · link · parent

By that logic, chemistry is a branch of physics.

Scientists argue about philosophy of science, because it's about their field. It doesn't make science a philosophy of science [EDIT: in previous version I wrote it the other way around].

> It's hard to do cosmology or particle physics without tripping over philosophy. "Shut up and calculate" can only take you so far.

It's also hard to do cosmology or particle physics without using a computer, and scientists will argue the merits of C++ vs Julia vs Python; yet they aren't a branch of IT.

comment 5y ago · link · parent

> Would you argue that, although philosophy used to concern itself with how to live a good life (for example, Stoicism) these questions are now better addressed through science of the type done in uni psychology departments?

No. I don't think it's science's business. Science is descriptive. And psychology in particular doesn't live up to Popper's standards for science. There are psychology departments trying to change that. I wish them all luck and hope they succeed.

And I do think that there are worthwhile elements in the writings of Stoics and Epicureans (I favour the latter), once you subtract from them the parts that are in the domain of science.

comment 5y ago · link · parent

> The realm of enquiry that science can operate on is by neccesity smaller than that which philosophy can act upon.

Maybe I'm misunderstanding you, but it sounds like you're suggesting that philosophy can talk about anything that science can. And of course, it can, in the sense that there will be uni positions for talking about just about anything in philosophy department, but I'd say that for a long time now when science is able to treat a subject, philosophical investigation of it becomes meaningless pursuit of words, disconnected from reality. And just like religion used to answer some questions about how the world works, but over centuries was in perpetual withdrawal up to the point where it's not its domain at all anymore, philosophy in areas of empirical reality is expected to be superseded by science and as such seems to be as worthwhile as ancient talks about arche and medieval religious talks about creation of the world. What understanding did we gain from arguing over whether the world is made of fire, of water, of ether/whatever? Whether it's deterministic or not? None.

It seems it would be a better use of everyone's time if philosophy withdrew from areas of current and future scientific inquiry.

comment 5y ago · link · parent

I've worked at two companies so far and at both SaaS things like mail, chat, videoconferencing were accessible without a VPN, but git repos, CI, development servers, basically anything self-hosted is behind a VPN. So you won't stream video for your video calls over the VPN, but the source code, logs, builds, etc. are protected by VPN.

comment 5y ago · link · parent

Software bugs in practice are rarely caused by fundamental problems. Sloppiness, incompetence and, in this case, different priorities are much more likely. Removing data is not a priority for Facebook.

People like to invoke all those theorems from computer science. That gives them an air of being knowledgeable. But at the end of the day, it's much more common that the program malfunctions not because of the halting problem, but because the language it was written in doesn't do bounds-checking on arrays, someone made an off-by-one error, or someone copy-pasted some code and the objective of the system was data collection, not data deletion, so the task of reviewing and testing the code was deprioritized in favour of something more profitable.

But talking about how you struggle daily with the fundamental problems of the universe sounds so much cooler.

comment 5y ago · link · parent

In my experience, updating DNS is surprisingly fast, even though I typically set my TTLs to 3 hours. Typically I don't have to wait more than 2-5 minutes. Faster than e.g. updating an avatar on GitHub.

comment 5y ago · link · parent

HaikuOS looks like an OS dedicated for desktop use. I've just gotten myself a Mac mini last week. Big Sur is the ugliest OS I've ever seen. If that's where the future is heading, then I'm not sure I want to continue using computers. I could use some dated UIs, such as the Haiku one.

comment 5y ago · link · parent

The biggest blow to RSS was dealt by browsers dropping support for displaying it in human-readable form, not Twitter/whoever ceasing publishing them.

Thanks to that, now when someone, who doesn't know what that is, stumbles upon a website linking to one and follows such a link, they'll be greeted with gibberish. Previously, they could see buttons exposing the functionality of subscribing to such feeds and find out about this wonderful technology. Now, they'll just get the hell out of that page.

Mozilla, champion of the free internet, right...

comment 5y ago · link · parent

Big projects move slowly to newer standards. E.g.[1]:

> Chromium targets C++14; C++17 support is not expected before mid-2021.

[1]: <https://chromium.googlesource.com/chromium/src/+/master/styl...>

comment 5y ago · link · parent

In my experience with Windows 10, it depends on the app. A lot of apps are blurry. Even some of the ones shipped with the OS, made by Microsoft, not to mention third-party apps. Linux with KDE works better than Windows here[1].

I've also read the opposite opinion about macOS - namely, that it's the platform that does it best. I've ordered my first Mac (mini). It's arriving in 2 weeks. Will see then.

Overall, poor HiDPI support on Windows is one of the main reasons why I decided that I don't want to switch to Windows as my main driver and instead try macOS.

[1]: GNOME on the other hand is terrible. It's possible to get i3 to work with HiDPI, but there's no end to the work you need to perform to do that.

comment 5y ago · link · parent

It's common practice for online publishing platforms to show a different title in site's body and in its title tag.

comment 5y ago · link · parent

>> Debuggers work well for what, windows and websites?

> I spend most of my time on a large C++ project that does neither of these things, and I still use gdb a lot.

I think that, when GP wrote "windows", they meant the operating system. And when they wrote "debuggers work well", they meant the quality of debuggers, not whether using a debugger is a good idea. Quality of Windows debuggers is generally on a whole other level than on Linux. Chromium DevTools also has a nice debugger. I don't know about Java.

comment 5y ago · link · parent

You seem to think that the meaning of "STEM" includes anything that anyone applied the word "science" to. But no, the "science" part is precisely the "hard" sciences. E.g. psychology, economics and theology aren't included in STEM.

comment 5y ago · link · parent

Counts as government.

comment 5y ago · link · parent

Is there a spec for Object Pascal?

I'm wondering what document I should follow, if I wanted to write a compiler for it.

UPDATE: From what I see[1], there is a proposed standard, but no finalized one.

[1]: <http://pascal-central.com/standards.html>

comment 5y ago · link · parent

It's also statistically unlikely for males to be serial killers as well.

comment 5y ago · link · parent

30ms latency is acceptable. But that's the best we ever had.

High-end Android phones have 120+ ms latecy. That's easily noticeable and actually annoying (at least to me).

My personal pet peeve is the latency of input when i'm starting new applications in KDE. E.g. I'll start a new terminal with Super+Enter, followed by a Super+Right Arrow in order to tile it to the right. But the latency is big enough, that often it's not the terminal that ends up tiled, but the application that had focus earlier, e.g. a web browser. It's really annoying.

I also don't understand how still in 2020 when I move a window with the mouse, the window can't keep up with the mouse.

30ms input lag is what we should work towards. But that's not what we have today. Today is actually crap.

comment 5y ago · link · parent

More importantly, when you have to adhere to the "Generic Verb-Generic Noun" pattern, the namespace fills up quickly and now creating a new program and sharing it is stifled by two problems:

1. coming up with a name that won't clash with others in already-extremely-limited namespace

2. marketing of a generically-named thing.

In the Unix world, let's take top. After top came htop. How would that play out in the Powershell world? List-Processes -> SuperDuperList-Processes?

1
5152535455