65 Matching Annotations
  1. Sep 2024
    1. Fields and nested forms are filling in order of their definition. But sometimes you want to change this order, for example, if you have a nested forms in ancestors which depends on data in children forms. For such cases you can use :depends_on option, which accepts fields and nested forms names as Symbol or Array of symbols. They will be filled (and initialized) before dependent.
  2. Jun 2024
    1. military power and Technology progress have been tightly linked historically and with extraordinarily rapid technological 00:34:11 progress will come military revolutions

      for - progress trap - AI and even more powerful weapons of destruction

      progress trap - AI and even more powerful weapons of destruction - The podcaster's excitement seems to overshadow any concern of the tragic unintended consequences of weapons even more powerful than nuclear warheads. - With human base emotions still stuck in the past and our species continued reliance on violence to solve problems, more powerful weapons is not the solution, - indeed, they only make the problem worse - Here is where Ronald Wright's quote is so apt: - We humans are running modern software on 50,000 year old hardware systems - Our cultural evolution, of which AI is a part of, is happening so quickly, that - it is racing ahead of our biological evolution - We aren't able to adapt fast enough for the rapid cultural changes that AI is going to create, and it may very well destroy us

  3. May 2024
  4. Dec 2023
    1. the third is as a psychological uh a psychological perspective on on what hope needs to be in order to give us a sense of agency 00:25:20 and powerful motivation to persevere through difficult times so those three components i mean frankly they're a reflection of my own kind of hope
      • for: powerful hope - description

      • description - powerful hope

        • psychological view of what hope needs to be in order to motivate agency
  5. Nov 2023
    1. The result is a toolkit so powerful that it allows a single individual to create modern applications upon which they can build a competitive business. The way it used to be.
    1. The url_for helpers now support a new option called path_params. This is very useful in situations where you only want to add a required param that is part of the route's URL but for other route not append an extraneous query param.
  6. Oct 2023
    1. I'd argue that when you find a programming language devoid of danger, you've found one that's not very useful.
    2. The reason eval is there is because when you need it, when you really need it, there are no substitutes. There's only so much you can do with creative method dispatching, after all, and at some point you need to execute arbitrary code.
  7. Feb 2023
    1. I am Joaquín,who bleeds in many ways.The altars of Moctezuma                I stained a bloody red.        My back of Indian slavery                Was stripped crimson        from the whips of masters        who would lose their blood so pure        when revolution made them pay,standing against the walls of Retribution.

      I believe Rodolfo Gonzales uses this powerful imagery of a Native American back bloodied from the whips of imperialist masters to show how strong and unbreakable his people are. They stand free today after having endured centuries of abuse and mistreatment.

  8. Dec 2022
    1. Unlike numbers or facts, stories can trigger an emotional response, harnessing the power of motivation, imagination, and personal values, which drive the most powerful and permanent forms of social change.

      !- reason for : storytelling -storytelling can trigger emotion responses - triggers our imagination and personal values - leading to the most powerful forms of social change

  9. Jul 2022
    1. Process Substitution is something everyone should be using regularly! It is super useful. I do something like vimdiff <(grep WARN log.1 | sort | uniq) <(grep WARN log.2 | sort | uniq) every day.

      underused

  10. Jan 2022
    1. It's worth noting that an error can coexist and be returned in a successful request alongside data. This is because in GraphQL a query can have partially failed but still contain some data. In that case CombinedError will be passed to us with graphQLErrors, while data may still be set.
  11. Nov 2021
  12. Sep 2021
    1. Airtable evolves with you and your team, so you can build a solution with increasing sophistication and capability.
  13. Aug 2021
    1. We focus so much on black magic and avoiding it that we rarely have a chance to enjoy any of the benefits. When used responsibly and when necessary, it gives a lot of power and expressiveness.
  14. May 2021
    1. This allows you to modify response headers or bodies, or bypass SvelteKit entirely
    1. This allows you to have any sort of object as a prop (e.g. you could dynamically import a component inside load and use it with <svelte:component>).
  15. Apr 2021
  16. Mar 2021
    1. Or if you need to change the way the string is assembled, you can provide a proc, for example: if defined?(BetterErrors) BetterErrors.editor = proc { |file, line| "vscode://file/%{file}:%{line}" % { file: URI.encode_www_form_component(file), line: line } } end
  17. Feb 2021
    1. For branching out a separate path in an activity, use the Path() macro. It’s a convenient, simple way to declare alternative routes

      Seems like this would be a very common need: once you switch to a custom failure track, you want it to stay on that track until the end!!!

      The problem is that in a Railway, everything automatically has 2 outputs. But we really only need one (which is exactly what Path gives us). And you end up fighting the defaults when there are the automatic 2 outputs, because you have to remember to explicitly/verbosely redirect all of those outputs or they may end up going somewhere you don't want them to go.

      The default behavior of everything going to the next defined step is not helpful for doing that, and in fact is quite frustrating because you don't want unrelated steps to accidentally end up on one of the tasks in your custom failure track.

      And you can't use fail for custom-track steps becase that breaks magnetic_to for some reason.

      I was finding myself very in need of something like this, and was about to write my own DSL, but then I discovered this. I still think it needs a better DSL than this, but at least they provided a way to do this. Much needed.

      For this example, I might write something like this:

      step :decide_type, Output(Activity::Left, :credit_card) => Track(:with_credit_card)
      
      # Create the track, which would automatically create an implicit End with the same id.
      Track(:with_credit_card) do
          step :authorize
          step :charge
      end
      

      I guess that's not much different than theirs. Main improvement is it avoids ugly need to specify end_id/end_task.

      But that wouldn't actually be enough either in this example, because you would actually want to have a failure track there and a path doesn't have one ... so it sounds like Subprocess and a new self-contained ProcessCreditCard Railway would be the best solution for this particular example... Subprocess is the ultimate in flexibility and gives us all the flexibility we need)


      But what if you had a path that you needed to direct to from 2 different tasks' outputs?

      Example: I came up with this, but it takes a lot of effort to keep my custom path/track hidden/"isolated" and prevent other tasks from automatically/implicitly going into those steps:

      class Example::ValidationErrorTrack < Trailblazer::Activity::Railway
        step :validate_model, Output(:failure) => Track(:validation_error)
        step :save,           Output(:failure) => Track(:validation_error)
      
        # Can't use fail here or the magnetic_to won't work and  Track(:validation_error) won't work
        step :log_validation_error, magnetic_to: :validation_error,
          Output(:success) => End(:validation_error), 
          Output(:failure) => End(:validation_error) 
      end
      
      puts Trailblazer::Developer.render o
      Reloading...
      
      #<Start/:default>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model>
       {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=save>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=save>
       {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Right} => #<End/:success>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Left} => #<End/:validation_error>
       {Trailblazer::Activity::Right} => #<End/:validation_error>
      #<End/:success>
      
      #<End/:validation_error>
      
      #<End/:failure>
      

      Now attempt to do it with Path... Does the Path() have an ID we can reference? Or maybe we just keep a reference to the object and use it directly in 2 different places?

      class Example::ValidationErrorTrack::VPathHelper1 < Trailblazer::Activity::Railway
         validation_error_path = Path(end_id: "End.validation_error", end_task: End(:validation_error)) do
          step :log_validation_error
        end
        step :validate_model, Output(:failure) => validation_error_path
        step :save,           Output(:failure) => validation_error_path
      end
      
      o=Example::ValidationErrorTrack::VPathHelper1; puts Trailblazer::Developer.render o
      Reloading...
      
      #<Start/:default>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model>
       {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=save>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Right} => #<End/:validation_error>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=save>
       {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Right} => #<End/:success>
      #<End/:success>
      
      #<End/:validation_error>
      
      #<End/:failure>
      

      It's just too bad that:

      • there's not a Railway helper in case you want multiple outputs, though we could probably create one pretty easily using Path as our template
      • we can't "inline" a separate Railway acitivity (Subprocess "nests" it rather than "inlines")
    1. Six lines of code create an executable object that, when invoked, will run your code in the order as visible in our diagram, plus the ability to “error out” when something goes wrong.
    1. If you have value objects or you would like to build one object from another, you can use the converter option. It is only called if the value provided is not an instance of the class or one of its subclasses.
    2. Lambda defaults are evaluated in the context of the interaction, so you can use the values of other inputs in them.
    3. hash :with_defaults, default: {} do boolean :likes_cookies, default: true end
    1. With Grid and generated content, we can add a line either side of our heading without adding any additional markup. The line will grow and shrink according to available space
    1. When you generate before- and after-content pseudo-elements, Grid treats them as actual elements and makes them grid items.
    2. The 1 / -1 means “go from the first grid line to the last grid line of the explicit grid”, regardless of how many grid lines there might be. It’s a handy pattern to use in any situation where you have a grid item meant to stretch from edge to edge of a grid.
  18. Jan 2021
    1. While custom iterators are a useful tool, their creation requires careful programming due to the need to explicitly maintain their internal state. Generator functions provide a powerful alternative: they allow you to define an iterative algorithm by writing a single function whose execution is not continuous. Generator functions are written using the function* syntax.
  19. atomiks.github.io atomiks.github.io
    1. Can I use the title attribute?Yes. The content prop can be a function that receives the reference element as an argument and returns a string or element.tippy('button', { content(reference) { const title = reference.getAttribute('title'); reference.removeAttribute('title'); return title; }, });The title attribute should be removed once you have its content so the browser's default tooltip isn't displayed along with the tippy.
    1. Headless: With React's DOM rendering for improved usage with CSS-in-JS and spring libraries. If you want greater control over your poppers to integrate fully with design systems, this is for you.
  20. Dec 2020
  21. Nov 2020
    1. Service Workers are very powerful. They allow offline functionality, push notifications, content caching, and more. They have a short lifetime, and the way they work is by waking up when they get an event (e.g., network requests, push notifications, connectivity changes) and then they start running only as long as the process needs it.
  22. Oct 2020
    1. (../)#.git(:h) # relative path to containing directory, eg. '../../..', '.' (../)#.git(:a) # absolute path to actual file, eg. '/home/you/src/prj1/.git' (../)#.git(:a:h) # absolute path to containing directory, eg. '/home/you/src/prj1'
    1. The needs: keyword enables executing jobs out-of-order, allowing you to implement a directed acyclic graph in your .gitlab-ci.yml. This lets you run some jobs without waiting for other ones, disregarding stage ordering so you can have multiple stages running concurrently.
  23. mdxjs.com mdxjs.com
    1. Powerful: MDX blends markdown and JSX syntax to fit perfectly in JSX-based projects.
    1. IMO svelte does have a responsibility to teach/demo the basics of "functional javascript" probably as a docs/tutorial/demos chapter on "the power of javascript expressions"
    1. If you return an object, then it is possible to resolve an import to a different id while excluding it from the bundle at the same time. This allows you to replace dependencies with external dependencies without the need for the user to mark them as "external" manually via the external option
    2. Defines a custom resolver.
  24. Sep 2020
    1. I think Svelte's approach where it replaces component instances with the component markup is vastly superior to Angular and the other frameworks. It gives the developer more control over what the DOM structure looks like at runtime—which means better performance and fewer CSS headaches, and also allows the developer to create very powerful recursive components.
    2. They don't need to add a prop for every action. The action itself can be passed in as a prop. <script> export let action; </script> <div use:action>whatever</div> The argument for the action can be another prop or can be part of the same prop.
    1. await schema.validateAt('foo[0].bar', rootValue); // => ValidationError: must be a string await schema.validateAt('foo[1].bar', rootValue); // => '1'
  25. May 2020
    1. All of the features of NLS were in support of Engelbart's goal of augmenting collective knowledge work and therefore focused on making the user more powerful, not simply on making the system easier to use.
    1. Conditional Per-Request Settings For additional flexibility, the directives provided by mod_setenvif allow environment variables to be set on a per-request basis, conditional on characteristics of particular requests. For example, a variable could be set only when a specific browser (User-Agent) is making a request, or only when a specific Referer [sic] header is found. Even more flexibility is available through the mod_rewrite's RewriteRule which uses the [E=...] option to set environment variables.
  26. Jan 2020
    1. However forget the "one-liner" idea once you start using sed's micro-commands. It is useful to lay it out like a structured program until you get the feel of it... It is surprisingly simple, and equally unusual. You could think of it as the "assembler language" of text editing.
  27. Jan 2019
    1. power

      This claim is articulated pretty strongly in Gorgias's Encomium of Helen. The piece is a kind of thought experiment where Gorgias attempts to defend Helen. He points out that language (or speech) is "a powerful lord, which by means of the finest and most invisible body effects the divinest works: it can stop fear and banish grief and create joy and nature pity" (sec. 8). Part of his defense, then, is that Helen almost didn't have a choice; the speech was too powerful, god-like even. I found a .pdf copy of it here: http://myweb.fsu.edu/jjm09f/RhetoricSpring2012/Gorgias%20Encomium%20of%20Helen.pdf

    1. power

      This claim is articulated pretty strongly in Gorgias's Encomium of Helen. The piece is a kind of thought experiment where Gorgias attempts to defend Helen. He points out that language (or speech) is "a powerful lord, which by means of the finest and most invisible body effects the divinest works: it can stop fear and banish grief and create joy and nature pity" (sec. 8). Part of his defense, then, is that Helen almost didn't have a choice; the speech was too powerful, god-like even. I found a .pdf copy of it here: http://myweb.fsu.edu/jjm09f/RhetoricSpring2012/Gorgias%20Encomium%20of%20Helen.pdf

  28. Jul 2017
  29. Mar 2017
    1. speech is prior to and somehow superior to writing

      No matter how well written a document is, one powerful speech can move thousands in a single day while a document can only reach a few at a time.

      Not to mention the amount of illiterate people that were around when rhetoric came about.

    1. i!.course to exercise power. T

      We all know they immense power that discourse can hold, regardless of where the original knowledge came from, the appropriate discourse can light a match that starts a fire.