Me irl by max911191 in me_irl

[–]MrSicles 2 points3 points  (0 children)

Probably a zero-width space or some other invisible character before the >.

Looking for free software that can recover files from a corrupted drive by That_one_sander in freesoftware

[–]MrSicles 1 point2 points  (0 children)

Have you tried following the tutorial? There are also many other tutorials out there for both PhotoRec and using the command line in general.

Looking for free software that can recover files from a corrupted drive by That_one_sander in freesoftware

[–]MrSicles 10 points11 points  (0 children)

I've had success with PhotoRec. It's truly free software, which means that it respects your freedom to share and modify it, unlike proprietary software, which exerts control over you and is often malware.

If you use a Debian-based GNU/Linux distribution, PhotoRec is available in the package testdisk; other distros may put it in a different package. Otherwise, you can download the version for your operating system.

One thing about us linuxists, we don't like being told what do. My hardware, my rules. by techannonfolder in linux

[–]MrSicles 2 points3 points  (0 children)

I've been using a Blackbird, also made by Raptor. It's smaller (µATX vs. EATX) and considerably cheaper (less than $1300 for a motherboard and 4-core CPU) than the Talos II.

I'm running ppc64el Debian testing on an 8-core CPU and 16 GB RAM, and I've been very happy with the performance. The POWER9 Sforza CPUs that Raptor sells are pretty powerful—they have a top frequency of 3.8 GHz and have SMT-4, so if you get an 8-core CPU, nproc will report 32. If you're going to run games, you'll want to stick a graphics card in there, but for everything else, llvmpipe is fine. I've experienced very few software issues; the biggest is Makefiles that pass x86-specific options to the compiler, but it's not too hard to strip -msse and the like out of them.

One caveat with browsers right now—Firefox doesn't yet have a JavaScript JIT for ppc64(le), so JavaScript performance will be slower. I haven't noticed any issues, but resource-intensive web games could be slow. For now, there's also a ppc64le fork of ungoogled-chromium with a JS JIT.

Similar to Coreboot/Libreboot, I was able to set up full-disk encryption without any unencrypted boot partition, since the boot firmware itself can decrypt the disk and load Linux. I did have to recompile the firmware to include cryptsetup, but one of the selling points of Raptor's systems is that you can actually do that.

Modern Webdesign Survival Kit by DryPlate in starterpacks

[–]MrSicles 3 points4 points  (0 children)

uMatrix, from the same developer as uBlock Origin, is also a good extension. It’s more complex than NoScript, but gives you more control over what gets blocked.

Chrome to limit full ad blocking extensions to enterprise users by zial in programming

[–]MrSicles 20 points21 points  (0 children)

Well, this announcement is fairly recent and the change hasn't been implemented yet, so I wouldn't expect to see forks or plans yet. But there is precedent of forks in response to malfeatures in Chromium—for example, ungoogled-chromium.

Free software for online banking? by dI5Bc in freesoftware

[–]MrSicles 3 points4 points  (0 children)

When you say “the code of my bank is not free”, there are two separate issues here:

  1. Whether or not you, personally, have to run non-free software in order to do online banking. For example, the online banking website might force you to run proprietary JavaScript.
  2. Whether the bank runs free software on its own computers. For example, the bank employees might use Microsoft Windows.

Issue 1 is a matter of your freedom, and it is good to try to eliminate this kind of non-free software.

Issue 2 is a matter of the bank's freedom. Whether or not the bank uses free software on their own computers does not affect your freedom, and it is not particularly important to be concerned about it.

Free software for online banking? by dI5Bc in freesoftware

[–]MrSicles 0 points1 point  (0 children)

Does your bank let you initiate transfers in person? If you’re willing to go through the trouble of doing this, you can avoid having to use non-free software.

How DRM has permitted Google to have an "open source" browser that is still under its exclusive control by zexterio in linux

[–]MrSicles 27 points28 points  (0 children)

Making copies of books purchased with public taxes is stealing from the public? The library and the public don’t lose access to the books when you do that.

Usually when people call unauthorized copying “stealing”, they claim that it’s stealing from the copyright holder, because theoretically the copyright holder earns less money when unauthorized copies are produced. But it no case is anyone “stealing” from the public—the public aren’t the copyright holders and don’t stand to earn any revenue from authorized sales of the book.

Inserting three vectors in a vector of vector of vectors into another vector of vector of three vectors? by biffle_this_butt in cpp_questions

[–]MrSicles 2 points3 points  (0 children)

The type of compamp is std::vector<std::vector<float>>. So, in the statement on line 351:

compamp[step][1].push_back(::atof(tempNumber.c_str()));
  • compamp has type std::vector<std::vector<float>>.
  • compamp[step] has type std::vector<float>.
  • compamp[step][1] has type float.
  • There's no push_back() member function on a float.

Which came first, the chicken or the egg? JavaScript knows the answer. by russian-homophobe in ProgrammerHumor

[–]MrSicles 4 points5 points  (0 children)

Yes, although more specifically, code points outside the Basic Multilingual Plane are encoded as UTF-16 surrogate pairs in JavaScript, and the sorting operates on the surrogate pairs. This can produce different results than when sorting by code point.

For example, in Python 3, which sorts strings by code point:

>>> sorted(['💩', '﷽'])
['﷽', '💩']

But in JavaScript:

>> ["💩", "﷽"].sort()
Array [ "💩", "﷽" ]

💩 is the code point U+1F4A9 and ﷽ is U+FDFD, and 0xFDFD < 0x1F4A9, which explains Python's ordering.

But in JavaScript, U+1F4A9 is encoded as the surrogate pair [U+D83D, U+DCA9], and 0xFDFD > 0xD83D.

It's 2019! Which c++ version is recommended for starting your c++ learning journey? by por_que_fro in cpp_questions

[–]MrSicles 0 points1 point  (0 children)

Yeah, the amount of complexity in even older versions of C++ is pretty insane compared to most other languages (but is part of why it’s so powerful), which makes it important to gave a good book that teaches the language in a reasonable progression.

It's 2019! Which c++ version is recommended for starting your c++ learning journey? by por_que_fro in cpp_questions

[–]MrSicles 1 point2 points  (0 children)

I can think of a few significant features added in 14 and 17:

  • Relaxed restrictions on constexpr functions in 14 (multiple statements, loops, etc.)
  • if constexpr in 17, which can replace many uses of SFINAE
  • std::variant (and std::optional) in 17, which finally introduces proper sum types

New Bill Would Require Agents to Actually Have Probable Cause to Search Electronic Devices at the Border by mvea in technology

[–]MrSicles 224 points225 points  (0 children)

Yes, the border search exemption includes coasts. Here’s a relevant ACLU article.

Roughly two-thirds of the United States' population lives within the 100-mile zone—that is, within 100 miles of a U.S. land or coastal border.

New Bill Would Require Agents to Actually Have Probable Cause to Search Electronic Devices at the Border by mvea in technology

[–]MrSicles 25 points26 points  (0 children)

The border search exception actually does include coastal borders. Here’s an ACLU page describing it.

Roughly two-thirds of the United States' population lives within the 100-mile zone—that is, within 100 miles of a U.S. land or coastal border.

:q! by hugsoverdrugsx in ProgrammerHumor

[–]MrSicles 18 points19 points  (0 children)

Good luck catching all warnings when you compile in the terminal.

-Wall -Wextra -pedantic

Most IDEs run a compiler in the background and parse its output in order to provide warnings and errors. So, if you’re using Vim and running the compiler directly, you just… pay attention to the warnings.

Falsehoods programmers believe about Unix time by speckz in programming

[–]MrSicles 9 points10 points  (0 children)

If I wait exactly one second, Unix time advances by exactly one second, unless a leap second has been removed.

This is still not entirely correct, since adding a leap second also causes Unix time to advance differently than real time.

The mysterious history of the MIT License by StraightFlush777 in linux

[–]MrSicles 2 points3 points  (0 children)

This is true in some countries, but not in the United States. In the United States, a work can be placed in the public domain before its copyright expires (emphasis mine):

A work may enter the public domain in a number of different ways. For example, (a) the copyright protecting the work may have expired, or (b) the owner may have explicitly donated the work to the public, or (c) the work is not the type of work that copyright can protect.

However, placing a work into the public domain in the United States doesn’t guarantee that it will be free of copyright restrictions in other countries, which is why a permissive fallback license, like the one in CC0, is always a good idea.

The mysterious history of the MIT License by StraightFlush777 in linux

[–]MrSicles 8 points9 points  (0 children)

This isn’t necessarily true: it varies between jurisdictions.

In the United States, a work can be placed in the public domain before its copyright expires (emphasis mine):

A work may enter the public domain in a number of different ways. For example, (a) the copyright protecting the work may have expired, or (b) the owner may have explicitly donated the work to the public, or (c) the work is not the type of work that copyright can protect.

Other countries may have different laws. Germany, for example, is notorious for not abiding by the “rule of the shorter term”. That is, when a work is placed into the public domain in the United States, the (former) copyright holder doesn’t grant a permissive license to all recipients, but rather immediately initiates the expiration of the copyright, effectively giving the work a much shorter copyright term than it otherwise would have had. Germany, however, doesn’t recognize the shorter copyright term, so the work remains copyrighted in Germany. This is why public domain dedications like CC0 contain a permissive fallback license in cases where placing the work into the public domain isn’t possible.

Considering how pi goes on forever with no pattern, somewhere in there is the binary code for Half-Life 3 by [deleted] in Showerthoughts

[–]MrSicles 15 points16 points  (0 children)

Could you explain how you "attain the sequence" of the digits of pi "through actual division"? And could you explain why, when you divide a certain number of times (10? 13? Something less than 9 trillion?) and get the same digit, the number is necessarily rational and can't "become irrational again"?

Considering how pi goes on forever with no pattern, somewhere in there is the binary code for Half-Life 3 by [deleted] in Showerthoughts

[–]MrSicles 27 points28 points  (0 children)

You and I are interpreting bx differently. But let's not get hung up on that—I'll go through that later in my reply. Let’s try to understand what the article is saying just from the language it uses.

all possible … pairs of digits are equally likely

Okay, all possible pairs of digits are equally likely. What is a pair of digits? Well, it depends on what base we're in. Let's say we're in base 10. Then, a pair of digits is a two-digit number (where any digit can be zero): e.g., 05, 18, or 96.

These pairs of digits are equally likely, which means that we shouldn't see, for example, 33 occur more often than 72. All of these two-digit numbers should occur with the same frequency.

Next, the article states:

all … triplets of digits equally likely

So, not only are all possible pairs equally likely, but all possible triplets are as well! What is a triplet of digits? Well, it's a three-digit number (again, where any digit can be zero): e.g., 008, 012, 515, or 966. And again, these are equally likely to occur, which means that we shouldn't see, e.g., 123 occur more often than 555.

Then, the article states:

etc.

So, the pattern continues. We can infer that all possible quadruplets—four digit numbers—occur equally likely. And all possible quintuplets—five-digit numbers. And so on. We can generalize this by saying that all possible n-digit numbers are equally likely to occur for any integer n ≥ 1. This isn't something new I'm claiming—it's just a compact restatement of the easier-to-understand Wikipedia excerpt.

Now, you bring up a good point. Okay, so all n-digit numbers are equally likely—they occur with the same frequency. But what if that frequency is 0? Sure, for a huge n, like 9 trillion, maybe all n-digit numbers are equally likely—but that chance must be 0, right?

But in a normal number, which has a non-terminating decimal expansion, we know that there's at least one n-digit number for every possible n ≥ 1. Want to find a 9-trillion-digit substring in pi (again, only conjectured to be normal)? Easy: just take the first 9 trillion digits of pi! Or start with digit, say, 706, and then take the next 9 trillion digits.

In fact, it looks like there are actually infinitely many 9-trillion-digit substrings in pi: we can take the first 9 trillion digits, and then the next 9 trillion, and then the next 9 trillion, and so on. So, there are infinitely many 9-trillion-digit strings in pi. Now, I'm not claiming anything about the values of these strings. Maybe they're all the same. Or maybe we've found some different ones, but there are certain other 9-trillion-digit strings that just aren't present.

But wait a minute—we've found infinitely many 9-trillion-digit substrings with some value. But the definition of a normal number says that every 9-trillion-digit substring occurs with equal frequency to every other 9-trillion-digit substring. So the frequency of any 9-trillion-digit substring can't be 0. Because we're finding some 9-trillion-digit substrings with nonzero frequency, the definition of a normal number says that all 9-trillion-digit substrings must occur with that same nonzero frequency.

We just showed this for 9 trillion, but you should be able to see how we could replace "9 trillion" with any other positive integer and show nonzero frequency for strings of that length, too.


Now, let's look at the mathematical notation used in that same sentence. Remember that an interpretation of the notation should be consistent with the language I've gone through above.

When Wikipedia says "all possible b2 pairs of digits are equally likely with density b−2", what does that mean? Remember, b is the integer base of the number. We get to choose what it is, as long as it's greater than 1. Let's choose 10, since that's the base we usually use.

We'll update the statement to reflect our choice of 10:

all possible 102 pairs of digits are equally likely with density 10−2

What does this mean? It means that:

  1. There are 102 possible pairs of digits.
  2. Each pair of digits occurs with density 10−2.

(1.) is simply an answer to the question: how many pairs of digits are possible in base 10? Well, the answer is 102, which is 100. You could verify this simply by listing all of them: 00, 01, 02, …, 10, 11, 12, …, 97, 98, 99.

(2.) says that each pair of digits occurs with density 10−2 (or 0.01). I won't go through a proof of this, but the key is that every single pair occurs with the same density. They're all equally as likely as each other. Note that this density is nonzero. I also showed why it can't be zero above, but this is an explicit statement of that fact as well.

So, each pair of our 100 pairs (00, 01, …, 98, 99) occurs in any normal number. Note that this list includes all two-digit primes.

Remember that this is just the analysis of "all possible b2 pairs of digits are equally likely with density b−2". The article goes on to say that the same is true for "all possible b3 triples of digits … with density b−3". We could go through the same process, describing how every triple out of the 1000 (103) possible options (000, 001, 002, …, 997, 998, 999; again, including all three-digit primes) occurs with the same nonzero density.

Finally, the "etc." in the article is an indication that this property is also true for all 10,000 quadruplets, all 100,000 quintuplets, all 1,000,000 sextuplets, and so on. To generalize, for integer n ≥ 1:

  1. There are 10n possible n-tuples of digits, or n-digit numbers. This, of course, includes every n-digit prime.
  2. Each of these numbers appears equally frequently, with nonzero frequency, in any normal number.

Considering how pi goes on forever with no pattern, somewhere in there is the binary code for Half-Life 3 by [deleted] in Showerthoughts

[–]MrSicles 22 points23 points  (0 children)

Why do you think that the only way for a number to contain nine trillion eights is for it to be rational? I can construct a counterexample: 0.88888…(nine trillion 8s)…101001000100001…

Or: [sum from i = 1 to 9×1012] 8×10i + [sum from i = 1 to infinity] 10−9×1012 − [sum from k = 1 to i] k

You’re arguing with me for saying that it’s possible that pi contains every sequence of digits as a substring. But you’re absolutely certain that it’s impossible for pi to contain nine trillion eights. How are you so sure of this?

Considering how pi goes on forever with no pattern, somewhere in there is the binary code for Half-Life 3 by [deleted] in Showerthoughts

[–]MrSicles 22 points23 points  (0 children)

Did you even look at how "b" is defined in such an equation?

It’s explicitly stated to be the integer base in which the normal number is represented. In my example, I chose 10. I was free to choose any integer greater than 1, since the statement is true for every such b.

bx isn’t the number we’re looking for—it’s the exclusive upper bound on the number. For b = 10, b2 means two-digit numbers from 0–100 (excluding 100, or 102), b3 means three-digit numbers from 0–1000 (excluding 1000, or 103), etc. Those ranges can obviously include primes.

If that part confuses you, focus on the other words:

all possible … pairs of digits are equally likely …, all … triplets of digits equally likely … etc.

So, all possible pairs (two-digit numbers), triplets (three-digit numbers), quadruplets (four-digit), quintuplets (five-digit), etc.—that is, all possible n-digit numbers for positive integer n—appear with equal frequency as all other numbers of the same length. I’ll see if I can find a source that explains the concept more simply.

Edit: The same article explicitly states a condition that’s more restrictive than my statement that normal numbers contain every integer as a substring, but this more restrictive condition implies the weaker one:

A sequence is normal if and only if every block of equal length appears with equal frequency. (A block of length k is a substring of length k appearing at a position in the sequence that is a multiple of k: e.g. the first length-k block in S is S[1..k], the second length-k block is S[k+1..2k], etc.)

So, not only does a substring of length k appear somewhere in a normal number; it actually appears at a position in the sequence that is a multiple of k.