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

This is an incredibly good piece of journalism. It gives tangible examples of the issues found, puts it in context of prior work done by the developer, features first-hand verification of the claims made against the code; the author reached out for comment to all the parties involved.

I'm also consistently impressed by the quality of comments at Ars Technica whenever I visit the site.

This convinced me to subscribe. We need more journalism of comparable quality.

comment 5y ago · link · parent

> His dismissal of C++ as "not having a build system" seems like considering the language without the ecosystem. Using cmake and llvm solves all of his gripes on C++.

Last week I debugged an issue in a big C++ codebase, where we were getting memory corruption. Source of the issue? Compiler, linker and build system being separate things and only compiler understanding types (also, lack of modules, which is another symptom of build system being separate from the language). Namely, conditional compilation was involved, someone made a struct which had a field in it based on whether a preprocessor constant was defined or not (passed with -D to the compiler on the command line). Turned out some files were compiled with the define and some not, so some files were compiled based on the assumption that this struct is N bytes long, and some with the assumption that this struct is N+M bytes long. But the linker doesn't have any information available to it to detect this error.

And then there is the issue that to write a C++ program these days, it doesn't suffice that you just know C++. Languages you need to know:

- C++

- language of your build system, which is always handicapped, yet Turing-complete

- Python

- if something goes wrong, and you need to debug something: Make with its custom shell-language

- shell

It's a tower of babel. For all the whining on users of other languages for using libraries, C++ users have a lot of complexity hidden in their build systems.

In Zig and the not-yet-released Jai, you only need to know the language you write your program in. The "if" in your language of choice is perfectly suitable for expressing conditional compilation. Structs in your language of choice are perfectly suitable for expressing declarative configuration.

comment 5y ago · link · parent

I'm talking about Powershell startup, not Windows startup.

comment 5y ago · link · parent

I'm running Windows 10 on a Ryzen 5 with 16GB of RAM and an NVMe drive. Powershell takes something between 0.5 to 1 second to start. The first ~20-30 seconds after the start it feels sluggish when doing simple tasks like listing directory contents. It makes it very unpleasant to use.

comment 5y ago · link · parent

As far as I know, BC doesn't do floating point arithmetic. It does fixed point arithmetic, built on top of arbitrary-precision integer arithmetic. Which is why it won't give you one of those funny floating point answers. It's what a human would do on a piece of paper.

Floating point implementations can vary not only between languages, but also between different CPUs, if the language relies on the hardware implementation (which is the smart thing to do in most cases).

As a side note: Python's implementation of FP isn't standard-compliant. E.g. when you divide by 5.0 by 0.0, the standard says you should get a +inf. In Python you get an exception.

comment 5y ago · link · parent

It seems yours is the more widely-known phrasing of it, which however was not the original. According to [1], it comes from "The Elements of Programming Style", where it was worded the way it's quoted in the article.

[1]: <https://github.com/dwmkerr/hacker-laws#kernighans-law>

comment 5y ago · link · parent

But it doesn't rely on CAs. It relies on TOFU.

comment 5y ago · link · parent

That's probably, because the regexes you linked to are Perl-flavoured regexes, whereas this website seems to use the "Unix Extended" variant of regex.

comment 5y ago · link · parent

The code, which would break, was already broken. Just in far worse ways than throwing exceptions: silent memory corruption. And there would be no backwards-compatibility breakage, since in cases, where it would throw, currently UB is triggered.

comment 5y ago · link · parent

> it’s possible to write completely type and resource safe code in c++ now

"It's possible" is a rather low bar. It's also "possible" in C. Is it easy though? I wouldn't say so. Not if you push lambdas over queues to be invoked in another thread, or in the same thread, but later. Not if you take references to elements of std::vector. Not if you use std::vector<bool>. Not if you use operator[] on std::vector/std::array without tweaking some macros, because C++ committee in 2021 is still not convinced that bounds-checking is a reasonable default.

It's very easy on the other hand to write perfectly idiomatic "modern C++" which is memory-unsafe. Well... Easy if you figure out which one, among a dozen, is the right way™ to initialize a variable. (And then go and read code which initializes std::vector in all those different ways and try to guess which one does what.)

comment 5y ago · link · parent

Google Search users aren't Google's customers. Making Google Search useful to its users is not what makes it profitable. It only needs to be mildly better than the competition, so that people use it and can be used for collecting data and serving ads.

So GP may not be "an unprofitable long tail". GP may in fact be "a profitable typical long tail for whom Google Search is frustratingly unhelpful".

comment 5y ago · link · parent

> the plurality of way to install application, plus manage their own dependencies, was a nightmare.

https://xkcd.com/927/

comment 5y ago · link · parent

1. There is no link in the article to the zip file.

2. Searching for open3A in duckduckgo brings me to a page that spits out PHP errors and doesn't give me anything.

3. The only way that I now know where the zip file is, is because another commenter linked to it.

4. We've seen companies disguise something as open-source, when it wasn't.

5. Open source is commonly hard-to-sell.

So no, it wasn't 10 seconds to verify and the author didn't make it particularly easy to do so. My doubts are completely natural, given past news in "open-source". Are you commenting in bad faith?

comment 5y ago · link · parent

I don't see a link to it in the article. I've only noticed where it is after another commenter linked to it.

comment 5y ago · link · parent

The article doesn't mention GPL. It's unlikely that this code is GPL-licensed. Moreover, yeah, probably the customer can modify the code, but can they resell it or share it with someone else for free? If not, it's not open source.

From "The Open Source Definition"[1]:

> The license shall not restrict any party from selling or giving away the software as a component of an aggregate software distribution containing programs from several different sources. The license shall not require a royalty or other fee for such sale.

[1]: <https://opensource.org/osd>

UPDATE: it seems it is licensed under AGPLv3. So it is open source. Interesting.

comment 5y ago · link · parent

Aside from obstructing access, ISO produces really low-quality standards. The prose alone leaves much to be desired in terms of clarity and concision. Knowing that, I'm relieved each time I am to deal with an IETF standard instead, which wins on both fronts (quality and access).

comment 5y ago · link · parent

I've heard opinions that SwiftUI is inspired by React.

comment 5y ago · link · parent

And real numbers are ∞-d, over rationals.

comment 5y ago · link · parent

> To your point about approximations vs not, if you have an algorithm that, for any desired approximation accuracy can compute the square root to that accuracy in a finite number of steps, then that process is as much "the square root" as anything involving the real numbers.

Not really, since approximations, no matter how accurate, don't preserve algebraic properties. You only get to know what it's bigger/smaller than.

comment 5y ago · link · parent

First sentence on Wikipedia[1]:

> In mathematics and computer science, an algorithm (/ˈælɡərɪðəm/ (About this soundlisten)) is a finite sequence of well-defined, computer-implementable instructions, typically to solve a class of problems or to perform a computation.

Newton's method is finite too. You perform finitely many iterations. It doesn't calculate roots. It calculates their approximations.

[1]: <https://en.wikipedia.org/wiki/Algorithm>

comment 5y ago · link · parent

Number theorists work with integers, not naturals. And they too will agree with me, as they mostly work with polynomials, which show exactly that.

I also didn't say natural numbers are training wheels, just this metaphor, which to use HN lingo: doesn't scale.

comment 5y ago · link · parent

Not algorithms. There will be infinite addition involved, and algorithms are finite.

Thinking of multiplication as repeated addition also won't explain anything about it. It's a separate operation. Deal with it. For similar reasons, you can't calculate x-th power of a number, when x is irrational, by decomposing it into exponentiation and roots.

This metaphor is just training wheels. At some point you should lose it.

Together with the notion that "multiplication is repeated addition" comes the notion that numbers are quantities. Only some of them are, and this isn't really what makes them numbers. Now what exactly gets repeated, when you don't have quantities?

comment 5y ago · link · parent

> You can definitely see multiplication as repeated addition.

Only for rational numbers. Doesn't work for real and complex numbers.

> It's even a useful thing to do, how else would you define multiplication?

Axiomatically, not algorithmically.

comment 5y ago · link · parent

> Though I guess there is an implicit expectation that it is the before value that is used.

This is what people normally learn in primary school about the meaning of this phrase.

comment 5y ago · link · parent

> - I don't get lisp's (lisp-2) dynamic scoping (a big reason I haven't switched from vim to emacs). I'm much more comfortable with the lexical scoping of scheme (lisp-1).

"Dynamic vs lexical scope" doesn't have anything to do with "Lisp-1 vs Lisp-2". "Lisp-1 vs Lisp-2" is about whether function values are distinguishable from "defun"-defined functions. "Dynamic vs lexical scope" is about whether variable name-resolution is done based on the lexical scope stack, or the call stack.

You can enable lexical scoping in Elisp files by starting them with:

  ;; -*- mode: Emacs-Lisp; lexical-binding: t; -*-
That's how my ~/.emacs.d/init.el starts.

comment 5y ago · link · parent

> - Monotonically-growing DOM slows things down eventually, unless you start de-rendering previous "pages", which adds even more complexity and unpredictability (Ctrl+F doesn't behave as expected, for example)

Is this what Twitter is doing? Is this why Ctrl+F almost never works there?

comment 5y ago · link · parent

> Modula-2 isn't that much big influence on OCaml, its modular ideas were already present in CLU, ML and Mesa.

Modula inspired ML in this regard: <https://dl.acm.org/doi/10.1145/773473.178245>

ML modules alone don't provide separate compilation.

comment 5y ago · link · parent

This reads like something written by GPT-3.

> I’ve believed in it much so I joined sourceforge joined a team, also started a project myself even.

> Their founders built an MVP and took money from VCs and then had to responsibly return their money 10x. They eventually all cashed out and now driving luxury sports cars.

What a ramble.

comment 5y ago · link · parent

Chromium already handles that. There is no need to rewrite Freetype in JS and require websites, which display text, to ship a freetype.js. But this is what happens for maths in Chromium.

No need to turn simple documents containing some formulas into applications.

comment 5y ago · link · parent

> i expect annual flu vaccines to improve exponentially

This sentence doesn't mean anything.

1
5152535455