10,000 Matching Annotations
  1. Mar 2021
    1. I used this in the console to find the file and the line of the error (took it from this answer): JS_PATH = "app/assets/javascripts/**/*.js"; Dir[JS_PATH].each do |file_name| puts "\n#{file_name}" puts Uglifier.compile(File.read(file_name)) end

      Didn't work for me because it was actually a .coffee file.

      So I tried something similar with this:

      main > Dir["*/assets/javascripts/**/*.coffee"].each { |file_name| puts "\n#{file_name}"; Sprockets::CoffeeScriptProcessor.(filename: file_name, data: File.read(file_name), cache: {}); }
      
      app/assets/javascripts/bootstrapped.js.coffee
      NoMethodError: undefined method `config' for nil:NilClass
      from /home/tyler/.gem/ruby/2.7.1/gems/sprockets-4.0.2/lib/sprockets/source_map_utils.rb:40:in `format_source_map'
      

      but it wasn't as trivial to provide the necessary environment that Sprockets wants.

      But that's okay, when better_errors paused on the exception, I just jumped to the

      block in Sprockets::CoffeeScriptProcessor.call
      sprockets (4.0.2) lib/sprockets/coffee_script_processor.rb, line 24
      

      frame and evaluated

      input[:filename]
      

      to figure out which file had failed.

      Obviously this information should be part of the error message itself though!!

  2. afarkas.github.io afarkas.github.io
    1. Webshim is also more than a polyfill, it has become a UI component and widget library. Webshim enables a developer to also enhance HTML5 capable browsers with more highly customizable, extensible and flexible UI components and widgets.

      And now that it's deprecated (presumably due to no longer needing these polyfills), not only do the polyfills go away (no longer maintained), but also these unrelated "extras" that some of us may have been depending on are now going away with no replacement ...

      If those were in a separate package, then there would have been some chance of the "extras" package being updated to work without the base webshims polyfills.

      In particular, I was using $.webshims.addCustomValidityRule which adds something that you can't do in plain HTML5 (that I can tell), so it isn't a polyfill...

    1. We’re doing our part to be more transparent and get data into the hands of patients quicker. Starting October 25, 2020, we’ll be releasing test results, visit notes and summaries immediately. Your provider may take up to three to five days to review your results and contact you to discuss abnormal results. Learn more here.

      Links to: https://www.federalregister.gov/documents/2020/05/01/2020-07419/21st-century-cures-act-interoperability-information-blocking-and-the-onc-health-it-certification

  3. boardgamegeek.com boardgamegeek.com
    1. We often are too busy. We spend our days occupied by a multitude of worries. One day, I realized that my time left in this life was getting shorter and shorter. For the first time, I felt regret and wondered, “Where did my time go?”
    1. // A general key transform method. Pass it a function that accepts the old key and returns // the new key. // // @example // obj = transformKeys(obj, (key) => ( // key.replace(/\b(big)\b/g, 'little') // )) export function transformKeys(source, f) { return Object.entries(source).reduce((o, [key, value]) => { o[f(key) || key] = value return o }, {}) } // Provide an object that maps from old key to new key export function rekeyObject(source, keyMap) { transformKeys(source, key => keyMap[key]) }

      Inspired by: https://hyp.is/zmkwioCVEeugtheDFcLEkw/stackoverflow.com/questions/8747561/is-there-any-way-to-rename-js-object-keys-using-underscore-js

    1. In production, you will never trigger one specific callback or a particular validation, only. Your application will run all code required to create a Song object, for instance. In Trailblazer, this means running the Song::Create operation, and testing that very operation with all its side-effects.
    2. Run the complete unit with a certain input set, and test the side-effects. This differs to the Rails Way™ testing style, where smaller units of code, such as a specific validation or a callback, are tested in complete isolation. While that might look tempting and clean, it will create a test environment that is not identical to what happens in production.
    1. If you want to try playing to see how these pieces work in the game, you can playtest it on the Iishogi.org site (https://lishogi.org/).  Last year the Iishogi designer asked me to register the Design SHOGI pieces on their site.  This Iishogi.org is a free to play Shogi website.  I was willing to give them permission to use them.  You are free to play and switch pieces design from the piece variation section.  If you register your ID, then you can play vs the A.I. easily.  You can learn how the Design SHOGI pieces work there.
    1. You may communicate more than a binary outcome of an activity. For instance, a controller endpoint activity could have end events for success and failure, but also for “not authorized”, or “validation failed”. You’re not limited to a binary setup here.
    2. Having a closer look, you will see that putting “create user” on the failure track probably isn’t such a great idea, as it will also get invoked when #validate errors-out. It’s a good idea to introduce a new, separate path for handling new users.
    3. Instead of connecting an output to a particular task, you can also choose to let it connect to a track. A track is created by taking a task’s output, retrieving its semantic, and then connecting it to the next available task that is “magnetic to” this semantic.

    Tags

    Annotators

    URL

    1. Note that the :task option for step configures this element as a low-level circuit interface, or in other words, it will skip the wrapping with the task interface.

      This bit me because I didn't realize that. Was getting error:

      TypeError: no implicit conversion of Symbol into Integer
      

      Finally checked ctx and found it was an array...

      At least this is documented here.

    1. Our new feature, Total Cookie Protection, works by maintaining a separate “cookie jar” for each website you visit. Any time a website, or third-party content embedded in a website, deposits a cookie in your browser, that cookie is confined to the cookie jar assigned to that website, such that it is not allowed to be shared with any other website.
    1. 2021年の旧正月セールで買いました。まだすべてのステージをクリアしてはいないのですが、30分ほど遊んだところで良いところ・悪いところが見えてきたのでひとまず日本人がレビュー一番乗りです。良いところ・グラフィックは無機質ですが悪くないと思います・音楽も自己主張しすぎず、アクションを盛り上げる感じで悪くはないです気になるところ・WASDで動けるのですが動きが半端にバイオハザードみたいなラジコン操作感があり、ちょっと気に食わないですただ、これは個人の感想の範疇ですね・ジャンプの性能は低く、距離ぎりぎりを要求されます。これは慣れですね悪いところ・ウォールランや動く壁といったギミックがありますが、これらの調整がとにかくできていません。特に斜め移動などでは自動で高度の調整が入るのですが、始点で普通につかまっているのに終点で床の下に潜り込んだり、果ては床のない場所にズレたりします。パルクール的なゲーム性を損ない、ものすごいストレスとなります。以上です。パルクールアクション的なものを期待して購入し、実際予想通りのゲーム性でした。しかし残念ですが自分にとっては上記の悪いところがとにかくストレスとして感じられます。買った以上はクリアまでは進めたいですが、他人におすすめはできません。

      I bought it at the 2021 Chinese New Year sale. I haven't cleared all the stages yet, but after playing for about 30 minutes, I could see the good and bad points, so for the time being, the Japanese are the first to review.

      Good point ・ The graphics are inorganic, but I don't think they are bad. ・ The music is not too self-assertive, and it's not bad because it makes the action exciting.

      Where to worry ・ I can move with WASD, but the movement is odd and there is a feeling of radio control operation like biohazard, so I do not like it a little. However, this is a category of personal impressions. ・ Jump performance is low, and it is required to be close to the distance. This is familiar

      bad place -There are gimmicks such as wall runs and moving walls, but these adjustments have not been made anyway. Especially when moving diagonally, the altitude is automatically adjusted, but even though it is normally held at the start point, it may slip under the floor at the end point, or it may shift to a place without a floor. It spoils the parkour-like gameplay and causes tremendous stress.

      that's all. I bought it in anticipation of something like parkour action, and the game was actually as expected. But unfortunately, the above bad points are stressful to me anyway. As long as I bought it, I would like to proceed to clear it, but I cannot recommend it to others.

  4. Feb 2021
    1. [0.4] Controls & Training & Help[0.2] Menu & Settings[0.2] Sound & Music[0.1] Graphics[0.2] Game Design[0.3] Game Story[0.2] Game Content[0.4] Time to complete feels ok? (& if the Game can be repeatedly played again)[0] is it Enjoyable & Fun?[0] Could it hold a spot in Favorites?[0] BONUS point: Multi-Player related[0] BONUS point: Review for VR
    1. Do you have collaborators who could have generated keys and sold them on their own? DIG's Steam keys and other stores' Steam keys must have some source, after all. Keys don't generate themselves, and only your accounts should be able to request them.This particular game was in Bunch Keys Indie Wizardry Bundle. I assume you had a proper contract for that. Maybe DIG or an intermediary bought 50-200 copies of it?
    2. It isn't stealing because you or an associate must have generated and given them the keys in some way or another?Ideally you would ask a DIG bundle buyer to show you their key for your game, so you can figure out what key request batch it came from, and then you can scratch your head and wonder who you gave those keys to and what journey they took afterwards.
    1. For instance, when faced with a 60% off, 12 hour only coupon that reduces a $1,200 winter coat to $400, you can’t help but rush to the store to buy it, even if it is 95 degrees out. A few things are happening here. For one, the $1200 acts as an anchor price that psychologically forces you to realize you’re getting an enormous deal at the $400 price point. Plus, the promotion limiting the time the offer is available forces you into an impulse.
    2. So, where did J.C. Penney go wrong? Well, while we admire their attempt to change, they attempted to destroy over a century’s worth of price conditioning consumers have been through with department stores and pricing in general. They weren’t completely off base, as consumers with more and more access to information (comparison shopping engines, consumer reports, etc.), are beginning to realize that the value of products is determined much differently than a sticker would suggest. Yet, assuming that most soccer moms (and dads) wouldn’t fall prey to the colorful print ads tucked within the comics section in the Sunday paper, overlooks how much the majority of consumers value “winning” the retail game. Simply, deflating the perceived value causes customers to value the actual product less.
    3. Almost no one ever pays full price. In fact, studies show that people are much more inclined to pay $25 for an item valued at $50, than paying for the same item without a sale at $25. It’s all about the “price framing” of a product that creates a perceived value, which all leads to the excitement of getting a good deal
    1. Apologies: it's hyperbole. The parent site has a bunch of "spend x to get one of y Steam games" deals, which is what I was referring to. it was not meant literally. Just an attempt to build common ground with the poster who was talking about gambling and fomo.I thought they were referencing the larger site, so I wanted to acknowledge that so I didn't come off as dismissive of their concerns.Which turned out to be entirely separate concerns! Obviating the reason for the comment in the first place.Anyway, sorry for the short novel. But that's the danger of pithy one-liners: assumed context for the poster can be entirely lost in translation.Thanks for coming to my public apology press release?
    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. To understand this helper, you should understand that every step invocation calls Output() for you behind the scenes. The following DSL use is identical to the one [above]. class Execute < Trailblazer::Activity::Railway step :find_provider, Output(Trailblazer::Activity::Left, :failure) => Track(:failure), Output(Trailblazer::Activity::Right, :success) => Track(:success)
    2. In combination with [Track()], the :magnetic_to option allows for a neat way to spawn custom tracks outside of the conventional Railway or FastTrack schema.

      Instead of magnetic_to:, I propose wrapping the steps that are on a separate track in something like...

        DefTrack do :paypal do
          step :charge_paypal
        end
      

      or

        paypal_track = RailwayTrack do :paypal do
          step :charge_paypal
        end
      

      so we can reference it from outputs, like we can with tracks created with Path helper.

    3. 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")
    4. class Charge < Trailblazer::Activity::Path # ... step :validate step :decide_type, Output(Activity::Left, :credit_card) => Path(end_id: "End.cc", end_task: End(:with_cc)) do step :authorize step :charge end step :direct_debit end

      if you want to copy and paste to console:

      module Trailblazer
      class Charge < Trailblazer::Activity::Path
        # ...
        step :validate
        step :decide_type, Output(Activity::Left, :credit_card) => Path(end_id: "End.cc", end_task: End(:with_cc)) do
          step :authorize
          step :charge
        end
        step :direct_debit
      end
      end
      
      puts Trailblazer::Developer.render a
      
      #<Start/:default>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=decide_type>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=decide_type>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=direct_debit>
       {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=authorize>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=authorize>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=charge>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=charge>
       {Trailblazer::Activity::Right} => #<End/:with_cc>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=direct_debit>
       {Trailblazer::Activity::Right} => #<End/:success>
      #<End/:success>
      
    5. step :direct_debit

      I don't think we would/should really want to make this the "success" (Right) path and :credit_card be the "failure" (Left) track.

      Maybe it's okay to repurpose Left and Right for something other than failure/success ... but only if we can actually change the default semantic of those signals/outputs. Is that possible? Maybe there's a way to override or delete the default outputs?

    6. Defaults names are given to steps without the :id options, but these might be awkward sometimes.

      Why would those default names ever be awkward?

      If you the default name is whatever comes after step:

      step :default_name
      

      then why can't you just change that name to whatever you want?

      To answer my own question: I think you can do that, as long as the name is the 1st argument to step. But below I noticed an example where a Subprocess was the 1st argument instead, and so it needs a name in this case:

      step Subprocess(DeleteAssets), id: :delete_assets
      

      Why are they inconsistent about calling it name or id? Which one is it? I guess it's an id since that's what the key is called, and since there's an Id() helper to reference a task by its id.

    1. The sole purpose to add Dev::Trace::Inspector module is to make custom inspection possible and efficient while tracing. For example, ActiveRecord::Relation#inspect makes additional queries to fetch top 10 records and generate the output everytime. To avoid this, Inspector will not call inspect method when it finds such objects (deeply nested anywhere). Instead, it’ll call AR::Relation#to_sql to get plain SQL query which doesn’t make additional queries and is better to understand in tracing output.
    1. I think one thing would have been a solution to basically everything here: Player created maps. As Im involved in many modding communities, I know for a fact that player created content can be vital in making games last so much longer, and the quality can shoot for the stars, Player created maps would have been fantastic for this game.