1,001 Matching Annotations
  1. Apr 2021
    1. What you want is not to detect if stdin is a pipe, but if stdin/stdout is a terminal.

      The OP wasn't wrong in exactly the way this comment implies: he didn't just ask how to detect whether stdin is a pipe. The OP actaully asked how to detect whether it is a terminal or a pipe. The only mistake he made, then, was in assuming those were the only two possible alternatives, when in fact there is (apparently) a 3rd one: that stdin is redirected from a file (not sure why the OS would need to treat that any differently from a pipe/stream but apparently it does).

      This omission is answered/corrected more clearly here:

      stdin can be a pipe or redirected from a file. Better to check if it is interactive than to check if it is not.

    1. By the way, the README file of the expect says there is a libexpect library that can be used to write programs on C/C++ which allows to avoid the use of TCL itself. But I'm afraid, this subject is beyond this article. Besides authors of expect themselves seem to prefer expect-scripts to the library.

      possible but doesn't seem preferred

      looking at what the authors themselves use

    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. TTY is right there in the name, but this article makes no attempt to clarify what exactly the relationship between a pseudoterminal and a TTY. I feel like a whole paragraph about the relation to TTY would be warranted, including a link to TTY article, of course, which does link [back] to and explain some of the relation to pseudoterminal:

      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.

    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?)

    1. There is a tendency in short luck-heavy games to require you to play multiple rounds in one sitting, to balance the scores. This is one such game. This multiple-rounds "mechanic" feels like an artificial fix for the problem of luck. Saboteur 1 and 2 advise the same thing because the different roles in the game are not balanced. ("Oh, well. I had the bad luck to draw the Profiteer character this time. Maybe I'll I'll draw a more useful character in round 2.") This doesn't change the fact that you are really playing a series of short unbalanced games. Scores will probably even out... statistically speaking. The Lost Cities card game tries to deal with the luck-problem in the same way.

      possibly rename: games: luck: managing/mitigating the luck to games: luck: dealing with/mitigating the luck problem

    1. The diagram shows the client libraries communicate with the Server passing each Selenium command for execution. Then the server passes the Selenium command to the browser using Selenium-Core JavaScript commands. The browser, using its JavaScript interpreter, executes the Selenium command. This runs the Selenese action or verification you specified in your test script.

      This is my annotation.

    1. Now VS Code's generic debugger UI supports all data breakpoint access types defined in the Debug Adapter Protocol as context menu actions in the VARIABLES view: Break on Value Read: breakpoint will be hit every time a variable gets read. Break on Value Change: breakpoint will be hit every time a variable gets changed (this action was previously available). Break on Value Access: breakpoint will be hit every time a variable is read or changed.
  2. Mar 2021
    1. Svelte is different in that by default most of your code is only going to run once; a console.log('foo') line in a component will only run when that component is first rendered.
    1. As to opinions about the shortcomings of the language itself, or the standard run-times, it’s important to realize that every developer has a different background, different experience, different needs, temperament, values, and a slew of other cultural motivations and concerns — individual opinions will always be largely personal and, to some degree, non-technical in nature.
    1. I don't understand why this isn't being considered a bigger deal by maintainrs/the community. Don't most Rails developers use SCSS? It's included by default in a new Rails app. Along with sprockets 4. I am mystified how anyone is managing to debug CSS in Rails at all these days, that this issue is being ignored makes sprockets seem like abandonware to me, or makes me wonder if nobody else is using sprockets 4, or what!
    1. we used `backticks` to jump into native Javascript to use moment.js

      In regular Ruby, `` executes in a shell, but obviously there is no shell of that sort in JS, so it makes sense that they could (and should) repurpose that syntax for something that makes sense in context of JS -- like running native JavaScript -- prefect!

  3. Feb 2021
    1. Channel 4 News. (2021, January 17). “It’s working in mainland China with 1.4 billion people. It doesn’t depend on being an island.” A pandemic adviser to the New Zealand government says achieving zero cases isn’t about the size of a country, but about “strong leadership”. Https://t.co/SSpc8DjZXi [Tweet]. @Channel4News. https://twitter.com/Channel4News/status/1350834342709358593

    1. Though rarer in computer science, one can use category theory directly, which defines a monad as a functor with two additional natural transformations. So to begin, a structure requires a higher-order function (or "functional") named map to qualify as a functor:

      rare in computer science using category theory directly in computer science What other areas of math can be used / are rare to use directly in computer science?

    1. note that TRB source code modifications are not proprietary

      In other words, you can build on this software in your proprietary software but can't change the Trailblazer source unless you're willing to contribute it back.

      loophole: I wonder if this will actually just push people to move their code -- which at the core is/would be a direction modification to the source code - out to a separate module. That's so easy to do with Ruby, so this restriction hardly seems like it would have any effect on encouraging contributions.

    1. The reason Reform does updating attributes and validation in the same step is because I wanna reduce public methods. This is to save users from having to remember state.

      I see what he means, but what would you call this (tag)? "have to remember state"? maybe "have to remember" is close enough

      Or maybe order is important / do things in the right order is all we need to describe the problem/need.

    1. Hodcroft, E. B., Domman, D. B., Oguntuyo, K., Snyder, D. J., Diest, M. V., Densmore, K. H., Schwalm, K. C., Femling, J., Carroll, J. L., Scott, R. S., Whyte, M. M., Edwards, M. D., Hull, N. C., Kevil, C. G., Vanchiere, J. A., Lee, B., Dinwiddie, D. L., Cooper, V. S., & Kamil, J. P. (2021). Emergence in late 2020 of multiple lineages of SARS-CoV-2 Spike protein variants affecting amino acid position 677. MedRxiv, 2021.02.12.21251658. https://doi.org/10.1101/2021.02.12.21251658

  4. Jan 2021
    1. Validity is a unitary concept. It is the degree to which all the accumulated evidence supports the intended interpretation of test scores for the proposed use. Like the 1999 Standards, this edition refers to types of validity evidence, rather than distinct types of validity. To empha-size this distinction, the treatment that follows does not follow historical nomenclature (i.e., the use of the terms content validity or predictive validity). (

    Tags

    Annotators

    1. Please don't thank me! ;-) If this answer did help, just click the little grey ☑ at the left of this text right now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey ☑ and the little up-arrow... If you have any further questions, just ask another one! ;-)

      How would you even describe this comment?

      "just doing my job"? but he is (I assume) answering to be nice not because it's his job

      "I won't take it personally"? vote my answer up or down, whichever you please

      impartial, dispassionate, and objective, perhaps? "just the facts, ma'am"


      Separately, what is the "Please don't thank me!" for? Is it that politeness? False modesty? Genuine modesty? Or is it rude? Why not allow someone to thank you??

    1. a report identifying the climate strategies and technologies that will result in the most air and water quality improvements

      One would expect such a report to say much about reducing emissions from electricity generation, however, in many states, particularly those in the Northeast and North, electricity generation and use only produces a small portion of GHG emissions. In New York State, electricity generation is responsible for less than 20% of emissions while heating and transportation each produce between 35% and 40% of emissions. Thus, in New York, emissions from electricity are a third-level priority. In New York, a focus on adoption of heat pumps and electric vehicles will contribute more to cleaning our air and water than a focus on electricity.

      It is important that this report identify strategies and technologies which are appropriate for the various regions of the country.

    1. The country’s largest concert promoter, Live Nation, which furloughed 20 percent of its staff as part of a $600 million cost-cutting effort, has been aggregating artists’ free livestreams on its website, and planning for more highly produced fan-less concerts that could generate revenue through advertising or ticket sales.

      More alternatives made for fans to enjoy music while artist and company make lost money

    1. 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 compels you to get to the bottom of it.You can trigger that state of mind with a two-part trick. Part one is choosing 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.Part two is pairing your 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?

      This is great to go along with .Josh Spector how to outline a blog post

    1. This variant presents 14 non-synonymous mutations, 6 synonymous mutations and 3 deletions. The multiple mutations present in the viral RNA encoding for the spike protein (S) are of most concern, such as the deletion Δ69-70, deletion Δ144, N501Y, A570D, D614G, P681H, T716I, S982A, D1118H
  5. Dec 2020
    1. Pinduoduo
      • largest <span style="background-color: lightblue">interactive e-commerce platform</span> in China and in the world
      • second-largest online marketplace in China by number of users and number of orders

      enables groups (often formed via WeChat) to haggle with merchants for bulk purchases, specially groceries.

    1. Some devs prefer Svelte’s minimal approach that defers problems to userland, encouraging more innovation, choice, and fragmentation, and other devs prefer a more fully integrated toolkit with a well-supported happy path.

      tag?: what scope of provided features / recommended happy path is needed?

    2. It’s worth mentioning that Svelte limits its scope to being only a UI component framework. Like React, it provides the view layer, but it has more batteries included with its component-scoped CSS and extensible stores for state management. Others like Angular and Vue provide a more all-in-one solution with official routers, opinionated state management, CLIs, and more. Sapper is Svelte’s official app framework that adds routing, server-side rendering, code splitting, and some other essential app features, but it has no opinions about state management and beyond. Some devs prefer Svelte’s minimal approach that defers problems to userland, encouraging more innovation, choice, and fragmentation, and other devs prefer a more fully integrated toolkit with a well-supported happy path.

      tag?: what scope of provided features / recommended happy path is needed?

    3. With the caveat that hero worship can be gross, distorting, and unhelpful to everyone involved, Svelte author Rich Harris (@rich_harris on Twitter) is one of my favorite open source developers. In the JS community he’s well-known among tool authors for spreading interesting ideas. He’s the creator of many open source projects including Rollup, the bundler of choice for many libraries including React and Vue.
    4. The compiler architecture moves complexity from the runtime and source code to buildtime and tools. Behind Svelte’s simple APIs sits a beefy compiler. Frontend web development has become very tool heavy in the webapp era, so in practice this adds little cost beyond what developers like myself already pay, but increased build complexity is important to acknowledge.

      tool-heavy dependence on build tools / heavy/complex build-time

  6. Nov 2020
    1. (15x) ENJOYMENT: Forgettable Outstanding(10x) DEPTH (IN RELATION TO COMPLEXITY): Lacking Meaty (5x) LUCK FACTOR: All Luck All Skill (3x) REPLAYABILITY: Nil Limitless(10x) MECHANICS: Boring Interesting (4x) PLAYER INTERACTION: Low High (4x) PLAYER COUNT PERFORMANCE: Not Balanced Balanced (2x) GAME LENGTH: Too Short/Long Just Right (2x) CLARITY OF RULES: Mud Crystal (5x) COMPONENT QUALITY: Cheap World ClassINITIAL RATING (sum(Criteria Rating x Criteria Weight)/Total Weight) = 7.7

      rating scale evaluation

    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.
  7. Oct 2020
    1. Doing so also means adding empty import statements to guarantee correct order of evaluation of modules (in ES modules, evaluation order is determined statically by the order of import declarations, whereas in CommonJS – and environments that simulate CommonJS by shipping a module loader, i.e. Browserify and Webpack – evaluation order is determined at runtime by the order in which require statements are encountered).

      Here: dynamic loading (libraries/functions) meaning: at run time

    1. The primary motivation behind virtual-dom is to allow us to write code independent of previous state. So when our application state changes we will generate a new VTree. The diff function creates a set of DOM patches that, based on the difference between the previous VTree and the current VTree, will update the previous DOM tree to match the new VTree.

      annotation meta: may need new tag: for: "code independent of previous state."

      annotation meta: may need new tag: for: diffs other than source/text code diffs (in this case diffs between virtual DOM trees)

    1. In most oral societies, however, traditions are understood to bemalleable; that is, they are supposed to be changed and made relevant to the new situationsin which they are cited.

      And this is almost just what we see in modern religion concerning the bible. Even though it's written down, people read the words and change their original meaning and intent to make them relevant to their modern lives rather than the older historical context in which they were originally created.

    1. Update, 11:22 Eastern: Weiss has posted a letter of resignation addressed to Times publisher A.G. Sulzberger on her website. In it, she denounces the Times for fostering an atmosphere of stifling conformity and accuses her now-former colleagues of bullying:

      Having your own website is a must, particularly when you've just left one of the biggest platforms on the planet and still need to have a platform to reach your audience and the world.

  8. Sep 2020
  9. Aug 2020
  10. Jul 2020
    1. For example, as the GDPR requires that a controller must be able to demonstrate that valid consentwas obtained, all presumed consents of which no references are kept willautomatically be below theconsent standard of the GDPR and will need to be renewed. Likewise as the GDPR requires a“statement or a clear affirmative action”, all presumed consents that were based on a more impliedform of action by the data subject (e.g.a pre-ticked opt-in box) will also not be apt to the GDPRstandard of consent.
    1. Online Reading Comprehension

      Sharing what they've found with one another Students getting really excited when they've found something, want to show teacher Once students get one part, challenge them to find something new Evaluate the information; what features make it good? What is definition of best? Synthesize what you are finding; bring in all the information from different sources Multimodal ways of reading

    1. Framing Internet use as a literacy issue will also make it more likely to be embraced by schools, an institution resistant to adopting new technologies

      If this is included with literacy, schools and districts may think more about the new ways that our students are constructing learning

  11. Jun 2020
    1. Rosenberg, E. S., Tesoriero, J. M., Rosenthal, E. M., Chung, R., Barranco, M. A., Styer, L. M., Parker, M. M., John Leung, S.-Y., Morne, J. E., Greene, D., Holtgrave, D. R., Hoefer, D., Kumar, J., Udo, T., Hutton, B., & Zucker, H. A. (2020). Cumulative incidence and diagnosis of SARS-CoV-2 infection in New York. Annals of Epidemiology. https://doi.org/10.1016/j.annepidem.2020.06.004

    1. What would be nice is if JavaScript had a built-in way to do what I can do in Ruby with:

      > I18n.interpolate('Hi, %{name}', name: 'Fred')
      => "Hi, Fred"
      

      But to be fair, I18n comes from i18n library, so JS could just as easily (and I'm sure does) have a library that does the same thing.

      Update: Actually, you can do this in plain Ruby (so why do we even need I18n.interpolate?):

      main > "Hi, %{name}" % {name: 'Fred'}
      => "Hi, Fred"
      
      main > ? String#%
      
      From: string.c (C Method):
      Owner: String
      Visibility: public
      Signature: %(arg1)
      Number of lines: 9
      
      Format---Uses str as a format specification, and returns the result
      of applying it to arg. If the format specification contains more than
      one substitution, then arg must be an Array or Hash
      containing the values to be substituted. See Kernel::sprintf for
      details of the format string.
      
         "%05d" % 123                              #=> "00123"
         "%-5s: %016x" % [ "ID", self.object_id ]  #=> "ID   : 00002b054ec93168"
         "foo = %{foo}" % { :foo => 'bar' }        #=> "foo = bar"
      

      I guess that built-in version is fine for simple cases. You only need to use I18n.translate if you need its more advanced features like I18n.config.missing_interpolation_argument_handler.