31 Matching Annotations
  1. Last 7 days
    1. Currently, only Right signals are wired up.

      So what happens if a task returns a Left signal?? Will it still go Right? Will it error?

  2. Feb 2021
    1. The latter are important examples which usually also exist in "purely" functional programming languages.

      How can they exist and it still be considered pure??

      I guess that's not quite the same / as bad as saying something had side effects in a purely functional programming context, right?

    1. provide interfaces so you don’t have to think about them

      Question to myself: Is not having to think about it actually a good goal to have? Is it at odds with making intentional/well-considered decisions?  Obviously there are still many of interesting decisions to make even when using a framework that provides conventions and standardization and makes some decisions for you...

    1. What is the opposite of free content?

      The opposite of free/open-source software is proprietary software or non-free software (https://en.wikipedia.org/wiki/Proprietary_software).

      So should we call the opposite of free content "non-free content"? Or "proprietary content"?

      Seems likes either would be fine.

      Looks like https://en.wikipedia.org/wiki/Wikipedia:Non-free_content prefers the term "non-free content".

      Couldn't find anyone contrasting these 2 terms (like I could no doubt find for software):

      Not to be confused with:

      • paid content ... just like:
      • free content should not be confused with gratis content (?)
      • free software should not be confused with freeware
    1. compose(Add, x: x, y: 3)

      How is this better than simply:

      Add.run(x: x, y: 3)
      

      ?

      I guess if we did that we would also have to remember to handle merging errors from that outcome into self...

    1. you'll want to update Devise's generated views to remove references to passwords, since you don't need them any more

      Doesn't this contradict the statement

      This strategy plays well with most other Devise strategies

      (which includes password strategies)?


      One thing that wasn't clear from their instructions was whether magic links could be used as an option in addition to regular password log-ins. On the one hand they say:

      This strategy plays well with most other Devise strategies (see notes on other Devise strategies).

      but on the other hand they say:

      you'll want to update Devise's generated views to remove references to passwords, since you don't need them any more

  3. Jan 2021
    1. What if there's an icon that I need that's not in this set?

      How do I add a custom icon to the set for use on a web page and have the custom icon styled the same way as these "standard" icons?

      Like how they have instructions for adding an icon here, for example: https://www.digitalocean.com/community/tutorials/angular-custom-svg-icons-angular-material#custom-svg-icons

  4. Dec 2020
    1. This can be used to perform actions once the navigation has completed, such as updating a database, store

      Wouldn't/shouldn't it be the other way around — wouldn't we wait until the save is completed (database is updated) successfully before we navigate away from the current page/form??

  5. Nov 2020
    1. Man, for some reason, I really like this answer. I recognize it's a bit more complicated, but it seems so useful. And given that I'm no bash expert, it leads me to believe that my logic is faulty, and there's something wrong with this methodology, otherwise, I feel others would have given it more praise. So, what's the problem with this function? Is there anything I should be looking out for here?

      I think the main thing wrong with it is the eval (which I think can be changed to $("$@") and it's pretty verbose.

      Also, there are more concise ways to do it that would probably appeal more to most bash experts...

      like set -x

      and it does unnecessary things: why save output to a variable? Just let output go to where it would normally go...

      So yeah, I can see why this solution isn't very popular. And I'm rather surprised by all the praise comments it's gotten.

    1. The Chinese Internet also illustrates the importance of theorizing online expression based on a representative spectrum of digital environments.

      How does Chinese cancel culture differ from American cancel cuture? Is this phenomenon different worldwide?

  6. Oct 2020
    1. “"

      Which character is this referring to exactly?

      It looks like the empty string, which wouldn't make sense.

      https://www.postgresql.org/docs/13/functions-matching.html only lists these 2:

      If pattern does not contain percent signs or underscores, then the pattern only represents the string itself; in that case LIKE acts like the equals operator. An underscore (_) in pattern stands for (matches) any single character; a percent sign (%) matches any sequence of zero or more characters.

    1. Another example:

      const expensiveOperation = async (value) => {
        // return Promise.resolve(value)
          // console.log('value:', value)
          await sleep(1000)
          console.log('expensiveOperation: value:', value, 'finished')
          return value
      }
      
      var expensiveOperationDebounce = debounce(expensiveOperation, 100);
      
      // for (let num of [1, 2]) {
      //   expensiveOperationDebounce(num).then(value => {
      //     console.log(value)
      //   })
      // }
      (async () => { await sleep(0   ); console.log(await expensiveOperationDebounce(1)) })();
      (async () => { await sleep(200 ); console.log(await expensiveOperationDebounce(2)) })();
      (async () => { await sleep(1300); console.log(await expensiveOperationDebounce(3)) })();
      // setTimeout(async () => {
      //   console.log(await expensiveOperationDebounce(3))
      // }, 1300)
      

      Outputs: 1, 2, 3

      Why, if I change it to:

      (async () => { await sleep(0   ); console.log(await expensiveOperationDebounce(1)) })();
      (async () => { await sleep(200 ); console.log(await expensiveOperationDebounce(2)) })();
      (async () => { await sleep(1100); console.log(await expensiveOperationDebounce(3)) })();
      

      Does it only output 2, 3?

    1. I don't understand the need for the name "Open–closed principle". It doesn't seem meaningful or clear to me.

      Can't we just call it "extensibility" or "easily extendable"? Doesn't "extensibility" already imply that we are extending it (adding new code on top of it, to interoperate with it) rather than modifying its source code?

    1. Don’t indent code blocks.

      Sure, we don't need to add any additional indent. But what if your code block contains indentation (function body)? It would look silly to remove all leading indentation.

  7. Sep 2020
    1. Actually just returning the loginDaoCall works fine. I dont really get what's different as it is the looked like it was the same instance, but probably not.

      So the posted answer wasn't necessary/correct? Which part of the answer was incorrect/unneeded?

      I wish this OP comment included the full version of code that worked.

      I don't understand this OP comment. Wasn't OP already returning loginDaoCall? So maybe the only thing they could mean is that they just needed to change it to return loginDaoCall.then(...) instead...

      That would be consistent with what the answer said:

      the promise returned by the further .then() does also get rejected and was not handled.

      So I guess the unnecessary part of the answer was adding the return true/false...

    1. Can this word be used to describe the property in computing where a value can be dynamic? I feel like "dynamicness" would be a better term for this.

      It seems to refer more to personality:

      1a: marked by usually continuous and productive activity or change a dynamic city b: ENERGETIC, FORCEFUL a dynamic personality

      See also the same sentiment here: https://news.ycombinator.com/item?id=4137596

    1. I considered it, but dynamism refers to personality and philosophy, while dynamicity is just the condition of being dynamic.
  8. Jul 2020
    1. This isn’t an accident. OpenOffice’s sidebar code was copied and incorporated into LibreOffice. The Apache OpenOffice project uses the Apache License, while the LibreOffice uses a dual LGPLv3 / MPL license. The practical result is LibreOffice can take OpenOffice’s code and incorporate it into LibreOffice — the licenses are compatible. On the other hand, LibreOffice has some features — like font embedding — that don’t appear in OpenOffice. This is because the two different licenses only allow a one-way transfer of code. LibreOffice can incorporate OpenOffice’s code, but OpenOffice can’t incorporate LibreOffice’s code. This is the result of the different licenses the projects chose.

      What part of LGPLv3 / MPL prevents LibreOffice code from being incorporated back into OpenOffice's Apache Licensed code??

    1. Take a look at the slogans of some of the popular companies.

      Hmm, are these taglines or slogans? According to https://yourbusiness.azcentral.com/slogan-vs-tagline-12643.html:

      A tagline should represent your business, while a slogan represents a single product or is part of an advertising campaign

      it seems that these are more taglines than slogans.

    1. In the Set class we already called this - and difference, which it is ok but not really accurate because of the previous explanation, but probably not worthwhile to change it.

      Is this saying that the name difference is inaccurate?

      Why is it inaccurate? You even called it the "theoretic difference" above.

      Is that because "relative complement" would be better? Or because the full phrase "theoretic difference" [https://en.wiktionary.org/wiki/set-theoretic_difference] is required in order for it to be accurate rather than just "difference"?

    2. inaccurate

      How is the use of - for sets inaccurate?

  9. May 2020
    1. Related concepts in other fields are: In natural language, the coordinating conjunction "and". In programming languages, the short-circuit and control structure. In set theory, intersection. In predicate logic, universal quantification.

      Strictly speaking, are these examples of dualities (https://en.wikipedia.org/wiki/Duality_(mathematics))? Or can I only, at strongest, say they are analogous (a looser coonection)?

    1. ssh-add <(echo "$PRIVATE_KEY")

      Does this have any advantage over simply saving that key to a key file under ~/.ssh?

      Like they do on https://stackoverflow.com/a/61944004/47185:

      mv "$DEPLOY_KEY_PRIVATE" ~/.ssh/id_rsa
      
    1. Mojofication, Onion Souping, and the Network Service.

      What is Mojofication?

      What is Onion Souping?

    1. The consent provided by the user is saved in some cookies within the host page’s domain. By verifying the presence or the absence of these cookies you can determine whether the user has given their consent or not.

      But how do you check if they've given consent to a specific category??

    1. Make it clear that signing up is optional. Consent must be “freely given”; you may not coerce users into joining your mailing list or make it appear as if joining the list is mandatory. For this reason, you must make it clear that signing up is optional. This is especially relevant in cases where you offer free white-papers (or e-books) for download. While the user’s email address is required for the delivery of the service, signing up for your newsletter is not. In such a case, you must not make it appear as if signing-up to the newsletter list mandatory and must make it clear that it is optional.

      Question (answer below)

      Are they saying that it's not allowed to make signing up for a mailing list a precondition/requirement for anything? This was surprising to me.

      So if you have a newsletter sign-up page that sends a digital bonus gift (like an e-book) to new subscribers, are required to completely change/repurpose your "newsletter sign-up page" into a "download e-book page" (that has an optional checkbox to also sign up for the newsletter, if you want)? That seems dumb to me, since it requires completely reversing the purpose of the page — which was, in my mind, primarily about signing up for the newsletter, with a bonus (an essentially optional one) thrown in for those who do so. Are you required to either repurpose it like that or remove the free bonus offer that would be sent to new subscribers?

      The irony of this is that it requires websites that have a newsletter sign-up page like that to change it into a "newsletter sign-up page" where the newsletter sign-up part is optional. Which make you look kind of stupid, making a page that claims to be one thing but doesn't necessarily do what it says it's for.

      Does this mean, in effect, that you may not lawfully provide any sort of incentive or reward for signing up for something (like a mailing list)? As long as it's very clear that some action is required before delivery of some thing, I don't see why this sort of thing should not be permitted? Would this fall under contract law? And as such, wouldn't such a contract be allowed and valid? Are mailing lists a special class of [service] that has special requirements like this? Or is it part of a broader category to which this requirement applies more generally?

      Why is requiring the user to provide an email address before they can download a digital reward allowed but not requiring signing up to a mailing list? Why isn't it required that even the email address be optional to provide? (To answer my own question, probably because it's allowed to allow a user to request a specific thing to be sent via email, and an email address is required in order to fulfill that request. But...) It seems that the website could just provide a direct link to download it via HTTP/FTP/etc. as an option for users that chose not to provide an email address. (But should they be required to provide that option anytime they / just because they provide the option to have the same thing delivered via email?)

      Answer

      Looks like my question was answered below:

      Explicit Form (where the purpose of the sign-up mechanism is unequivocal). So for example, in a scenario where your site has a pop-up window that invites users to sign up to your newsletter using a clear phrase such as: “Subscribe to our newsletter for access to discount vouchers and product updates!“, the affirmative action that the user performs by typing in their email address would be considered valid consent.

      So the case I described, where it is made very clear that the incentive that is offered is conditional on subscribing, is listed as an exception to the general rule. That's good; it should be allowed.

  10. Apr 2020
    1. Chrome first sends an encrypted, 3-byte hash of your username to Google, where it is compared to Google's list of compromised usernames. If there's a match, your local computer is sent a database of every potentially matching username and password in the bad credentials list

      Why do they only send password matches if username also matches?? A password should be deemed compromised and never used again if the password is found in a breach/paste anywhere, even if in connection with a different username/email.