4,542 Matching Annotations
  1. Nov 2020
    1. I'd love to take this for a spin. Maybe I could rewrite Demeter or micdrop using it.

    1. Chevy tried an all-emoji press release about a new car that came across as very forced, proving that less is more when it comes to using emojis in emails. Not to mention, it’s almost impossible to decipher the message they’re trying to communicate.
    1. “Let’s say a trial is listed and I have to cross examine a witness,” he said. “Now, what is the guarantee that the witness would be willing to go all the way to the court in such a time?” If witnesses do not appear, then the matter would merely be adjourned.

      access to justice

    1. if the value given in value is contained in the array that is the value for the field for the form

      distinction:

      • the value given in value prop of Field
      • the value for the field for the form (formState.values[field_name])
    1. I think you meant a different set of arguments to Object.assign ? should be Object.assign({}, api.headers, headers) because you don't want to keep adding custom headers into hash of common api.headers. right?
    1. I think what the author intended to do was check if the second argument was a non-empty string (which is not the same thing as checking whether there are more than 1 argument, as the second argument could be passed but be the empty string).
    1. 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.
    2. This is the kind of bug we don't want to have, since it can be subtle, non-obvious, and hard to reproduce.
    1. It might seem too obvious but I've been struggling long time with this until I got that you need to include the base image too

      Thanks for the tip

    2. the "trick" is to pass to --cache-from the image you are rebuilding (and have it pulled already) and ALSO the image that it uses as base in the FROM.
    3. at least in the meantime allow users to bypass the security protections in situations where they are confident of the source of the layers
    1. This decorators proposal deliberately omits these features, in order to keep the meaning of decorators "well-scoped" and intuitive, and to simplify implementations, both in transpilers and native engines.
    2. It took us a long time for everyone to get on the same page about the requirements spanning frameworks, tooling and native implementations. Only after pushing in various concrete directions did we get a full understanding of the requirements which this proposal aims to meet.
    3. However, this coalescing was very complicated, both in the specification and implementations, due to the dynamism of computed property names for accessors. Coalescing was a big source of overhead (e.g., in terms of code size) in polyfill implementations of "Stage 2" decorators.
    1. # Run once, hold otherwise if [ -f "already_ran" ]; then echo "Already ran the Entrypoint once. Holding indefinitely for debugging." cat fi touch already_ran
    2. Edit this file (corresponding to your stopped container): vi /var/lib/docker/containers/923...4f6/config.json Change the "Path" parameter to point at your new command, e.g. /bin/bash. You may also set the "Args" parameter to pass arguments to the command. Restart the docker service (note this will stop all running containers):
    1. If the document is uncontroversial and agreement is reached quickly it might be committed directly with the "accepted" status. Likewise, if the proposal is rejected the status shall be "rejected". When a document is rejected a member of the core team should append a section describing the reasons for rejection.
    1. In Rust, we use the "No New Rationale" rule, which says that the decision to merge (or not merge) an RFC is based only on rationale that was presented and debated in public. This avoids accidents where the community feels blindsided by a decision.
    2. I'd like to go with an RFC-based governance model (similar to Rust, Ember or Swift) that looks something like this: new features go through a public RFC that describes the motivation for the change, a detailed implementation description, a description on how to document or teach the change (for kpm, that would roughly be focused around how it affected the usual workflows), any drawbacks or alternatives, and any open questions that should be addressed before merging. the change is discussed until all of the relevant arguments have been debated and the arguments are starting to become repetitive (they "reach a steady state") the RFC goes into "final comment period", allowing people who weren't paying close attention to every proposal to have a chance to weigh in with new arguments. assuming no new arguments are presented, the RFC is merged by consensus of the core team and the feature is implemented. All changes, regardless of their source, go through this process, giving active community members who aren't on the core team an opportunity to participate directly in the future direction of the project. (both because of proposals they submit and ones from the core team that they contribute to)
    1. How many times have you heard the cliché, for example, read between the lines? It turns out, the key to reading between the lines is actually to write between the lines. Once you start, you'll discover a whole new reading experience, elevated from that of a one-sided lecture to a two-sided conversation.

      reading as a conversation between myself and the text.

    1. i like working on application frameworks, compilers, interpreters, and emulators.
    1. but know I know what I don't want to do. I definitely know I want to be an Engineer now, and it makes it more clear that I should start my own business.
    1. Thanks so much for the reply! Due to space limitations for comments, I have appended my reply to my original question. Thanks again! (P.S. I can't up-vote your reply until my rep hits 15... Sorry about that.)
    1. web applications embed too much code. This is a reality and it has a big impact on their performances. The time lapse before a possible interaction with the web application you want to access, the famous "time to interactive", is not only related to the network time needed to download the application's content but also to the time spent by the JavaScript engine to parse and interpret the code.
    1. Converting Angular components into Svelte is largely a mechanical process. For the most part, each Angular template feature has a direct corollary in Svelte. Some things are simpler and some are more complex but overall it's pretty easy to do.
    2. Svelte slots are much easier to use and reason about than Angular transclude, especially in cases where you don't want an extra wrapper element around the slot content.
    1. political scientists Keith Poole and Howard Rosenthal, who have long tracked historical trends in political polarization, said their studies of congressional votes found that Republicans are now more conservative than they have been in more than a century. Their data show a dramatic uptick in polarization, mostly caused by the sharp rightward move of the GOP.
    1. Dart Web enables running Dart code on web platforms powered by JavaScript. With Dart Web, you compile Dart code to JavaScript code, which in turn runs in a browser
    1. Dart Sass is the primary implementation of Sass, which means it gets new features before any other implementation. It’s fast, easy to install, and it compiles to pure JavaScript which makes it easy to integrate into modern web development workflows.
    1. Feel free to subscribe to the issue (there's button in the right hand column) but do not comment unless you are adding value to the discussion. "Me too" and "+1" are not valuable, nor are use cases that have already been written in the comments (e.g., we know that you can't put <tr> or <dd> elements with a <div>).
    2. It won't work in all use cases, but it's better than the div soup.
    3. I run into this on almost every project and end up doing this as a workaround: :global([slot="content"]) This allows me to style that extra div in the component that contains the slots but it would be super nice to have <MyComponent slot="content"/> and eliminate that extra div
    4. If this is getting implemented, I think I'll love to see both implemented. I can see a lot of use cases where I would like to encapsulate the component with additional wrappers and in another scenarios I would like to just use the component. Now i work around this using empty div but then at times it breaks the structure because of the div element and I'll have to add more class utilities to make it work. This will be a great addition for Svelte.
    5. I don't like adding unnecessary divs.
    1. // replace css-loader with typings-for-css-modules-loader environment.loaders.get('moduleSass').use = environment.loaders.get('moduleSass').use.map((u) => { if(u.loader == 'css-loader') { return { ...u, loader: 'typings-for-css-modules-loader' }; } else { return u; } });
    1. Prettier’s printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way to say to Prettier roughly how long you’d like lines to be. Prettier will make both shorter and longer lines, but generally strive to meet the specified printWidth. Remember, computers are dumb. You need to explicitly tell them what to do, while humans can make their own (implicit) judgements, for example on when to break a line. In other words, don’t try to use printWidth as if it was ESLint’s max-len – they’re not the same. max-len just says what the maximum allowed line length is, but not what the generally preferred length is – which is what printWidth specifies.
    1. Obviously we shouldn't rush into anything. But changes like these are best made earlier on in a project's lifecycle, so I'm eager to hear what people think so that we can start making some progress.
    2. The success of JSX has proved that the second curly is unnecessary. Moreover, a lot of people — particularly those who have been exposed to React — have a visceral negative reaction to double curlies, many of them assuming that it brings with it all the limitations of crusty old languages like Mustache and Handlebars, where you can't use arbitrary JavaScript in expressions.
    1. When you’re implementing a bad plan yourself, instead of having a mentor bail you out by fixing it, a few really useful things happen:You learn many more details about why it was a bad idea. If someone else tells you your plan is bad, they’ll probably list the top two or three reasons. By actually following through, you’ll also get to learn reasons 4–1,217.You spend about 100x more time thinking about how you’ll avoid ever making that type of mistake again, i.e., digesting what you’ve learned and integrating it into your overall decision-making.By watching my mistakes and successes play out well or badly over the course of months, I was able to build much more detailed, precise models about what does and doesn’t matter for long-term codebase health. Eventually, that let me make architectural decisions with much more conviction.

      There's a benefit to embarking on a challenge without a more experienced authority to bail you out.

      • You learn many more details about why it's a bad idea.
      • The lessons you learn in terms of how to avoid the mistakes you made stick with you longer

      (I would add that the experience is more visceral, it activates more modalities in your brain, and you remember it much more clearly.)

      These types of experiences result in what the author calls more "detailed, precise models". For me they result in a sort of intuition.

    1. Some of the verbs implemented by systemctl are designed to provide a high-level overview in a human readable format. All that information is available over dbus, and/or journalctl, systemctl show. We could provide that information in json format, but there's a second problem. Information and format of information printed by e.g. systemctl status is not stable. Since the output is not suitable for programmatic consumption anyway, there's no need to provide it in a machine readable format.
    2. In principle, this information is already available through other means, but it is actually a fair amount of work to gather it in this form, and I think it could be useful to open it up to programmatic consumption.
    3. Although I agree that -o json should return proper JSON, believe the proper way for external tools like SaltStack etc. to talk to systemd is DBus. See also saltstack/salt#20392 - everything else is more or less just hack-ish and prone to break easily.
    1. http://jonudell.info/h/tag-rename-02.mp4

      Most people would embed a YouTube video. Nice to see no dependency on 3rd-party service here.

    1. People want to be able to choose which service they use to communicate with people. However, today if you want to message people on Facebook you have to use Messenger, on Instagram you have to use Direct, and on WhatsApp you have to use WhatsApp. We want to give people a choice so they can reach their friends across these networks from whichever app they prefer.We plan to start by making it possible for you to send messages to your contacts using any of our services, and then to extend that interoperability to SMS too. Of course, this would be opt-in and you will be able to keep your accounts separate if you'd like.

      Facebook plans to make messaging interoperable across Instagram, Facebook and Whatsapp. It will be opt-in.

  2. Oct 2020
    1. But what should you write about? Simply ask yourself, What's bothering you most right now? Write a post where you work through that—and get to a conclusion. This is how I start every time. Writing is therapy that you publish for the world to learn from.
    1. First, choose your topicThe best topic to write about is the one you can’t not write about. It’s the idea bouncing around your head that urges you to get to the bottom of it.You can trigger this state of mind with a two-part trick. First, choose an objective for your article:Open people’s eyes by proving the status quo wrong.Articulate something everyone’s thinking about but no one is saying. Cut through the noise.Identify key trends on a topic. Use them to predict the future.Contribute original insights through research and experimentation.Distill an overwhelming topic into something approachable. (This guide.)Share a solution to a tough problem.Tell a suspenseful and emotional story that imparts a lesson.Now pair that objective with a motivation:Does writing this article get something off your chest?Does it help reason through a nagging, unsolved problem you have?Does it persuade others to do something you believe is important?Do you obsess over the topic and want others to geek out over it too?That’s all that's needed: Pair an objective with a motivation. Now you have something to talk about.
    1. Looking at all those bearing, heading, orientation, navigation, position, direction, etc. I think we have a bigger problem here. Someone has decided how to use tag (e.g. orientation is about page orientation), but there are 100 other cases. Imho, to disallow misusing there should be no "heading", but rather "html-heading", "gps-heading", "whatelse-heading", which make mistakes impossible. So yes, "heading" should go.
    1. I'll want to generate, upload, and store a certificate for publishing NuGet packages.

    1. I use a mutator and use it's changeValue function to 'change' the value of the relevant field (I supply the same value). This in turn notifies all relevant parties of the change to the form's state, and a validation is triggered.

      Nearly duplicate annotation here: https://hyp.is/I2t56hjLEeuPXIsZG-jYog/xtzmf.csb.app/

    2. If you have a better/simpler/"more official" solution, I'd still love to see it!

      The "official" solution is to use submitErrors (see Erik's answer).

    3. we update the validation schema on the fly (we had a similar case with a validation that needs to be included whenever some fetch operation was completed)
    4. is this solution considered a hack or is something that we can use as an approved workaround in scenarios where we need to manually trigger validations?
    5. The only tricky part is that the error will come back as meta.submitError, so you need to check for both when displaying your error.
    6. The more official way to do this would be to run the check (you could even reuse this.validate) in onSubmit.
    1. export const validationSchema = {
        field: {
          account: [Validators.required.validator, iban.validator, ibanBlackList],
          name: [Validators.required.validator],
          integerAmount: [
      

      Able to update this schema on the fly, with:

        React.useEffect(() => {
          getDisabledCountryIBANCollection().then(countries => {
            const newValidationSchema = {
              ...validationSchema,
              field: {
                ...validationSchema.field,
                account: [
                  ...validationSchema.field.account,
                  {
                    validator: countryBlackList,
                    customArgs: {
                      countries,
                    },
                  },
                ],
              },
            };
      
            formValidation.updateValidationSchema(newValidationSchema);
          });
        }, []);
      
    1. Focus on your application: forget about forms details like I'm dirty, field touched...
    2. What would happen if we get the list from a rest api when the form component is mounted? That's an interesting topic, you can add a rule once a component has been mounted and update the associated validation schema.
    3. Ok, I have seen that there are lot of built-in and third party validations, but sooner or later I will face a validation rule not covered by this buffet. Can I build a custom one? Of course you can!
    4. On the other hand, handling form validation on your own can be tempting, but you have to cover scenarios like:
    5. You can try to build a solution to tackle these issues on your own, but it will cost you time and money... why not use a battle-tested solution to handle all this complexity?
    6. If you want to implement a form with a superb User Experience, you have to take care of many variables:
    7. Form validation can get complex (synchronous validations, asynchronous validations, record validations, field validations, internationalization, schemas definitions...). To cope with these challenges we will leverage this into Fonk and Fonk Final Form adaptor for a React Final Form seamless integration.
    8. Managing Form State (holding field information, check if a control has been touched, if the user has clicked the submit button, who owns the current focus...) can be tedious and prone to errors. We can get help from React Final Form to handle these challenges for us.
    1. Use the same value that was submitted, which ensures that a 'change' is triggered even though the value itself doesn't change. Therefore, the same value gets validated again.

      Calling it "change" even though it didn't change is kind of cheating/abuse ... but I guess it's okay...??

        mutateValue([name], state, { changeValue }) {
          // change the value to the same value, thus
          // triggering a revalidation of the same value
          changeValue(state, name, value => value);
        }
      
    1. There's an issue #3368 for describing better what triggers reactive updates, as I do think there is some stuff we could be more explicit about
    2. Anyway, If this is an expected behaviour, we should probably add an asterisk to the docs, describing the pitfall, because I believe many will be bitten by this.
    1. Mr Dutton will renew his attack on Facebook and other companies for moving to end-to-end encryption, saying it will hinder efforts to tackle online crime including child sexual abuse.This month, Australia joined its "Five-Eyes" intelligence partners – the United States, Britain, New Zealand and Canada – along with India and Japan, in signing a statement calling on tech companies to come up with a solution for law enforcement to access end-to-end encrypted messages.

      Countering child exploitation is an extremely important issue. It's a tough job and encryption makes it harder. But making encryption insecure is counter intuitive and has negative impacts on digital privacy. So poking a hole in encryption, while it can assist with countering child exploitation, can also inadvertently be helping, for example, tech-enabled domestic abuse.

      Hopefully DHA understands this and thus have thrown it back at the tech companies to come up with a solution for law enforcement.

    1. The idea of the hermeneutic circle is to envision a whole in terms how the parts interact with each other, and how they interact with the whole. That may sound a little bit out there, so let’s have a look at a concrete example.

      This is a general concept, the rest of the article extrapolates the idea to the act of reading. This may be a stretch, since it implies that whatever can be broken into parts will belong to the hermeneutic circle, while this only applies to interpreting (text)

    1. I highly recommend setting a higher bound on the number of returned entities by each resolve function in your code.
    1. withindex.js, we have a single source of truth, giving fine grained control on what we expose to the outside world.
    2. The index.js file is the main entry point and imports and exports everything from internal.js that you want to expose to the outside world.
    3. This does solve the problem, but now our project and API is structured differently. In large projects it might be very hard to determine how to pull this trick off, or even impossible!
    4. 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. To silence circular dependencies warnings for let's say moment library use: // rollup.config.js import path from 'path' const onwarn = warning => { // Silence circular dependency warning for moment package if ( warning.code === 'CIRCULAR_DEPENDENCY' && !warning.importer.indexOf(path.normalize('node_modules/moment/src/lib/')) ) { return } console.warn(`(!) ${warning.message}`) }
    1. Any software that makes HTTP requests to other sites should make it straightforward to enable the use of a cache.
    2. Take responsibility for your outgoing network traffic If you install software that interacts with other sites over the network, you should be aware how it works and what kind of traffic it generates. If it has the potential to make thousands of requests to other sites, make sure it uses an HTTP cache to prevent inflicting abuse on other sites.
    3. Identify your user agents When deploying software that makes requests to other sites, you should set a custom User-Agent header to identify the software and provide a means to contact its maintainers. Many of the automated requests we receive have generic user-agent headers such as Java/1.6.0 or Python-urllib/2.1 which provide no information on the actual software responsible for making the requests.
    1. It is not appropriate to use these document types for live content. These are made available only for download, to support local use in development, evaluation, and validation tools. Using these versions directly from the W3C server could cause automatic blockage, preventing them from loading. If it is necessary to use schemata in content, follow guidelines to avoid excessive DTD traffic. For instance, use caching proxies to avoid fetching the schema each time it is used, or ensure software uses a local cache, such as with XML catalogs.
    1. A simple rule of thumb: the name of the updated variable must appear on the left hand side of the assignment. For example this... const foo = obj.foo; foo.bar = 'baz';...won't update references to obj.foo.bar, unless you follow it up with obj = obj.
    1. Longstanding controversy surrounds the meaning of the term "hacker". In this controversy, computer programmers reclaim the term hacker, arguing that it refers simply to someone with an advanced understanding of computers and computer networks[5] and that cracker is the more appropriate term for those who break into computers, whether computer criminals (black hats) or computer security experts (white hats).
    1. One of Svelte's advantages, for me, is that I can test out ideas with relatively few lines of code. the #with feature could save me from adding a separate component for the content of an #each loop. I get frustrated when I have to create a new file, move the content of the #each clause, import it as a component, and add attributes and create exports for that, and implement events to send messages back, and event handlers, when I just wanted to test a small feature.
    1. How to Become a Straight-A Student: The Unconventional Strategies Real College Students Use to Score High While Studying Less Kindle Edition by {"isAjaxComplete_B001IGNR0U":"0","isAjaxInProgress_B001IGNR0U":"0"} Cal Newport (Author) › Visit Amazon's Cal Newport Page Find all the books, read about the author, and more. See search results for this author Are you an author? Learn about Author Central Cal Newport (Author)
    1. How to Be a High School Superstar: A Revolutionary Plan to Get into College by Standing Out (Without Burning Out) 1st Edition, Kindle Edition by {"isAjaxComplete_B001IGNR0U":"0","isAjaxInProgress_B001IGNR0U":"0"} Cal Newport (Author) › Visit Amazon's Cal Newport Page Find all the books, read about the author, and more. See search results for this author Are you an author? Learn about Author Central Cal Newport (Author)
    1. One of the significant differences between the two is that a call to a partially applied function returns the result right away, not another function down the currying chain; this distinction can be illustrated clearly for functions whose arity is greater than two.
    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. _.debounce creates a function that debounces the function that's passed into it. What your s.search function is doing is calling _.debounce all over again every time s.search is called. This creates a whole new function every time, so there's nothing to debounce.
    2. I run s.search() by typing into an input box, and if I type gibberish very quickly, the console prints out "making search request" on every key press, so many times per second -- indicating that it hasn't been debounced at all.
    3. they're not invoking the function that _.debounce returns
    1. If you define a variable outside of your form, you can then set the value of that variable to the handleSubmit function that 🏁 React Final Form gives you, and then you can call that function from outside of the form.
    1. Sometimes we can’t implement a solution that’s fully spec-compliant, and in those cases using a polyfill might be the wrong answer. A polyfill would translate into telling the rest of the codebase that it’s okay to use the feature, that it’ll work just like in modern browsers, but it might not in edge cases.
    1. Using the keyboard arrows, navigate down the suggestion list to the item(s) you want to remove from the Chrome autofill suggestions With the suggestion highlighted, use the appropriate keystroke sequence to delete the Chrome suggestion:

      Linux: Shift + Delete