258 Matching Annotations
  1. Mar 2025
    1. The goal of Lucia v3 was to be the easiest and cleanest way to implement database-backed sessions in your projects. It didn't have to be a library. I just assumed that a library will be the answer. But I ultimately came to conclusion that my assumption was wrong. I don't see this change as me abandoning the project. In fact, I think it's a step forward. If implementing sessions wasn't easy, I wouldn't be deprecating the package. But why wouldn't a library be the answer? It seems like a such an obvious answer. One word - database. I talked about how database adapters were a significant complexity tax to the library. I think a lot of people interpreted that as maintenance burden on myself. That's not wrong, but the bigger issue is how the adapters limit the API. Adapters always felt like a black box to me as both an end user and a maintainer. It's very hard to design something clean around it and makes everything clunky and fragile, especially when you need to deal with TypeScript shenanigans.
  2. Jan 2025
    1. Join Our Monthly Newsletter !function(o,t,e,a) { o._aoForms=o._aoForms||[],o._aoForms.push(a); var n=function() { var o=t.createElement(e); o.src="https://info.eco.ca/acton/content/form_embed.js", o.async=!0; for(var a=t.getElementsByTagName(e)[0],n=a.parentNode,c=document.getElementsByTagName("script"),r=!1,s=0;s<c.length;s++) { if(c[s].getAttribute("src")==o.getAttribute("src"))r=!0; } r ? typeof(_aoFormLoader) != "undefined" ? _aoFormLoader.load({id:"848d016b-1834-4191-98c4-2e9c48ba54a2:d-0034",accountId:"42902",domain:"info.eco.ca",isTemp:false,noStyle:false,prefill:false}) : "" : n.insertBefore(o,a) }; window.attachEvent ? window.attachEvent("onload",n) : window.addEventListener("load",n,!1),n() } (window,document,"script",{id:"848d016b-1834-4191-98c4-2e9c48ba54a2",accountId:"42902",domain:"info.eco.ca",isTemp:false,noStyle:false,prefill:false}); wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } ); ( function( domain, translations ) { var localeData = translations.locale_data[ domain ] || translations.locale_data.messages; localeData[""].domain = domain; wp.i18n.setLocaleData( localeData, domain ); } )( "default", {"translation-revision-date":"2024-11-04 22:51:08+0000","generator":"GlotPress\/4.0.1","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"en_CA"},"Notifications":["Notifications"]}},"comment":{"reference":"wp-includes\/js\/dist\/a11y.js"}} ); var gform_i18n = {"datepicker":{"days":{"monday":"Mo","tuesday":"Tu","wednesday":"We","thursday":"Th","friday":"Fr","saturday":"Sa","sunday":"Su"},"months":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"firstDay":1,"iconText":"Select date"}}; var gf_legacy_multi = []; var gform_gravityforms = {"strings":{"invalid_file_extension":"This type of file is not allowed. Must be one of the following:","delete_file":"Delete this file","in_progress":"in progress","file_exceeds_limit":"File exceeds size limit","illegal_extension":"This type of file is not allowed.","max_reached":"Maximum number of files reached","unknown_error":"There was a problem while saving the file on the server","currently_uploading":"Please wait for the uploading to complete","cancel":"Cancel","cancel_upload":"Cancel this upload","cancelled":"Cancelled"},"vars":{"images_url":"https:\/\/eco.ca\/wp-content\/plugins\/gravityforms\/images"}}; var gf_global = {"gf_currency_config":{"name":"Canadian Dollar","symbol_left":"$","symbol_right":"CAD","symbol_padding":" ","thousand_separator":",","decimal_separator":".","decimals":2,"code":"CAD"},"base_url":"https:\/\/eco.ca\/wp-content\/plugins\/gravityforms","number_formats":[],"spinnerUrl":"https:\/\/eco.ca\/wp-content\/plugins\/gravityforms\/images\/spinner.svg","version_hash":"55292f67cda3dd157894b17079a94e93","strings":{"newRowAdded":"New row added.","rowRemoved":"Row removed","formSaved":"The form has been saved. The content contains the link to return and complete the form."}}; #gform_wrapper_18[data-form-index="0"].gform-theme,[data-parent-form="18_0"]{--gf-color-primary: #204ce5;--gf-color-primary-rgb: 32, 76, 229;--gf-color-primary-contrast: #fff;--gf-color-primary-contrast-rgb: 255, 255, 255;--gf-color-primary-darker: #001AB3;--gf-color-primary-lighter: #527EFF;--gf-color-secondary: #fff;--gf-color-secondary-rgb: 255, 255, 255;--gf-color-secondary-contrast: #112337;--gf-color-secondary-contrast-rgb: 17, 35, 55;--gf-color-secondary-darker: #F5F5F5;--gf-color-secondary-lighter: #FFFFFF;--gf-color-out-ctrl-light: rgba(17, 35, 55, 0.1);--gf-color-out-ctrl-light-rgb: 17, 35, 55;--gf-color-out-ctrl-light-darker: rgba(104, 110, 119, 0.35);--gf-color-out-ctrl-light-lighter: #F5F5F5;--gf-color-out-ctrl-dark: #585e6a;--gf-color-out-ctrl-dark-rgb: 88, 94, 106;--gf-color-out-ctrl-dark-darker: #112337;--gf-color-out-ctrl-dark-lighter: rgba(17, 35, 55, 0.65);--gf-color-in-ctrl: #fff;--gf-color-in-ctrl-rgb: 255, 255, 255;--gf-color-in-ctrl-contrast: #112337;--gf-color-in-ctrl-contrast-rgb: 17, 35, 55;--gf-color-in-ctrl-darker: #F5F5F5;--gf-color-in-ctrl-lighter: #FFFFFF;--gf-color-in-ctrl-primary: #204ce5;--gf-color-in-ctrl-primary-rgb: 32, 76, 229;--gf-color-in-ctrl-primary-contrast: #fff;--gf-color-in-ctrl-primary-contrast-rgb: 255, 255, 255;--gf-color-in-ctrl-primary-darker: #001AB3;--gf-color-in-ctrl-primary-lighter: #527EFF;--gf-color-in-ctrl-light: rgba(17, 35, 55, 0.1);--gf-color-in-ctrl-light-rgb: 17, 35, 55;--gf-color-in-ctrl-light-darker: rgba(104, 110, 119, 0.35);--gf-color-in-ctrl-light-lighter: #F5F5F5;--gf-color-in-ctrl-dark: #585e6a;--gf-color-in-ctrl-dark-rgb: 88, 94, 106;--gf-color-in-ctrl-dark-darker: #112337;--gf-color-in-ctrl-dark-lighter: rgba(17, 35, 55, 0.65);--gf-radius: 3px;--gf-font-size-secondary: 14px;--gf-font-size-tertiary: 13px;--gf-icon-ctrl-number: url("data:image/svg+xml,%3Csvg width='8' height='14' viewBox='0 0 8 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0C4.26522 5.96046e-08 4.51957 0.105357 4.70711 0.292893L7.70711 3.29289C8.09763 3.68342 8.09763 4.31658 7.70711 4.70711C7.31658 5.09763 6.68342 5.09763 6.29289 4.70711L4 2.41421L1.70711 4.70711C1.31658 5.09763 0.683417 5.09763 0.292893 4.70711C-0.0976311 4.31658 -0.097631 3.68342 0.292893 3.29289L3.29289 0.292893C3.48043 0.105357 3.73478 0 4 0ZM0.292893 9.29289C0.683417 8.90237 1.31658 8.90237 1.70711 9.29289L4 11.5858L6.29289 9.29289C6.68342 8.90237 7.31658 8.90237 7.70711 9.29289C8.09763 9.68342 8.09763 10.3166 7.70711 10.7071L4.70711 13.7071C4.31658 14.0976 3.68342 14.0976 3.29289 13.7071L0.292893 10.7071C-0.0976311 10.3166 -0.0976311 9.68342 0.292893 9.29289Z' fill='rgba(17, 35, 55, 0.65)'/%3E%3C/svg%3E");--gf-icon-ctrl-select: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.292893 0.292893C0.683417 -0.097631 1.31658 -0.097631 1.70711 0.292893L5 3.58579L8.29289 0.292893C8.68342 -0.0976311 9.31658 -0.0976311 9.70711 0.292893C10.0976 0.683417 10.0976 1.31658 9.70711 1.70711L5.70711 5.70711C5.31658 6.09763 4.68342 6.09763 4.29289 5.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683418 0.292893 0.292893Z' fill='rgba(17, 35, 55, 0.65)'/%3E%3C/svg%3E");--gf-icon-ctrl-search: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='640' height='640'%3E%3Cpath d='M256 128c-70.692 0-128 57.308-128 128 0 70.691 57.308 128 128 128 70.691 0 128-57.309 128-128 0-70.692-57.309-128-128-128zM64 256c0-106.039 85.961-192 192-192s192 85.961 192 192c0 41.466-13.146 79.863-35.498 111.248l154.125 154.125c12.496 12.496 12.496 32.758 0 45.254s-32.758 12.496-45.254 0L367.248 412.502C335.862 434.854 297.467 448 256 448c-106.039 0-192-85.962-192-192z' fill='rgba(17, 35, 55, 0.65)'/%3E%3C/svg%3E");--gf-label-space-y-secondary: var(--gf-label-space-y-md-secondary);--gf-ctrl-border-color: #686e77;--gf-ctrl-size: var(--gf-ctrl-size-md);--gf-ctrl-label-color-primary: #112337;--gf-ctrl-label-color-secondary: #112337;--gf-ctrl-choice-size: var(--gf-ctrl-choice-size-md);--gf-ctrl-checkbox-check-size: var(--gf-ctrl-checkbox-check-size-md);--gf-ctrl-radio-check-size: var(--gf-ctrl-radio-check-size-md);--gf-ctrl-btn-font-size: var(--gf-ctrl-btn-font-size-md);--gf-ctrl-btn-padding-x: var(--gf-ctrl-btn-padding-x-md);--gf-ctrl-btn-size: var(--gf-ctrl-btn-size-md);--gf-ctrl-btn-border-color-secondary: #686e77;--gf-ctrl-file-btn-bg-color-hover: #EBEBEB;--gf-field-img-choice-size: var(--gf-field-img-choice-size-md);--gf-field-img-choice-card-space: var(--gf-field-img-choice-card-space-md);--gf-field-img-choice-check-ind-size: var(--gf-field-img-choice-check-ind-size-md);--gf-field-img-choice-check-ind-icon-size: var(--gf-field-img-choice-check-ind-icon-size-md);--gf-field-pg-steps-number-color: rgba(17, 35, 55, 0.8);} "*" indicates required fields .ao2gf-848d016b-1834-4191-98c4-2e9c48ba54a2 { font-size: 11pt; font-family: 'Open Sans', sans-serif; background-image: none; margin: 0px; padding: 0px; background-repeat: no-repeat; background-size: auto; background-position: center center; .ao2gf-848d016b-1834-4191-98c4-2e9c48ba54a2.ao2gf input, .ao2gf textarea, .ao2gf select{ background-color: #FFFFFF; border-color: #CCCCCC; border-width: 1px; color: ; font-size: inherit; font-family: inherit; } .ao2gf-848d016b-1834-4191-98c4-2e9c48ba54a2.ao2gf input:focus, .ao2gf textarea:focus, .ao2gf select:focus{ border-color: #3B99FC; } .ao2gf-848d016b-1834-4191-98c4-2e9c48ba54a2.ao2gf input.ao2gf-error, .ao2gf textarea.ao2gf-error, .ao2gf select.ao2gf-error{ border-color: #FF0000; border-width: 1px; } .ao2gf-848d016b-1834-4191-98c4-2e9c48ba54a2.ao2gf span.ao2gf-error-message{ color: #FF0000; font-size: 11px; } .ao2gf-848d016b-1834-4191-98c4-2e9c48ba54a2.ao2gf ::-webkit-input-placeholder { color: darkgrey; font-size: inherit; font-family: inherit; text-align: inherit; } .ao2gf-848d016b-1834-4191-98c4-2e9c48ba54a2.ao2gf ::-moz-placeholder { color: darkgrey; font-size: inherit; font-family: inherit; text-align: inherit; } .ao2gf-848d016b-1834-4191-98c4-2e9c48ba54a2.ao2gf :-ms-input-placeholder { color: darkgrey; font-size: inherit; font-family: inherit; text-align: inherit; } .ao2gf-848d016b-1834-4191-98c4-2e9c48ba54a2.ao2gf :-moz-placeholder { color: darkgrey; font-size: inherit; font-family: inherit; text-align: inherit; } .ao2gf_input_672f909ba8bac { background-color: rgb(57, 155, 55); background-image: none; background-repeat: no-repeat; background-size: auto; background-position: center center; color: rgb(255, 255, 255); border-radius: 6px; display: inline-block; text-decoration: none; font-size: 12pt; font-weight: normal; font-style: normal; border-style: solid; border-color: transparent; border-width: 0px; padding: 10px; } First Name*Last Name*Email Address* Company NameCompany Name

      Labeled Forms: The forms on Eco Canada are well-labeled, which I think will allow screen readers to correctly identify input fields (name, email, company, etc) and guide users through the process. This is an essential feature that ensures everyone can complete forms without confusion and join the Eco Canada community.

  3. Nov 2024
    1. once you realize that the world isn't what you think it is it's very easy to grab onto something else and grab onto some kind of weird conspiracy well that's the thing you've been describing thus far as well sorry to in just say but like the openness requires structure

      for - quote conspiracy theories - lizard people - first stage of initiation - if reality isn't as it appears, it's easy to latch onto something else - John Churchill

  4. Oct 2024
  5. Sep 2024
  6. Jan 2024
  7. Dec 2023
  8. Nov 2023
    1. So then they put it into lib only to find that they have to manually require it. Then later realize that this also means they now have to reboot their server any time they change the file (after a painfully long debugging time of "why what aren't my changes working?", because their lib folder classes are now second-class citizens). Then they go down the rabbit hole of adding lib to the autoload paths, which burns them because rake tasks then all get eager loaded in production. Then they inevitably realize anything inside app is autoloaded and make an app/lib per Xavier's advice.
    2. I think the symmetry of the naming between lib and app/lib will lead a fresh Rails developer to seek out the answer to “Why are there two lib directories?", and they will become illuminated. And it will prevent them from seeking the answer to “How do I autoload lib?” which will start them on a rough path that leads to me advising them to undo it.
  9. Sep 2023
    1. Note that the mere presence of this header causes premailer to be skipped, i.e., even setting skip_premailer: false will cause premailer to be skipped. The reason for that is that the skip_premailer is a simple header and the value is transformed into a string, causing 'false' to become truthy.

      They should fix this!

      lib/premailer/rails/hook.rb def skip_premailer_header_present? message.header[:skip_premailer] end

  10. Jun 2023
  11. Mar 2023
  12. Feb 2023

    Tags

    Annotators

  13. Dec 2022
    1. Here are some recommended unsubscribe methods: Include a prominent link in the message that takes recipients to a page for unsubscribing. Let recipients review the individual mailing lists they’re subscribed to. Let them unsubscribe from lists individually, or all lists at once. Automatically unsubscribe recipients who have multiple bounced messages. Periodically send a confirmation message to recipients to make sure they still want to get your messages.
    1. Many mail systems allow recipients to report mail as spam or junk, and mail streams from senders whose mail is often reported as junk tend to have poor deliverability. Hence, the mailers want to make it as easy as possible for recipients to unsubscribe; if an unsubscription process is too difficult, the recipient's alternative is to report mail from the sender as junk until the mail no longer appears in the recipient's inbox.
    1. Let’s say the recipient is considering unsubscribing. He or she may be too busy to search through the email to find the unsubscribe link, so he or she just clicks “Report as SPAM” to stop the emails from coming. This is the last thing any marketer wants to see happen. It negatively impacts sender reputation, requiring extra work to improve email deliverability. With the list-unsubscribe header, you will avoid getting into this kind of trouble in the first place.
  14. Nov 2022
  15. Oct 2022
  16. Sep 2022
    1. PRs will introduce various mechanisms step by step. Some of these have issues already. A possible breakdown could be: Annotation collection using instance values (links also does this) Defining annotations to which multiple keywords contribute (this is new, see Need more details of annotation collection #530) Defining subschema and keyword processing results to include annotations Processing sequence for keywords that dynamically rely on the results of static keywords The actual definition of unevaluatedProperties An example of unevaluatedProperties
  17. Jun 2022
  18. Apr 2022
    1. The easiest and simplest way to get out of a reading slump or to get into reading in the first place is to begin small. Novellas offer (almost) the sumptuousness and holisticness of novels. But they also don’t strain the mind too much because they are quick reads. Here are 10 short and easy to read books that will help beginners start reading. This list of novellas and short novels that are easy to slip into, not just because of their length but also because of the style of writing itself.

      https://gobookmart.com/10-short-and-easy-to-read-books-that-will-help-beginners-start-reading/

  19. Mar 2022
  20. Feb 2022
  21. Jan 2022
    1. Next, let’s say that your ticket is correct (so you made through security just fine!) and the gate number in your ticket says “Gate 24” but you walk to Gate 27. The attendant cannot authorize you to go through that gate because it’s not the right gate for your ticket.

      They have these mixed up! (Which is understandable, because 401 is misnamed "Unauthorized but should be named "Unauthenticated")

      Checking if authenticated (which, if it fails the check, should return 401 for authentication error) comes first,

      and then checking if authorized (which, if it fails the check, should return 403 for authorization error)

      See https://hyp.is/wRF7wHopEeynafOqKj81vw/stackoverflow.com/questions/3297048/403-forbidden-vs-401-unauthorized-http-responses

    2. In other words, an “incorrect ticket” is similar to messing up your credentials: wrong username and/or password and you receive back a 403 Forbidden. Using the correct credentials but trying to access a resource that is not allowed for those credentials returns you a 401 Unauthorized.

      They have these mixed up! (Which is understandable, because 401 is misnamed "Unauthorized but should be named "Unauthenticated")

      Checking if authenticated (which, if it fails the check, should return 401 for authentication error) comes first,

      and then checking if authorized (which, if it fails the check, should return 403 for authorization error)

      See for example https://www.loggly.com/blog/http-status-code-diagram/

    3. You can also think that 403 happens before 401, despite the natural number order: you will not receive a 401 until you resolve a 403.

      They have these mixed up! (Which is understandable, because 401 is misnamed "Unauthorized but should be named "Unauthenticated")

      Checking if authenticated (which, if it fails the check, should return 401 for authentication error) comes first,

      and then checking if authorized (which, if it fails the check, should return 403 for authorization error)

      See for example https://www.loggly.com/blog/http-status-code-diagram/

    1. There's a problem with 401 Unauthorized, the HTTP status code for authentication errors. And that’s just it: it’s for authentication, not authorization. Receiving a 401 response is the server telling you, “you aren’t authenticated–either not authenticated at all or authenticated incorrectly–but please reauthenticate and try again.” To help you out, it will always include a WWW-Authenticate header that describes how to authenticate.
    2. So, for authorization I use the 403 Forbidden response. It’s permanent, it’s tied to my application logic, and it’s a more concrete response than a 401. Receiving a 403 response is the server telling you, “I’m sorry. I know who you are–I believe who you say you are–but you just don’t have permission to access this resource. Maybe if you ask the system administrator nicely, you’ll get permission. But please don’t bother me again until your predicament changes.”
    1. It’s important to understand that an implements clause is only a check that the class can be treated as the interface type. It doesn’t change the type of the class or its methods at all. A common source of error is to assume that an implements clause will change the class type - it doesn’t!
    1. Code that is per-component instance should go into a second <script> tag.

      But this seems to conflict with https://hyp.is/NO4vMmzVEeylBfOiPbtB2w/kit.svelte.dev/docs

      The load function is reactive, and will re-run when its parameters change, but only if they are used in the function.

      which seems to imply that load is not just run once for the component statically, but rather, since it can be reactive to:

      url, params, fetch, session and stuff

      may be sufficiently like a per-instance callback, that it could be used instead of onMount?

  22. Dec 2021
  23. Nov 2021
  24. Oct 2021
  25. Sep 2021
  26. www.dynare.org www.dynare.org
    1. Notice that the plugin is placed in the resolve.plugins section of the configuration. tsconfig-paths-webpack-plugin is a resolve plugin and should only be placed in this part of the configuration. Don't confuse this with the plugins array at the root of the webpack configuration object.
    1. The question is similar but its in a Rails context. The solutions would answer my question, but I'm almost certain that he could probably leverage Arel to solve his problem. The question I posted was designed purely as a Ruby question so that it was easier to search for. You might want to suggest an edit of the title of his question because it didn't show up when I searched for a solution to my problem.
  27. Aug 2021
    1. Now consider we want to handle numbers in our known value set: const KNOWN_VALUES = Object.freeze(['a', 'b', 'c', 1, 2, 3]) function isKnownValue(input?: string | number) { return typeof(input) === 'string' && KNOWN_VALUES.includes(input) } Uh oh! This TypeScript compiles without errors, but it's not correct. Where as our original "naive" approach would have worked just fine. Why is that? Where is the breakdown here? It's because TypeScript's type system got in the way of the developer's initial intent. It caused us to change our code from what we intended to what it allowed. It was never the developer's intention to check that input was a string and a known value; the developer simply wanted to check whether input was a known value - but wasn't permitted to do so.
  28. Jul 2021
  29. test-prof.evilmartians.io test-prof.evilmartians.io
  30. Jun 2021
    1. I've seen (and fixed) Ruby code that needed to be refactored for the client objects to use the accessor rather than the underlying mechanism, even though instance variables aren't directly visible. The underlying mechanism isn't always an instance variable - it can be delegations to or manipulations of a class you're hiding behind a facade, or a session store with a particular format, or all kinds. And it can change. 'Self-encapsulation' can help if you need to swap a technology, a library, an object specification, etc.
    1. I've never felt challenged by any of my teachers. All their curriculums I've laughed at. I run circles around my teachers and most of them hated me because I'd finish my work and I'm pretty sure they hated me. I remember this lady. What was her name? I don't remember her name, but she was redheaded with glasses. She fucking hated me, man, because I'd laugh at pretty much all her work. I'd finish it in seconds and she'd get so frustrated with me because she's like, "Ugh. What am I supposed to do with you?"

      Time in the US, School, Teachers

  31. May 2021
  32. Apr 2021
    1. In many computing contexts, "TTY" has become the name for any text terminal, such as an external console device, a user dialing into the system on a modem on a serial port device, a printing or graphical computer terminal on a computer's serial port or the RS-232 port on a USB-to-RS-232 converter attached to a computer's USB port, or even a terminal emulator application in the window system using a pseudoterminal device.

      It's still confusing, but this at least helps/tries to clarify.

    1. Although echo "$@" prints the arguments with spaces in between, that's due to echo: it prints its arguments with spaces as separators.

      due to echo adding the spaces, not due to the spaces already being present

      Tag: not so much:

      whose responsibility is it? but more: what handles this / where does it come from? (how exactly should I word it?)

  33. Mar 2021
    1. Not to be confused with tree (graph theory), a specific type of mathematical object.

      Confusing: https://en.wikipedia.org/wiki/Tree_(data_structure) says

      Not to be confused with tree (graph theory) "Tree (graph theory)"), a specific type of mathematical object. but https://en.wikipedia.org/wiki/Tree_(graph_theory) redirects to https://en.wikipedia.org/wiki/Tree_structure and https://en.wikipedia.org/wiki/Tree_structure is in category Trees (data structures) So is one a subtype/hyponym of the other ... or what?? How are they related? Skimming the articles a bit, esp. the first paragraph which clearly states as much ( :) ), I believe the answer is: a tree (data structure) is an implementation (in a programming language) of / or a "type that simulates" a hierarchical tree structure. a tree (data structure) is the computer science analogue/dual to tree structure in mathematics

    1. An equation is any expression with an equals sign, so your example is by definition an equation. Equations appear frequently in mathematics because mathematicians love to use equal signs. A formula is a set of instructions for creating a desired result. Non-mathematical examples include such things as chemical formulas (two H and one O make H2O), or the formula for Coca-Cola (which is just a list of ingredients). You can argue that these examples are not equations, in the sense that hydrogen and oxygen are not "equal" to water, yet you can use them to make water.
  34. Feb 2021
    1. For this one we'll define a helper method to handle raising the correct errors. We have to do this because calling .run! would raise an ActiveInteraction::InvalidInteractionError instead of an ActiveRecord::RecordNotFound. That means Rails would render a 500 instead of a 404.

      True, but why couldn't it handle this for us?

  35. Jan 2021
    1. We informed and documented. We made it easy for you to understand the problem and also to take action if you disagreed. I hope you didn’t read https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html#how-to-install-the-snap-store-in-linux-mint-20. I can’t understand how it could be simpler.
    1. If components gain the slot attribute, then it would be possible to implement the proposed behavior of <svelte:fragment /> by creating a component that has a default slot with out any wrappers. However, I think it's still a good idea to add <svelte:fragment /> so everyone who encounters this common use case doesn't have to come up with their own slightly different solutions.
    1. I've reproduced, in a very simple way, what I would like it to do: https://svelte.dev/repl/2b0b7837e3ba44b5aba8d7e774094bb4?version=3.19.1

      This is the same URL as the original example given in issue description.

      I'm guessing what happened is they started with that one, made some changes, and then I think they must have forgot to save their modified REPL (which would have generated a new, unique URL).

    1. It’s fairly common to assume that there is an onHover event handler in React, especially when you consider the naming conventions of the other event handlers, such as onClick, onSubmit, and onDrag.Why wouldn’t there be an onHover event in React?
  36. Dec 2020
    1. No more waiting around for pull requests to be merged and published. No more forking repos just to fix that one tiny thing preventing your app from working.

      This could be both good and bad.

      potential downside: If people only fix things locally, then they may be less inclined/likely to actually/also submit a merge request, and therefore it may be less likely that this actually (ever) gets fixed upstream. Which is kind of ironic, considering the stated goal "No more waiting around for pull requests to be merged and published." But if this obviates the need to create a pull request (does it), then this could backfire / work against that goal.

      Requiring someone to fork a repo and push up a fix commit -- although a little extra work compared to just fixing locally -- is actually a good thing overall, for the community/ecosystem.

      Ah, good, I see they touched on some of these points in the sections:

      • Benefits of patching over forking
      • When to fork instead
    2. # fix a bug in one of your dependencies vim node_modules/some-package/brokenFile.js # run patch-package to create a .patch file npx patch-package some-package

      I love how directly this allows you to make the change -- directly on the source file itself -- and then patch-package does the actual work of generating a patch from it. Brilliant.

  37. developer.mozilla.org developer.mozilla.org
  38. Nov 2020
    1. When you email me, please include a minimal bash script that demonstrates the problem in the body of the email (not as an attachment). Also very clearly state what the desired output or effect should be, and what error or failure you are getting instead. You are much more likely to get a response if your script isn't some giant monster with obtuse identifiers that I would have to spend all afternoon parsing.
    2. You could decide to trust yourself and your teammates to always remember this special case. You can all freely use short-circuiting, but simply don't allow a short-circuit expression to be on the last line of a script, for anything actually deployed. This may work 100% reliably for you and your team, but I don't believe that is the case for myself and many other developers. Of course, some kind of linter or commit hook might help.
  39. Oct 2020
    1. In a large code base, this will result in moving imports randomly around until stuff just happens to work. Which is often only temporary, as a small refactoring or change in import statements in the future can subtly adjust the module loading order, reintroducing the problem.
    1. Looks like the problem is that debounce defaults to waiting for 0 ms ... which is completely useless!

      It would be (and is) way to easy to omit the 2nd parameter to https://lodash.com/docs/4.17.15#debounce.

      Why is that an optional param with a default value?? It should be required!

      There must be some application where a delay of 0 is useless. https://www.geeksforgeeks.org/lodash-_-debounce-method/ alludes to / implies there may be a use:

      When the wait time is 0 and the leading option is false, then the func call is deferred until to the next tick.

      But I don't know what that use case is. For the use case / application of debouncing user input (where each character of input is delayed by at least 10 ms -- probably > 100 ms -- a delay of 0 seems utterly useless.

    2. It looks like you accidentally passed resolve() (immediately invoking the function) directly to setTimeout rather than passing a function to invoke it. So it was being resolved immediately instead of after a 1000 ms delay as intended.

      I guess this is the "immediately invoked function" problem.

      Not to be confused with: immediately invoked function expression. (Since it is a regular named function and not a function expression.)

    3. You should not create a new debounce function on every render with: return new Promise(resolve => { debounce(() => resolve(this.getIsNameUnique(name)), 2000); }); Instead you should just wrap your whole function isNameUnique with the debounce (see my sandbox). By creating a new debounce function on every hit, it cannot 'remember' that is was called or that is will be called again. This will prevent the debouncing.
    1. hyperscript is much simpler to refactor and DRY up your code than with JSX, because, being vanilla javascript, its easier to work with variable assignment, loops and conditionals.
  40. Sep 2020
    1. The problem I have with this approach to state and prop variables is that the difference between them is very blurry. In React you can clearly see that a prop is an input to component (because of clear function notation), and that state is something internal. In Svelte they are both just variables, with the exception that props use export keyword.

      This is something I've seen before: people noticing that Svelte is missing some kind of naming convention.

      React has use___ convention, for example. Without that, it makes it hard to see the difference between and know just from the name that a function is an (mentioned in the other article I read) action and not a event handler or even component, for example.