81 Matching Annotations
  1. Last 7 days
    1. Here’s a really neat editor for those from Mads Stoumann (which works for circles and ellipses as well):
    2. /* referencing path from an inline SVG */ clip-path: url(#c1);

      first sighting: referencing image by ID in CSS

  2. Apr 2021
    1. one of the oldest problems was the use of Command-line interactive programs in UNIX shell-scripts

      first sighting of this article

    1. fill_in('Foo', with: 'bar', fill_options: { clear: :backspace })

      first sighting: fill_options: { clear: :backspace })

      first sighting: fill_options as an option at all (for fill_in only, I presume)

      I wonder they added at all as a response to this:

      See also: https://hyp.is/ZcXVJJMyEeucgmPXYFP9yg/github.com/teamcapybara/capybara/issues/203

      (which key should have been pressed, backspace, space?)

  3. Mar 2021
    1. reduce(root){@1[@2]||={}}

      first sighting: Ruby 3's new @1 shorthand

    2. data = {}.extend XKeys::Auto # Vs ::Hash, uses arrays for int keys data[:users, 0, :name] # nil data[:users, 0, :name, :raise => true] # KeyError data[:users, :[], :name] = 'Matz' # :[] is next index, 0 in this case # {:users=>[{:name=>"Matz"}]} pick = [:users, 0, :name] data[*pick] # Matz data[:users, 0, :accesses, :else => 0] += 1 # {:users=>[{:name=>"Matz", :accesses=>1}]}
    1. My preference here is biased by the fact that I spend everyday at work building web components, so Svelte's approach feels very familiar to slots in web components.

      first sighting: That <template>/<slot> is part of HTML standard and the reason Svelte uses similar/same syntax is probably because it was trying to make it match / based on that syntax (as they did with other areas of the syntax, some of it even JS/JSX-like, but more leaning towards HTML-like) so that it's familiar and consistent across platforms.

    1. Fires an invalid event at the element

      First time I've seen/heard it said that an event is fired at some target. But it sure makes sense, since it matches how "fire" is used in other senses (like shooting a gun).

    1. var md = require('markdown-it')('commonmark');

      first sighting: require(...)(...)

      How would that work with import? Not as fluidly but...

      import markdownIt from 'markdown-it'
      let md = markdownIt('commonmark')
      
    1. Shogi is a classic game. I know many people who want to play Shogi, but the Kanji on the pieces makes it too hard to master. I have designed this Shogi with icons so anybody can learn it easily.
  4. Feb 2021
    1. URI::MailTo::EMAIL_REGEXP

      First time I've seen someone create a validator by simply matching against URI::MailTo::EMAIL_REGEXP from std lib. More often you see people copying and pasting some really long regex that they don't understand and is probably not loose enough. It's much better, though, to simply reuse a standard one from a library — by reference, rather than copying and pasting!!

    1. Modelling the flow of a program where chunks of code are executed in a certain order, with a successful “happy path” and an “error-out” path is called a Railway. It popped up in functional languages

      first sighting: railway-oriented programming

    1. This is the most popular article “railway oriented programming” on one of the most popular websites of F #.

      I may have seen it before but not really paid attention to it, but this just might be the first time I stopped to look it up.

      Because I saw the code below, didn't recognize the language, and was intrigued.

    1. Some people believed I argued that object orientation is bad simply because extends has problems, as if the two concepts are equivalent. That's certainly not what I thought I said, so let me clarify some meta-issues.

      first sighting: meta-issue 

    1. Launched in 2008, our breakthrough reading app, Reading Eggs, has been used by over 3.4 million users in 169 countries.

      Have Reading Eggs for kids. First time I had learned anything about the company behind it.

      Here: https://hyp.is/G85jmnChEeuRiUMfGc0Brg/github.com/trailblazer/reform

  5. Jan 2021
  6. Dec 2020
    1. Governed under a Temporary Benevolent Dictatorship (TBD)

      first sighting: Temporary Benevolent Dictatorship

    1. My use case is a masonry component that should split up its children into several columns.

      "masonry component"

  7. Nov 2020
    1. But then, I still want to upgrade my dependencies from time to time, in a painless way. I recommend checking Renovate which handles JavaScript and Ruby dependencies auto updating. Use it.
  8. Oct 2020
    1. first sighting: use of superscripts like this

      I like it. Nice and concise and understandable.

      • s¹  critical
      • s²  important
      • s³  nice to have
      • s⁴  low
      • s⁵  inconvenient

      But in other cases, the abbreviation is quite unclear and ambiguity:

      Like, what does "pr" mean in these cases?

      priority? Doubt it.

      • pr¹  chore
      • pr²  docs
      • pr³  feature
      • pr⁴  fix
      • pr⁵  performance
      • pr⁶  refactor
      • pr⁷  style

      Pull Request? Doubt it. But maybe?


      For axes that are quantifiable, like severity, using a number makes sense. But what benefit is there in including a number in these (platform?) labels?:

      • p¹ ⋅ browser
      • p² ⋅ linux
      • p³ ⋅ mac
      • p⁴ ⋅ windows

      I think this would have been better and clearer (in that fewer people would be like huh? and wonder what it means):

      • platform: browser
      • platform: linux
      • platform: mac
      • platform: windows
    1. We could freeze the objects in the model but don't for efficiency. (The benefits of an immutable-equivalent data structure will be documented in vtree or blog post at some point)

      first sighting: "immutable-equivalent data"

  9. Sep 2020
    1. Another problem I ran into was knowing when an element is removed. I had to add a MutationObserver on the current tooltip target so if it gets removed by Svelte while the tooltip is visible (e.g. if a click moves to another route) the tooltip isn't left hanging around on the screen. No mouseleave/mouseout events are dispatched on elements that are removed.

      First sighting: MutationObserver

    1. I think Rich is more interested in pushing for a HTMLx community spec
    2. that feels a lot like directives in Marko: https://markojs.com/docs/syntax/#directives. While Marko did bring some interesting ideas to the table, I find Svelte's approach to be more concise and easier to reason about.
    1. In particular, this takes a different approach from CSS Shadow Parts, which allows a component consumer to target selected elements, but to then apply arbitrary styles to those elements.
    2. display: contents essentially removes the wrapper element from the DOM, but allows it to set inheritable styles including custom properties.
  10. Aug 2020
  11. Jul 2020
    1. The hands-down best Computer Science class I took at NYU was Heuristics with Dennis Shasha in which we learned algorithms for approximating solutions to NP-hard problems and applied them to compete in automated 2-player competitive battles including a gravitation Voronoi game.
  12. May 2020
  13. Apr 2020
    1. Finally, from a practical point of view, we suggest the adoption of "privacy label," food-like notices, that provide the required information in an easily understandable manner, making the privacy policies easier to read.
  14. Mar 2020
    1. First sighting: "No Extra Customs Fees" rather than the typical vague wording "EU-friendly". This wording is clearer, non-gimmicky, and better. Applause!

    1. On top of standard Markdown blockquotes, which require prepending > to quoted lines, GFM supports multiline blockquotes fenced by >>>:

      First sighting of this >>>. I like it! It's always a pain to paste in a quote and then have to manually prefix every line with >, esp. if there are many lines.

      I also like that it very nicely parallels the multilne code block delimeter syntax.

  15. Jan 2020
    1. I've often wished for some standard variable to use for blocks and such. Like some people here, I had considered it. Usually I use _ but I know that means "unused" to many/most programmers. I like the % option that Clojure has.

  16. Dec 2019