Show newer

@design_RG @Sphinx

I've seen this said a couple of times and don't fully understand it. What's the downside to letting them follow you, even assuming it's a malicious bot? It doesn't leak any information beyond what an unregistered third party can gain by looking at your profile in a web browser as I understand things.

On my part I allow a couple such followers, and it helped me get listed in the QOTO directory to get real followers. So there's an upside.

@freemo @arteteco @Surasanji

I can read French without much difficulty, which I've seen a lot in the federated timeline. It hasn't shown up here yet, but if that community establishes a presence on this instance feel free to reach out.

I'm also making progress at learning Farsi, which I see occasionally on the local timeline. Nothing's appeared offensive to me yet, but I'm not yet proficient enough to identify innuendos etc. that aren't outright insults.

Proof 

@Zyxer
Given \(x^2 + y^2 = 4z + 3\) with \((w, x, y, z)\in\Bbb{N}\), \(x\) is odd if and only if \(y\) is even. This results from the observation that \(4z + 3\) must be odd and the fact that, if \(k^n\) contains a factor of two for \((k, n)\in\Bbb{N}\), a factor of two must also necessarily be present in \(k\). It is not possible, then, for \(y^x = x^w\) to be true, because one side of the equation is an odd integer while the other is an even integer.

@jump_spider

I think you should distinguish better between encryption and authentication; they're separate operations. Encryption allows me to turn a given plaintext into a ciphertext, which can only be turned back into the plaintext by the keyholder. The purpose of encryption is to prevent anyone without the key from learning the plaintext, even if they are able to see the ciphertext. Authentication ("signing") allows me to verify that the keyholder was the sender. Its purpose is to prevent anyone without the key from forging a message that would appear to be from the keyholder.

For instance, if I wanted to send you a message using some asymmetric system, I would *sign* it with *my* *private* key, and *encrypt* it with *your* *public* key. We can be confident that only you can decrypt it with your private key, because no one else has your private key. When you check the signature against my public key, you can be confident that I sent it, because no one else has my private key.

I see a couple places in the text where this distinction is muddied. You claim in the intro that the two definitions are mostly equivalent, but the first covers encryption, while the second describes authentication. Later on, in the last sentence of "In Keys We Trust", you use the terms encrypt/decrypt when what you're actually describing is authentication.

The situation with private keys is more complicated than "how much of the cryptography world just below the surface operates." Symmetric encryption tends to be more efficient, so you'll see protocols that begin with a short asymmetric conversation to establish a symmetric key, or shared secret, which they use for the real conversation. This is a form of "key exchange," a term which is possibly misused in "Swordfish" (that whole sentence is difficult to understand).

Finally, I'd point out that passwords aren't a very good metaphor for cryptographic keys, and misunderstanding this could be potentially harmful to your target audience. You type in your literal password anytime you want to log in somewhere, but you should never send your raw private or symmetric key merely to prove identity, and sending your public key is insufficient to prove identity (the whole point is that it's public, i.e. lots of people have it). Instead, you sign something with the key, so that the recipient/eavesdropper doesn't have your actual key and can't impersonate you later on.

Octave solution 

@Absinthe

function sorted = snail(array)
if numel(array) <= 1
sorted = array;
else
sorted = [array(1, 1:(end-1)),...
array(1:(end-1), end)',...
array(end, end:-1:2),...
array(end:-1:2, 1)',...
snail(array(2:(end-1), 2:(end-1))) ]; end; end;

@Anshulpandey

The local feed (icon of two people) is content from everyone with an "@qoto.org" account, and a good general purpose place to find new things. The home feed (icon of a house) is content from people you follow, so a better representation of your interests but you won't find as much novelty here. The federated feed (icon of a globe) is the combination of everyone followed by anyone with a "@qoto.org" account, so it's got the most variety but is like trying to drink from a fire hose.

@Shamar

>While you are obviously free to ignore a POLITICS.txt it's pretty obvious it's a rather short sighted decision, at least from a professional perspective.

The problem is that this *isn't* obvious. The various other files you commonly see - LICENCE.txt, CHANGELOG.txt, CONTRIBUTING.txt, etc. - are relevant to specific audiences, and the rest of the world can safely ignore them. It isn't at all obvious until I've read it whether I can ignore POLITICS.txt (in fact, the first time I read it, I was expecting it to contain warnings about exporting cryptography). That's why I think the introduction should detail who's expected to be familiar with its content.

> For example you might build your software upon a library specifically designed to be broken, just to put shame on developers who don't give a shit about politics!

Only insofar as that's true of *any* documentation. You could equally put your warning in a document called RELIGION.txt to spite developers who don't care about that instead.

> The fact is that when you decide to depend on my work, you decide to depend on my goals. Writing down my political goals I let you know what to expect.

Traditionally, developers let people know what to expect by maintaining a roadmap for the project.

@jump_spider

It's quite a bit clearer now! Cutting out the snarky jabs at people who "pretend technology exists or has ever existed separate from the natural tendency for human agents to consolidate power" and "[mere] vague principles that corporate entities routinely ignore" has helped a lot. You could probably go even further with this, cutting everything before "This document outlines...".

On the other hand, I still don't understand the target audience. It would be nice if fairly early on you say, "This document is required reading for contributors; users can skip it," or whatever is appropriate to your vision for who reads it.

Answer 

@jeffcliff@niu.moe

It's a substitution cipher encoding coordinates for a point outside Saskatoon (52.069N, 106.3892W).

It literally turns out to be
"north five two zero six nine zero zero west one zero six three eight nine two zero" and I just guessed at the decimal separators. But the longitude has an extra digit, which implies it ought to be (0.5N, 1.0W), (5.2N, 10.6W), or (52N, 106W), and the other points are over water. If you ignore the precision, you can also derive points in Ghana and the British Isles.

@jump_spider @Shamar

Since this isn't nearly as established a convention as some other forms of repo boilerplate, you probably want to briefly describe when I must read this document. For example, I should read a Code of Conduct before interacting with others in your project space, the licence before distributing your code, etc.

I got through your introductory paragraph and thought, "Why do your politics matter to me?" As a user I care about how the software helps me reach my goals, not yours.

@mngrif I think I was one notch up from "zero notifications." I may see if I can't fix tusky and just submit a patch for the post-length thing. In all other respects I think I prefer it.

@mngrif I tried fedilab again after your comments but it still munches battery - even the lite version is eating as much as the screen itself. So I'm back on tusky, plus the web client for anything that blows the 500 char limit.

Octave solution & discussion 

@Absinthe

Pretty straightforward. Might be possible to improve on the factorial one by counting factors, because computers can generally calculate x^n faster than just multiplying it out, so if you figure out that the answer would be 2^a * 3^b * 5^c... it could outpace the naive 1 * 2 * 3 * ... * n method.

That said, I tried such an approach and while it does scale better than linear, the upfront cost is high enough that the breakeven point is way past anything my computer can represent in floating point. So for practical use, this is what I'd put forward.

function term = fibonacci(index)
root = sqrt(5);
term = (((1 + root)/2).^index - ((1 - root)/2).^index) ./ root; end;

function number = factorial(argument)
number = ones(size(argument));
for factor = 1:max(argument)
number(argument >= factor) *= factor; end; end;

Here's a requiring a bit of algebra.

For any four non-collinear points A, B, C, and D in three-dimensional space, there is a unique hyperbolic paraboloid H containing the lines AB, BC, CD, and AD (that is, every point on any of these lines is also on the surface of H). Write a program that accepts Cartesian coordinate triplets representing A, B, C, and D and prints an equation in x, y, and z that is satisfied if and only if <x, y, z> is a point on H.

Your program's output may differ from the examples but should be optimised for human readability. Combine like terms, omit terms equal to zero and avoid unnecessary factors (e.g. prefer "x = y" to "2x + 0 = 4y - 2y" even though both describe the same surface).

Example 1 input:
<0, 1, -1>; <1, 0, 1>; <0, -1, -1>; <-1, 0, 1>
Example 1 output:
z = x² - y²

Example 2 input:
<1, 1, 1>; <1, 0, -1>; <-1, 1, -1>; <-1, 0, 1>
Example 2 output:
2y = xz + 1

Example 3 input:
<0, 1, 1>; <0, 1, -1>; <0, -1, -1>; <0, -1, 1>
Example 3 output:
x = 0

@freemo So I can clear my notifications all at once. But I can't figure out how to dismiss a given notification (for example, the notification that you replied to me) without clearing all the rest. Going by the documentation here[1] it seems like it should be possible.

1: docs.joinmastodon.org/api/rest

@freemo

I see in Mastodon's API there is a call to dismiss a specific notification. Is there a way to do this from the web frontend?

@mngrif

I see things like this all over the place, is there something else you meant?

ebay.com/i/264429918604

Octave solution 

@Absinthe

This was super straightforward. Linear in time and space, plus whatever the sort algorithm needs (by default it's nlogn in Octave but you can implement other ones).

function room_count = min_rooms(class_times)
[~, indices] = sort(class_times'(1:numel(class_times)));
current = 0;
room_count = 0;
for index = indices
if mod(index, 2)
current++;
room_count = max(room_count, current);
else
current--; end; end; end;

Invoking the Octave solution 

Call with two arguments, both mandatory: a string to justify and a linewidth to justify to. Returns a 2D array of chars. Where it can, the words touch both sides simultaneously. Sometimes it's not possible to fit more than one word on a line, in which case it is left justified, padded with spaces.

> justify_text('I walked until midnight in the storm, then I went home and took a sauna for an hour and a half. It was all clear. I listened to my heart and saw if there were any signs of my destiny in the sky, and there were none - there were just snowflakes.', 16)
ans =

I walked until
midnight in the
storm, then I
went home and
took a sauna for
an hour and a
half. It was all
clear. I
listened to my
heart and saw if
there were any
signs of my
destiny in the
sky, and there
were none -
there were just
snowflakes.

Octave solution 

@Absinthe

Matlab normally represents strings as 1D arrays of chars. It's not usual to put chars in an 2D array because all the rows would have to be the same length, and that's pretty inflexible. Octave is happy to make such an array just as it would with any other type, though, and here that's exactly what we want.

function array = justify_text(string, width)
words = strtrunc(strsplit(string), width);
array = zeros(0, width);
line_length = 0;
start_index = 1;
for word_index = 1:numel(words)
this_word = words{word_index};
if line_length + numel(this_word) > width
array = [array; render_words(start_index, word_index - 1)];
start_index = word_index;
line_length = numel(this_word) + 1;
else
line_length += numel(this_word) + 1; end; end;
array = [array; render_words(start_index, numel(words))];
function this_line = render_words(start_index, end_index)
chars_raw = cellfun(@numel, words(start_index:end_index));
total_padding = width - sum(chars_raw);
if start_index == end_index
this_line = [words{start_index} repmat(' ', 1, total_padding)];
else
base_padding = floor(total_padding / (end_index - start_index));
extra_padding = rem(total_padding, end_index - start_index);
next_char = 1;
for index = start_index:end_index
this_padding = 0;
if index < end_index
this_padding = base_padding;
if index - start_index < extra_padding
this_padding++; end; end;
this_line(next_char:(next_char + chars_raw(index - start_index + 1) - 1)) = words{index};
next_char += chars_raw(index - start_index + 1);
this_line(next_char:(next_char + this_padding - 1)) = repmat(' ', 1, this_padding);
next_char += this_padding; end; end; end; end;

Show older

K‮ly‬e's choices:

Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.