72 Matching Annotations
  1. Last 7 days
    1. you can take the opportunity of using Python as a corresponding module pexpect is written for it (http://pexpect.sourceforge.net). It's clear that Python language should be installed on the system beforehand
    2. But in all this incongruous abundance you'll certanly find the links to expect It's just what is wanted: the tool, which is traditionally used to communicate automatically with interactive programs. And as it always occurs, there is unfortunately a little fault in it: expect needs the programming language TCL to be present. Nevertheless if it doesn't discourage you to install and learn one more, though very powerful language, then you can stop your search, because expect and TCL with or without TK have everything and even more for you to write scripts.
    1. does not use TCL, Perl, PHP, Python or anything else as an underlying language is written entirely in C has small and simple source code can easily be ported to almost all UNIX-like systems
    2. does not use TCL, Perl, PHP, Python or anything else as an underlying language
  2. Mar 2021
  3. Feb 2021
    1. Keeping bootstrap-sass in sync with upstream changes from Bootstrap used to be an error prone and time consuming manual process. With Bootstrap 3 we have introduced a converter that automates this.
    1. Often, such functions have in fact some hidden input which might be global variables, including the whole state of the system (time, free memory, …).
  4. Jan 2021
    1. I managed to remove it myself this morning...apparently it used to get it's hooks in so deep it was very difficult to remove the daemon as it interconnected with ubuntu-desktop for....reasons.
    2. Dll hell was caused by multiple apps on the same device requiring different versions of dependencies. As dlls were shared that couldn't be resolved. Giving each app it's own versions of its dependencies is a way of avoiding dll hell. I'm not saying this a good thing but it avoids that specific problem.
    3. The worst thing about snap is that it runs contrary to the concept of shared libraries that are easy to upgrade. Each snap package includes the dependencies for the app, which means you may have multiple (vulnerable) versions of a library installed. It's DLL hell all over again from a security perspective.
    1. The upside to snaps is they make installations simpler because they avoid the heartache of dependency hell. This is what occurs when a new application can’t run either because a required resource isn’t available, it’s the wrong version, or its installation overwrites files required by existing applications so they can’t run.
    1. Snap gets rid of dependency mess. Good. Snap offers in one place FOSS and proprietary app’s. Here I am suspicious. It may be an advantage for a commercial app-store and for some users. But this advantage may lead to loss of comfort and flexibility for the many users that rely first on FOSS.
    2. snaps have many benefits that are huge: automatic updates List item shorter delivery times between develper and user possibility to use tracks and choose how much on the bleeding edge you want to be way more security and privacy, less dependency issues software available on the same versions independently of distributions and versions of distributions
  5. Nov 2020
  6. icla2020b.jonreeve.com icla2020b.jonreeve.com
    1. Why should she be unhappy? She had a right to happiness. Frank would take her in his arms, fold her in his arms. He would save her.

      This internal monologue goes to show the power of inertia and the subsequent cognitive dissonance that it entails. Might I suggest that both of the sides of the coin are wrong? On one hand, she wants to stay into her safe zone and go on to live for her father and brother, on the other hand she thinks of going away with her other half. Notice how both of these realities have her essentially being dependent, or placing her wellbeing, on other people. A third option would be to make a change from within as a first step.

    1. By default the current directory is used, but it's recommended to pass a value in your configuration. This makes your configuration independent from CWD (current working directory).
  7. Oct 2020
    1. Yeah I see what you're saying. In my case, I had a group of classes that relied on each other but they were all part of one conceptual "module" so I made a new file that imports and exposes all of them. In that new file I put the imports in the right order and made sure no code accesses the classes except through the new interface.
    2. manually specifying the order isn't really a great solution (as tempting as it sounds) because you'll probably have broken behaviour if you subsequently move away from Rollup.
    1. In the many projects I have maintained so far, sooner or later I always run into the same issue: circular module dependencies. Although there are many strategies and best practices on how to avoid circular dependencies. There is very little on how to fix them in a consistent and predictable way.
    2. Secondly, whether this works is highly dependent on the module bundler. For example, in codesandbox, when bundling our app with Parcel (or Webpack or Rollup), this solution doesn’t work. However, when running this locally with Node.js and commonJS modules this workaround might work just fine.
    3. Examples of this include: requiring base classes or reading from imported variables that have not been initialized yet.
    4. as soon as you have a (indirect) circular dependency, you might be interacting with a half loaded module in your code.
    1. Specifically, since Root, Rule and AtRule all extend Container, it's essential that Container is evaluated (and therefore, in the context of a Rollup bundle, included) first. In order to do this, input.js (which is the 'gateway' to all the PostCSS stuff) must import root.js, root.js must import rule.js before it imports container.js, and rule.js must import at-rule.js before it imports container.js. Having those imports ensures that container.js doesn't then try to place Root, Rule or AtRule ahead of itself in the bundle.
    2. import './at-rule'; // break cyclical dependency deadlock
    3. Unfortunately something along these lines will always be necessary when handling these sorts of pathological cyclical dependency cases without using require.
    1. For simpler patterns, such as A -> B -> A, refactoring may be necessary. Perhaps the modules that live in B could be moved to A. Or, necessary code could be extracted to a C that both A and B reference.
    1. A simple Vue project can be run directly from a browser with no need of transpilation. This allows Vue to be easily dropped into a project the way jQuery is.While this is also technically possible with React, typical React code leans more heavily on JSX and on ES6 features like classes and non-mutating array methods.
    1. If you do want to include the module in your bundle, you need to tell Rollup how to find it. In most cases, this is a question of using @rollup/plugin-node-resolve.
  8. Sep 2020
    1. When you publish this module, you do not want to bundle React, for the reasons described above. (It would be even worse to bundle React in a library, because then its copy would duplicate that loaded by the application!) But the fix is slightly different for a library than an application. In this library's Rollup configuration, we only want to specify external, not globals:
    2. many CDNs nowadays ultimately source from npm (before caching the JavaScript on their own edge servers). So you'll be guaranteed to have the same library version on the CDN as on npm
    3. Why bundling 3rd-party dependencies can be a very bad idea
    4. So React, and other large third-party dependencies, should not be bundled alongside your application; they should be kept external. But where will they come from then?
    5. The only module names that Rollup understands out of the box are relative or absolute file paths, like ./maths.js in the example. This works just fine for your own code—but what about 3rd-party dependencies?
    1. Resolve imports to module ids (i.e. file names) using the same plugins that Rollup uses, and determine if an import should be external. If null is returned, the import could not be resolved by Rollup or any plugin but was not explicitly marked as external by the use
  9. Aug 2020
    1. Knowing all this, what would you do? Which path would you choose and why? The answer might seem obvious now that you come from the future - React
  10. May 2020
    1. It shouldn't be problem to watch the remote scripts for changes using Travis and repack and submit a new version automatically (depends on licensing). It does not put the script under your control, but at least it's in the package and can be reviewed.
  11. Apr 2020
  12. Mar 2020
    1. GNU gettext is designed to minimize the impact of internationalization on program sources, keeping this impact as small and hardly noticeable as possible. Internationalization has better chances of succeeding if it is very light weighted, or at least, appear to be so, when looking at program sources.
  13. Dec 2019
  14. Nov 2019
    1. You might want developers building projects with this CMS to be able to change the behaviour of some UIs, or to be able to provide new components that can be consumed by the CMS. Those components can't easily be included in the JS bundle for the CMS, as it would require recompiling the shipped code with outside references.
    1. before and after also accept arrays of constraints.

      controlling order

    2. Registering new services to the Injector If you've created a module using React, it's a good idea to afford other developers an API to enhance those components, forms, and state. To do that, simply register them with Injector.
    3. Instead of overriding a service with your own implementation, you enhance an existing service with your own concerns. This pattern is known as middleware.
  15. Oct 2019
  16. Sep 2019
  17. Aug 2019
  18. Apr 2017
    1. arg maxvw;vcP(w;c)2Dlog11+evcvw

      maximise the log probability.

    2. p(D= 1jw;c)the probability that(w;c)came from the data, and byp(D= 0jw;c) =1p(D= 1jw;c)the probability that(w;c)didnot.

      probability of word,context present in text or not.

    3. Loosely speaking, we seek parameter values (thatis, vector representations for both words and con-texts) such that the dot productvwvcassociatedwith “good” word-context pairs is maximized.
    4. In the skip-gram model, each wordw2Wisassociated with a vectorvw2Rdand similarlyeach contextc2Cis represented as a vectorvc2Rd, whereWis the words vocabulary,Cis the contexts vocabulary, anddis the embed-ding dimensionality.

      Factors involved in the Skip gram model

  19. Feb 2017
    1. In general, add providers to the root module so that the same instance of a service is available everywhere.

      So, from this I take it that once a Service is added to the root module, it can be used by any component of that module.

      What about the components imported, from sub-modules of the root one? Can their dependency needs be met, in similar fashion? For example, could a Component in another module (imported into the root one) just request a Service provided in the root module and have it properly injected from there, without anything else on the developer's part?

    2. you get a new instance of the service with each new instance of that component

      So, I take it that the Service instance will not be a singleton anymore? Whereas, if provided from the root module, it will?

  20. Apr 2016
    1. Interesting article on dependency injection and combining FP and OOP. The central question explored is how a language might work if function parameters were split into two categories, data and services/environment.

    1. How is all this different from mainstream constructors?Because an instance is created by sending a message to an object, and not by some special construct like a constructor invocation, we can replace the receiver of that message with any object that responds to that message. It can be another class (say, an implementation based on polar coordinates), or it can be a factory object that isn’t a class at all.

      Question: Is this different in any way from say Python where objects are constructed using a function call?