Readit News logoReadit News
bsznjyewgd commented on Microsoft duplicates data from Firefox without asking   old.reddit.com/r/Windows1... · Posted by u/doener
Dylan16807 · 5 years ago
If you do nothing, it copies your data. That is unacceptable, and the title is not misleading.
bsznjyewgd · 5 years ago
No, that guy didn't "do nothing". He killed it in task explorer instead of just pressing no.
bsznjyewgd commented on Microsoft duplicates data from Firefox without asking   old.reddit.com/r/Windows1... · Posted by u/doener
bsznjyewgd · 5 years ago
The title is misleading.

The Edge popup asks you if you want to import data from other browsers and set the default browser (like what happens when any browser is installed). If you just press cancel a bunch of times nothing gets imported or defaults changed and only some icons get added. That dude just killed it in the task manager so it used the popup's default settings.

Complain about getting the chromified Edge popup as part of a regular update, not about it copying data.

bsznjyewgd commented on Gibberish Asian Font Mystery Solved (2006)   hanzismatter.blogspot.com... · Posted by u/polm23
StavrosK · 6 years ago
I don't understand, was it Japanese or not?
bsznjyewgd · 6 years ago
It was in Chinese but the girl thought it was in Japanese.
bsznjyewgd commented on Debian 10.2   debian.org/News/2019/2019... · Posted by u/jrepinc
tuldia · 6 years ago
Wifi firmwares are non-free and are not included in the official iso for a reason.

Search for "debian non-free iso" and you probably will find what you are looking for.

> ...nightmare maze of wrong links and secret knowledge.

Please, don't exaggerate.

bsznjyewgd · 6 years ago
As a long time, on and off Debian user, I've actually never had debian-installer install firmware properly. For the longest time, using the minimal install image, putting the firmware debs (or loose files) in the correct directory just plain didn't work. I think at some point, it started working and I could use wifi instead of ethernet to install, but even now the installer still doesn't install AMD firmware, so some kernel modesetting funny business doesn't work and I just get a black screen on first boot (but the system is otherwise functional). The same applies to the firmware-included non-free image.

I mean, I can (and do) manually apt-get the right firmware packages at some point, either popping a shell during install or after first boot, but it is definitely a maze of some kind, especially if you don't know what package contains the firmware you need.

bsznjyewgd commented on The Life of NHL Dentists   espn.com/nhl/story/_/id/2... · Posted by u/evo_9
psychometry · 6 years ago
Last I checked, college and professional women's leagues mandated face protection. Why don't men's?
bsznjyewgd · 6 years ago
Not only that, but the NHL BANS full face protection unless you're recovering from an injury. (Ex-all star Dany Heatley spent most of his career wearing a comically big half-visor after suffering a serious eye injury, I wonder if he would've opted for a full visor if given the choice.)

Some players already dislike the currently mandated half-visors (visors can distort vision, or fog up, etc.) and do weird shenanigans like having small or tipped-up visors.

There's also a fighting culture in North American professional hockey which would be destroyed by mandatory full face protection.

bsznjyewgd commented on Mu: A Human Scale Computer   github.com/akkartik/mu#re... · Posted by u/minxomat
bsznjyewgd · 6 years ago
What happened to the previous Mu that was a funny looking procedural language and why did you decide to switch directions?
bsznjyewgd commented on Is the era of the $100 graphing calculator coming to an end?   thehustle.co/graphing-cal... · Posted by u/lxm
bsznjyewgd · 6 years ago
I feel really out of the loop here. I went through a pretty standard curriculum in the 2000s and have never owned or used a graphing calculator (aside from the few times the teacher demonstrated our school's TI-83s in class in high school). What are they used for?

[And while I used a bog standard scientific calculator regularly in science/stats classes, I'm pretty sure my calculus classes disallowed calculators and only stuck to magic numbers that were easy to manually calculate with. It might even be plausible to go through a whole math curriculum without a calculator apart from whatever stats/applied classes you're required to take.]

bsznjyewgd commented on Why I Prefer Functional Programming   morgenthum.dev/articles/w... · Posted by u/allenleein
DonaldPShimoda · 6 years ago
> I think this most effectively demonstrates why I like a lot of OOP: it can be verbose.

Verbosity is not inherently good. In fact, I think verbosity is inherently bad. Have you read much first-year programmer code? It's absurdly verbose at the cost of legibility.

The real issue is clarity. Your code should be sufficiently verbose that its purpose is self-evident, but it should not be overly verbose such that your screen is cluttered with meaningless junk (see: Java).

---

To me, there is a fundamental distinction between the intents of functional programming and imperative programming that a lot of these articles either gloss over or miss completely.

Imperative programming is about describing to the computer a procedure by which to accomplish a goal.

Functional programming is about manipulating the relationships between data directly such that you transform your given input into the desired output.

If you want to understand what a program does, then imperative code is going to be better to read. But if you want to understand what a program means, then (well-written) functional code is going to be better. This is also why so many functional languages have strong static type systems: to better enable the programmer to express programs' meanings outside of the implementation.

However, as others have mentioned, string manipulation is always kind of hairy anyway, so reading this function will result in understanding what it does instead of what it means (unless you just read the signature, which is actually what I do a lot of the time). My thought process of reading this particular function without prior context would be something like:

- The function is named `alignCenter` and takes a list of strings and gives back a list of strings... so the strings are being centered amongst themselves. I know they aren't being centered relative to anything else because there are no other inputs to the function — which I would not know in an imperative language, where there could be hidden state somewhere. - It maps some function over the list of strings. I assume that function will do the centering. - This inner function takes a string and does something to it. Let's investigate. - We replicate a space character some number of times and prepend the resulting string to the input string. (I think the author's reliance on operator precedence is disappointing here, as it detracts from the clarity IMO. I would rather put the `replicate` call in parens before the `++`.) - The number of spaces is determined by dividing by two some other number less the length of the string. - That number is the length of the longest string.

So: to center a list of strings, we indent each string by half the difference between its length and the maximum length among all the strings. This seems like a reasonable way to center a group of strings. (Notice that I did not use words like "first", "then", etc. which indicate a procedure. Instead, I have described the relationships of the strings.)

(Of course writing it all out makes it seem like a longer process than it is, but in reality it probably took me 10-15 seconds to go through everything and figure out what was going on.)

---

I think this isn't a great example for the author to have chosen. My go-to example of a beautiful functional solution is generating the Fibonacci sequence.

A "good" imperative solution uses iteration and might look like:

    def fib(n: int) -> int:
      a = 0
      b = 1
      while n > 1:
        t = a
        a = b
        b = t + b
        n -= 1
      return b
If you were to just glance at this code without being told what it does (and if you'd never seen this particular implementation of the algorithm before), you would probably need to write out a couple test cases.

Now, the Haskell solution:

    fib :: Int -> Int
    fib n = fibs !! n
      where fibs = 0 : 1 : (zipWith (+) fibs (tail fibs))
We can easily see that the `fib n` function simply retrieves the nth element of some `fibs` list. And that list? Well it's `[0, 1, something]`, and that something is the result of zipping\* this list with its own tail\* using addition — which very literally means that each element is the result of adding the two elements before it. The Fibonacci numbers are naturally defined recursively, so it makes sense that our solution uses a recursive reference in its implementation.

\*Of course, I'm assuming the reader knows what it means to "zip" two lists together (creating a list by performing some operation over the other two lists pairwise) and what a "tail" of a list is (the sub-list that simply omits the first element).

To me, this data-relationship thing often makes more sense than a well-implemented imperative solution. I don't care to explain to a computer how to do its job; I care to think about how to move data around, and that's what functional programming is all about (to me).

Of course, this is just my subjective opinion, but I think there's some merit to it. I'd like to hear your thoughts!

bsznjyewgd · 6 years ago
Fibonacci is usually introduced as "the next term is the sum of the two previous terms" (sometimes with the story about rabbits or whatever). There's two obvious ways to implement this:

  1. Direct recursion
  2. Keep track of the two previous terms
If you start with (1), you run it and it takes exponential time, and so you should instead remember the two previous terms, leading you to (2). When you go with (2), you either use 2 mutable variables and a loop in the imperative version, or you have 2 accumulators and tail recursion in the functional version... which is the same thing, since a tail recursive function is just a named loop.

There's nothing about laziness or self-referencing an incomplete structure here, which is just a Haskell thing. Taking the tail of an incomplete structure, in particular, is indirect and hard to understand.

If you want to demonstrate laziness, you can still do it directly by doing something like:

  fibs a b = a : fibs b (a + b)
  fib n = fibs 0 1 !! n

bsznjyewgd commented on Hong Kong tries and fails to hire PR firms to rebuild image   bbc.com/news/world-asia-c... · Posted by u/baylearn
UIZealot · 6 years ago
> Mandarin and Cantonese share the same writing system in the sense that English and French share the same writing system: mostly the same characters, innumerous cognates, and I can read the back of my cereal box.

Completely wrong. A Chinese character is more or less equivalent to a word in English/French. Are all the words the same in English and French? Can you look at French text and know what it's saying if you didn't speak French already? Someone who speaks only Cantonese can read and understand text written by Mandarin speakers without any issue. The reverse is less true, see below.

> Spoken Cantonese is a different language from spoken Mandarin, with different grammar and vocabulary, and when you write them down you get correspondingly different written languages.

Wrong again. They use largely the same grammar and vocabulary.

Because Cantonese is ancient Chinese, over the years they have lost track of what semantic characters to use for some of the Cantonese words.

Tracking down which semantic character corresponds to which Cantonese word could be done if there's enough interest and funding for such work. Once the mapping is done, you will be able to write down Cantonese and have it understood all over China.

Since the work hasn't been done, you can only write down Cantonese with the help of some phonetic characters, which denote only pronunciation but not meaning. It's not gibberish, but neither is it proper written Cantonese. EDIT: Even in its current form, written Cantonese is still 80% intelligible to Mandarin speakers.

bsznjyewgd · 6 years ago
> A Chinese character is more or less equivalent to a word in English/French.

Most Chinese characters are monosyllabic, and most Chinese words are polysyllabic consisting of multiple characters. A Chinese character is a morpheme, and it also happens that many common words are also single character morphemes.

> Someone who speaks only Cantonese can read and understand text written by Mandarin speakers without any issue.

Because we've all been taught to read and write in Mandarin from the very beginning of our education. Again, Hong Kong is a diglossic society.

> They use largely the same grammar and vocabulary. Because Cantonese is ancient Chinese, over the years they have lost track of what semantic characters to use for some of the Cantonese words.

They share a lot of grammar and vocabulary (...but not all of it) because they share a language ancestor. Cantonese is not ancient Chinese, but it's a descendant that conserved a lot more consonants than Mandarin (and a lot of sound merger is actually happening right now in Hong Kong over the last 100 years, but it's commonly derided as "lazy sound").

> Once the mapping is done, you will be able to write down Cantonese and have it understood all over China. Since the work hasn't been done, you can only write down Cantonese with the help of some phonetic characters, which denote only pronunciation but not meaning. It's not gibberish, but neither is it proper written Cantonese.

See [https://books.google.ca/books?id=pFnP_FXf-lAC&pg=PA51] for a description of common strategies for writing Cantonese. Phonetic borrowing is one strategy, and the most common one, yes, but that's no different than characters in standard Chinese, the vast majority of which are a radical with a semantic category (but not a complete meaning) + a phonetic component.

A Mandarin-only speaker can decide for themselves how intelligible that colloquial Cantonese exchange on page 52 is, what with the difference in vocabulary and grammar.

bsznjyewgd commented on Hong Kong tries and fails to hire PR firms to rebuild image   bbc.com/news/world-asia-c... · Posted by u/baylearn
est · 6 years ago
However Chinese and Cantonese share the same writing system.

And don't put gibberish Cantonese scripts as an example, it's called 白字 which means illiterate writing style. You can type that online in forums and IM, SMS to friends but it's not something official nor standard. Should Ebonics be taught in schools instead of standard English?

bsznjyewgd · 6 years ago
Mandarin and Cantonese share the same writing system in the sense that English and French share the same writing system: mostly the same characters, innumerous cognates, and I can read the back of my cereal box.

Spoken Cantonese is a different language from spoken Mandarin, with different grammar and vocabulary, and when you write them down you get correspondingly different written languages. That written Cantonese hasn't undergone a formal standardization the way Mandarin did in the early 20th century doesn't make written Cantonese gibberish, just not fully standardized. And written Cantonese isn't only used for memeing on forums or text-speak, it's also widely used for casual writing in newspaper columns or in advertisement, or to authentically transcribe spoken Cantonese (rather than paraphrasing in Mandarin). See also:

https://en.wikipedia.org/wiki/Written_Cantonese

https://languagelog.ldc.upenn.edu/nll/index.php?s=written+ca...

[Edit: That kids were (and perhaps are) taught to read and write in Mandarin at school using Cantonese sound values, rather than writing in Cantonese, also doesn't say all that much about Cantonese as a written language. Rather, it demonstrates that Hong Kong is a diglossic (well, polyglossic) society.]

u/bsznjyewgd

KarmaCake day151July 26, 2013View Original