810 Matching Annotations
  1. Jul 2022
    1. instead of inlining the images, the image URL’s (and captions) are read from a .yaml file. The URL of the yaml file is passed as an argument when loading the page. The .yaml file as well as the images should be publicly served.
    1. It really only takes one head scratching issue to suck up all the time it saves you over a year, and in my experience these head scratchers happen much more often than once a year. So in that sense it's not worth it, and the first time I run into an issue with it, I disable it completely.
    1. Stop autoclosing of PRs While the idea of cleaning up the the PRs list by nudging reviewers with the stale message and closing PRs that didn't got a review in time cloud work for the maintainers, in practice it discourages contributors to submit contributions. Keeping PRs open and not providing feedback also doesn't help with contributors motivation, so while I'm disabling this feature of the bot we still need to come up with a process that will help us to keep the number of PRs in check, but celebrate the work contributors already did instead of ignoring it, or dismissing in the form of a "stale" alerts, and automatically closing PRs.

      Yes!! Thank you!!

      typo: cloud work -> could work

    1. I don't understand why it should be so hard to keep issues open / reopen them. That's just going to cause people to open a duplicate issue/PR — or (if they notice in time) cause people to add extra "not stale" noise when the bot warns it's about to be closed. Wouldn't it be preferable to keep the discussion together in one place instead of spreading across duplicate issues? (Similarly, moving the meta conversation about an issue out to a completely separate system (Discord) seems like the wrong direction, because it wouldn't be visible to/discoverable by those arriving at the closed issue.) I get how it's useful to have stale issues not cluttering the list. But if interes/activity later picks up again, then "stale" is no longer accurate and its status should be automatically updated to reflect its newfound freshness... like it did back here:
  2. Jun 2022
    1. Now all I had learned on my travelsFell into a new kind of placeEven maths and hard sciencesNo longer at oddsWith Art or HumanityBut serving to showA side of the storyInsufficient to stand on its own

      The great Zen teacher Daisetz Suzuki said upon his Satori experience: "The elbow does not bend backwards".

  3. May 2022
    1. "I didn't fully understand it at the time, but throughout my time as a freshman at Boston College I've realized that I have the power to alter myself for the better and broaden my perspective on life. For most of my high school experience, I was holding to antiquated thoughts that had an impact on the majority of my daily interactions. Throughout my life, growing up as a single child has affected the way am in social interactions. This was evident in high school class discussions, as I did not yet have the confidence to be talkative and participate even up until the spring term of my senior year."

    2. "Specifically, when one of my classmates stated how he was struggling with the concept and another one of my classmates took the initiative to clarify it, I realized that that individual possibilities vary greatly among students."

    3. "The need to engage with people in terms of evaluating them for the aim of acquiring a different point of view was one occasion this semester where the knowledge I received in class positively changed the way I approached an issue. I was patient enough to explore other perspectives, some of which disagreed with mine, so that I might learn about their opinions without bias or prejudice."

    1. build a browser that comes pre-installed with node.js

      Nah. Just stop programming directly against NodeJS to start with!

      The Web platform is a multi-vendor standardized effort involving broad agreement to implement a set of common interfaces. NodeJS is a single implementation of a set of APIs that seemed good (to the NodeJS developers) at the time, and that could change whenever the NodeJS project decides it makes sense to.

      (Projects like WebRun which try to provide a shim to let people continue to program against NodeJS's APIs but run the result in the browser is a fool's errand. Incredibly tempting, but definitely the wrong way to go about tackling the problem.)

  4. Apr 2022
    1. The DICER1 syndrome is an autosomal dominant tumor‐predisposi-tion disorder associated with pleuropulmonary blastoma, a rare pediatric lung cancer

      GeneName:DICER1 PMID (PubMed ID): PMCID: PMC6418698 PMID: 30672147 HGNCID: NOT LISTED<br /> Inheritance Pattern: Autosomal Dominant Disease Entity: Cancer; benign and malignant tumors including pleuropulmonary blastoma, cystic nephroma, Sertoli-Leydig cell tumors, multinodular goiter, Thryoid cancer, rhabdomyosarcoma, and pineoblastoma. Mutation: Somatic missense variation Mutation type: missense Zygosity: None stated Variant: unregistered…. Family Information: Characterize germline variants in familial early-onset clorectal cancer patients; The observation of germline DICER1 variation with uterine corpus endometrial carcinoma merits additional investigation. CasePresentingHPOs: uterine and rectal cancers in germline mutation

  5. Mar 2022
    1. I believe this is partly due to a militant position on free software. Some advocates believe so strongly that users should be able to recompile their software that they force them to do so. They break libraries seemingly on purpose just to say, “Recompile! Oh you can’t? That’ll teach you to use binary software!” Of course users don’t want to recompile their software, but what users actually want is usually lost on GNOME developers.
    2. They claim that they deduplicate runtimes. I question how much can really be shared between different branches when everything is recompiled. How much has /usr changed between releases of Ubuntu? I would guess just about all of it.
    1. Note that this is a breaking API change in the libraries (more information in the README.md). It does not affect the backwards compatibility of the protocol itself.

      annotation meta: may need new tag: backwards compatibility of the protocol backwards compatibility for [libraries that use [it?]]

  6. Feb 2022
    1. Hence an email address/mailbox/addr-spec is "local-part@domain"; "local-part" is composed of one or more of 'word' and periods; "word" can be an "atom" which can include anything except "specials", control characters or blank/space; and specials (the *only* printable ASCII characters [other than space, if you call space "printable"] *excluded* from being a valid "local-part") are: ()<>@,;:\".[] Therefore by the official standard for email on the internet, the plus sign is as much a legal character in the local-part of an email address as "a" or "_" or "-" or most any other symbol you see on the main part of a standard keyboard.
    2. "+" is a completely valid character in an email address; as defined by the internet messaging standard published in 1982(!) RFC 822 (page 8 & 9)... Any website claiming anything else is wrong by definition, plus they are prohibiting me and many fellow anti-spam activists from tracking where inbound spam comes from:
    1. I used Publii for my blog, but it was very constraining in terms of its styling

      This is a common enough feeling (not about Publii, specifically; just the general concern for flexibility and control in static site generators), but when you pull back and think in terms of normalcy and import, it's another example of how most of what you read on the internet is written by insane people.

      Almost no one submitting a paper for an assignment or to a conference cares about styling the way that the users of static site generators (or other web content publishing pipelines) do. Almost no one sending an email worries about that sort of thing, either. (The people sending emails who do care a lot about it are usually doing email campaigns, and not normal people carrying out normal correspondence.) No one publishing a comment in the thread here—or a comment or post to Reddit—cares about these things like this, nor does anyone care as much when they're posting on Facebook.

      Somehow, though, when it comes to personal Web sites, including blogs, it's MySpace all over again. Visual accoutrement gets pushed to the foreground, with emphasis on the form of expression itself, often with little relative care for the actual content (e.g. whether they're actually expressing anything interesting, or whether they're being held back from expressing something worthwhile by these meta-concerns that wouldn't even register if happening over a different medium).

      When it comes to the Web, most instances of concern for the visual aesthetic of one's own work are distractions. It might even be prudent to consider those concerns to be a trap.

    1. As the only way to find outif something is worth reading is by reading it (even just bits of it), itmakes sense to use the time spent in the best possible way. Weconstantly encounter interesting ideas along the way and only afraction of them are useful for the particular paper we started readingit for. Why let them go to waste? Make a note and add it to your slip-box. It improves it. Every idea adds to what can become a criticalmass that turns a mere collection of ideas into an idea-generator.

      Even if the paper or book you're reading doesn't answer the particular question you're researching, you're bound to come across other novel ideas and potential questions. Don't let these go to waste, but instead note them down and save them into your note taking system. They may be useful in the future, particularly if you found them interesting or intriguing.

      It turns out "waste not, want not" is applicable to ideas as well.


      I can't help but also thinking "waste note, want note" as an interesting turn of expression.

  7. Jan 2022
    1. That's like the example i wrote, and i think it's very ugly. It's annoying when frameworks are very elegant in demos and presentations but then that elegance disappear when you have to write real world code.
    1. Seems easy, right? How about the below code, what will it print? new Promise((_, reject) => reject(new Error('woops'))). catch(error => { console.log('caught', err.message); }); It'll print out an unhandled rejection warning. Notice that err is not defined!
  8. Dec 2021
  9. Nov 2021
    1. This is actively being worked on - for those interested you can follow the progress in https://github.com/snapcore/snapd/pull/10836
    2. Seeing how this has been treated for 4.5 years makes this seem like a pretty dysfunctional project. Please have mercy on your poor users and fix this.
    3. After 5 years there's still no fix. This is so annoying. I'm now getting rid of all snap packages and installing deb variants instead. Finally I'll purge snap and if these weird decisions keep on going I'll also move to another distro. Common Canonical. Seriously?
  10. Oct 2021
    1. that is not ideal, since for example 'Cookie' is a forbidden header name, so I have to start worrying about env in load, which is kind of contra to its design.
    1. Arguments for “it depends.”

      Exploratory research - descriptive -- light instrumentation Confirmatory study - use well structured Multiple case - standardization will help to cross compare.

      See Figure 2.7

  11. Sep 2021
    1. I find Alt + right-click + drag to be the most convenient way to do this.

      On PopOS, the default seems to be Super + right click drag

      Took me some research to try to figure it out though (because on the Ubuntu system I came from, it was Super + middle click drag). I wish it were a bit more discoverable.

    1. The classic SPA example is a to-do list. But, you know what? I don't like to-do lists. They make me think about all the things I have to do, many of which I don't want to do.So why don't we make a To-Don't List app? That way we can list all the things we're not going to do. Ever.
    1. From my point of view, this approach will help you to write cleaner code. Also, it will help to maintain the project. For instance, moving a file from the current directory to another will cause fewer problems, because every file uses an absolute path instead of a relative one. Last but not least, it helps you during development.
    1. Let's not get over-excited. Actually, we're only part-way there; you can compile this code with the TypeScript compiler.... But is that enough?I bundle my TypeScript with ts-loader and webpack. If I try and use my new exciting import statement above with my build system then disappointment is in my future. webpack will be all like "import whuuuuuuuut?"You see, webpack doesn't know what we told the TypeScript compiler in the tsconfig.json.
    1. I am not going to do Webpack support. I’ve been pretty lenient in the past and answered most Webpack support questions, but it takes a lot of my time that I could have spent on more important things. I will instead refer users to the Webpack support channels.
    1. ⚠ Node Sass does not work with Yarn PnP feature and doesn't support @use rule.
    1. The Rails server will also compile your assets if the dev server is not running, but this is much slower vs running separate processes and not recommended.
    1. But it is always important to remember that those are not language concepts. Those are community concepts that only exist in our heads and in the names of some library methods.

      I'm not sure about this. I get what he's saying and agree that singleton methods are nothing but a naming convention for the more fundamental/atomic construct called instance methods (which indeed are the only kind of method that exist in Ruby, depending how you look at it), but I think I would actually say that singleton methods are language concepts because those methods like Object#define_singleton_method, ... are always available in Ruby (without needing to require a standard library first, for example). In other words, I would argue that something belonging in the Ruby core "library" (?) by definition makes it part of the language -- even if it in turn builds on even lower-level Ruby language features/constructs.

    2. Note: when I wrote above that "there is no such thing as X", what I meant was that "there is no such thing as X in the Ruby language". That does not mean that those concepts don't exist in the Ruby community.
    3. The question is similar but its in a Rails context. The solutions would answer my question, but I'm almost certain that he could probably leverage Arel to solve his problem. The question I posted was designed purely as a Ruby question so that it was easier to search for. You might want to suggest an edit of the title of his question because it didn't show up when I searched for a solution to my problem.
    4. Yes, unfortunately the other question has a misleading and completely irrelevant Rails context and might be harder to find for some people. IMHO, it's still a perfect content duplicate, although not a topic one. Answers are also equal. Anyways, still a good question of yours.
  12. Aug 2021
    1. Always use the word ‘Africa’ or ‘Darkness’ or ‘Safari’ in your title.

      I love the style in which this is written. While it appears to be a "how-to" guide, the author is doing nothing more than addressing the stereotypes that surround Africa. Turning this piece into a " how NOT to " guide.

    1. historicalknowledge is foundational to beingable to understand ourselves as humans.

      Interesting! (Note: This does NOT count as an action.)

    2. In every case, Psychol-ogy as a modern scientific discipline producesknowledge that changes the individuals, soci-eties, and cultures in which it is embedded, andthese changes then feed back into psychologicaltheory and practice.

      Oh! I am interested in seeing how this unfolds throughout the semester. (Note: This does NOT count as an action.)

    1. “We need to find ways to meet our customers’ needs and ambitions of reducing emissions to remain relevant for them.

      Énergir can, and should, meet their customers' needs by helping them to end their use of gas and by accelerating a managed decapitalization of their existing gas assets. Énergir should "Pump Heat, Not Gas." By this I mean, they should refocus as a "thermal-utility," rather than as a gas-supplier and build a new business focused on the installation of heat pumps and the provision of geothermal district heating for their customers.

    1. 3. The no-keyword-arguments syntax (**nil) is introduced You can use **nil in a method definition to explicitly mark the method accepts no keyword arguments. Calling such methods with keyword arguments will result in an ArgumentError. (This is actually a new feature, not an incompatibility)
  13. Jul 2021
    1. Please note that the strategy: :build option must be passed to an explicit call to association, and cannot be used with implicit associations:
    1. Rails' inability to automatically route my link_to and form_for in STI subclasses to the superclass is a constant source of frustration to me. +1 for fixing this bug.

      I've had to work around this by doing record.as(BaseClass)

  14. Jun 2021
    1. Dependencies are hoisted, meaning they get installed in the root node_modules folder. This is done for performance reasons: if a dependency is shared by multiple packages, it gets saved only once in the root.
    1. Do not use aria-orientation attribute for standard list (i.e., role="list"), use component's vertical property to set the orientation to vertical.
    1. I don't think it is too clever. I think it solves the problem idiomatically. I.e., it uses reduce, which is exactly correct. Programmers should be encouraged to understand what is correct, why it is correct, and then propagate. For a trivial operation like average, true, one doesn't need to be "clever". But by understanding what "reduce" is for a trivial case, one can then start applying it to much more complex problems. upvote.
    1. Users who have installed it decided to trust me, and I'm not comfortable transferring that trust to someone else on their behalf. However, if you'd like to fork it, feel free.

      Interesting decision... Seems like the project could have been handed off to new maintainers instead of just a dead-end abandoned project and little chance of anyone using it for new projects now.

      Sure you can fork it, but without a clear indication of which of the many forks in the network graph to trust, I doubt few will take the (massively) extra time to evaluate all options and choose an existing fork as a "leader" (or create their own fork) to go with continuing maintenance...

  15. May 2021
    1. Preserving history; we often find ourselves using the git blame tool to discover why a certain change was made.
    2. Preserving commit hashes; we use commit hashes in binary names and our issue tracker; ideally, these references remain intact.
    1. Note that not all of the colors in SMUI read from CSS variables, so some parts will still use the colors defined in the original Sass compile.
    1. In the earlier example, I used “no-reply@” because this is, unfortunately, a common practice used by many email marketers. As a brand utilizing email, you should never expect a personal experience like email to ever be one-sided.
  16. Apr 2021
    1. There's nothing to stop you from doing initializer code in a file that lives in app/models. for example class MyClass def self.run_me_when_the_class_is_loaded end end MyClass.run_me_when_the_class_is_loaded MyClass.run_me... will run when the class is loaded .... which is what we want, right? Not sure if its the Rails way.... but its extremely straightforward, and does not depend on the shifting winds of Rails.

      does not depend on the shifting winds of Rails.

    1. The other papers found no correlations between clinical symptom improvement and changes in connectivity (Abbott et al., 2013; Li et al., 2013; Posner et al., 201

      No clinical change to Connectivity correlation

    1. (Ideally the run-time library would treat a pipe in the same way as a console, but it seems that most don't.)

      Often/usually treating a pipe/redirect differently is in fact what you want.

      Like if you output to a file, you don't necessarily want colors or real-time progress/status outputted along with it: you want just the bare data to be saved, which can then be filtered in useful ways with other standard tools like grep and sed.

    1. Dry humor is a delivery technique. As such, it shouldn't be confused with specific types of humor or with sarcasm. Sarcasm is delivered without humor because it's generally not funny but intended to mock or convey contempt. Dry humor pertains to something funny.
    1. Of course you must not use plain-text passwords and place them directly into scripts. You even must not use telnet protocol at all. And avoid ftp, too. I needn’t say why you should use ssh, instead, need I? And you also must not plug your fingers into 220 voltage AC-output. Telnet was chosen for examples as less harmless alternative, because it’s getting rare in real life, but it can show all basic functions of expect-like tools, even abilities to send passwords. BUT, you can use “Expect and Co” to do other things, I just show the direction.
    1. you're quite the lucky man. i finally got my wife to agree to play fjords with me last weekend and, after beating me pretty soundly in two straight games, she announced she didn't like the game. turns out she didn't like the puzzle/board-building aspect of the game, the lack of aggressive play ("it would have been better if i could have fire-bombed some of your land") nor all of the 'action' taking place in the last minute or two of the game.drats.
    2. It's the first time that my wife and I have played Fjords together. She's not a gamer but we've recently been playing a few more games and she's been willing to try a few Eurogames (e.g. Carcassonne) and some of the kosmos 2-player games (Jambo, Odin's Ravens, Balloon Cup, Lost Cities) that I've borrowed from friends which is great. I manage to get a hold of a copy of Fjords and we have a go.I tell her that it involves spatial awareness and planning ahead. I explain the rules to her (having only played it once or twice myself and won each time), and she's doing her best not to roll her eyes; there's a definite lack of enthusiasm there.
    1. Secondly, the difficulty ramps up very quickly - once I'd got a handle on things and started getting in to it, it threw me off that the Novice level 7 is just WAY TOO HARD - it's not a game centered on difficulty so it's not like that's an excuse, nor is this a later on level where you'd except difficulty, but having just 15 seconds to do that lap, that needs to be changed to 20 at least!
    1. Already Signed InThis session has ended because the account has been signed into from another browser window on 04/11/2021 04:30:09 PM. This happens when you sign in to your account on more than one browser screen. You can't be signed into your account on two or more browser windows at the same time. Just close your browser and sign back into your account.
    1. Is a lawn roller necessary? It is spring, and I imagine the soil in your yard is lumpy because of the frost that occurred in the previous months. This is why you think a lawn roller is necessary. Well, unless you’re maintaining a golf course, I wouldn’t recommend a lawn roller. It just isn’t necessary.
    2. In short, here’s why a lawn roller may not be necessary for your lawn: Using heavy rollers on the ground leads to soil compaction.Compacted soil causes slow root development and slower turfgrass growth.
    1. I can’t say Incredible Mandy is a bad game per se, but it is underwhelming and less than the sum of its parts
    2. nothing about the game is really offensive, but there’s just no hook that managed to keep me invested up to the end.
    1. this game is - well not exactly bad, but it also isn't a very good game of the genre - there are some riddles and puzzles that can give you quite the headache. I like hard puzzles, I like games where all isn't quite obvious - but I also like a barrier-free gaming experience.
    1. The Not So Good: The Dev/s seems to be in hiatus -- still waiting for the "coming soon" additional levels: Laser Land.
  17. Mar 2021
    1. Both Prof Wu and Ms Truong cited the 1875 Page Act, one of the earliest pieces of federal law restricting immigration to the US. On paper, the legislation barred the entry of any woman from China, Japan "or any Oriental country" for "lewd and immoral purposes", including prostitution.In reality, the law blocked virtually all immigration from Asian women, who were collectively presumed to be sex workers or prostitutes.This racist and sexist stereotype that they "were bringing their immorality to the US", Ms Truong explains, has lingered.

      le bruh moment.

    1. A general and intuitive description is that words in a semantic field are not necessarily synonymous, but are all used to talk about the same general phenomenon.
    1. Optimization in this case is nothing crazy, just something I neglected while designing the framework.
    2. With all this “monetization” happening around Trailblazer, we will also make sure that all free and paid parts of the project grow adult and maintan an LTS - or long-term support - status. Those are good news to all you users out there having been scared to use gems of this project, not knowing whether or not they’re being maintained, breaking code in the future or making your developers addicted to and then cutting off the supply chain. Trailblazer 2.1 onwards is LTS, and the last 1 ½ years of collaboration have proven that.
    1. However, since you haven't yet provided any details about how you built with Qt (Qt isn't officially supported, so you must have used a third party derivative of vim), and you haven't provided any detailed information about what error messages or malfunctions you're having with python-complete, it's not really possible to tell you how to fix the problem and get vim working with Qt.
    1. Sorry you’re surprised. Issues are filed at about a rate of 1 per day against GLib. Merge requests at a rate of about 1 per 2 days. Each issue or merge request takes a minimum of about 30 minutes (across at least 2 people) to analyse, put together a fix, test it, review it, fix it, review it and merge it. I’d estimate the average is closer to 3 hours than 30 minutes. Even at the fastest rate, it would take 3 working months to clear the backlog of ~1000 issues. I get a small proportion of my working time to spend on GLib (not full time).
    2. Age of a ticket is completely irrelevant as anyone can request anything but the number of developers is limited. If you'd like to see something implemented, please consider providing a patch. Thanks!
    1. We are just as in the dark as the customers. We clock in and look at a screen on a scanner and scan the stuff the systems tells us to pick for you. We have no clue how the website worked for you for that order, no clue about billing issues, nada. The system didnt want you to have that item that day. The only thing we can suggest is "try again later". or call 1800walmart and complain to a call taker to see if they can put in a complaint for you. We are peons and know not much more than if you walked in the backroom threw on a vest and did the work yourself. Were not privy to anything and the company doesnt tell us jack shit except how to do the immediate task in front of us until we clock out
    1. Dole Mandarin Oranges in Light Syrup, All Natural Fruit, Non-GMO, 15oz CanNot available for curbside
    1. This isn't to say that on a case by case basis there aren't modules that are grossly overcomplicated.
    2. "Functions Are Not Packages" - Well why not?
    3. I would much rather have a "cosine" module than a "trigonometry" module because chances are good I only need a small fraction of the utilities provided by the larger trig module.
    4. Small modules are extremely versatile and easy to compose together in an app with any number of other modules that suit your needs.
    5. Second, I don't agree that there are too many small modules. In fact, I wish every common function existed as its own module. Even the maintainers of utility libraries like Underscore and Lodash have realized the benefits of modularity and allowed you to install individual utilities from their library as separate modules. From where I sit that seems like a smart move. Why should I import the entirety of Underscore just to use one function? Instead I'd rather see more "function suites" where a bunch of utilities are all published separately but under a namespace or some kind of common name prefix to make them easier to find. The way Underscore and Lodash have approached this issue is perfect. It gives consumers of their packages options and flexibility while still letting people like Dave import the whole entire library if that's what they really want to do.
    1. every symbol in D3 4.0 now shares a flat namespace rather than the nested one of D3 3.x. For example, d3.scale.linear is now d3.scaleLinear, and d3.layout.treemap is now d3.treemap.
    1. I get asked a lot which I want to do more; design or write code? I answer, “yes.”
    2. Being a better designer makes me a better engineer and being a better engineer makes me a better designer.
    1. This is a huge disadvantage to all web developers. Why can't we at least have the ability to turn validation messages off? Why do we have to re-implement a validation system when you already have one in place, but all we want is the validation aspect and not the built in messaging? By taking away the ability to style elements that CHROME adds to the browser window, it is hurting developers professional appearance. We just want to use Chrome's WONDERFUL validation system with our own error messages. Either let us style them, or let us hide them, but don't make us re-invent the wheel just because you don't want our code to be "browser specific". Writing a new validation system just for Chrome is going to be much more "browser (chrome) specific" code than setting "::-webkit-validation-bubble, ::-webkit-validation-bubble * { display: none; }. This isn't just an annoyance, it's a huge disadvantage to any developer who wants to easily utilize Chrome's built in validation. I usually brag about how wonderful Chrome is, but I'm starting to think it's heading in another direction...

    1. Beykat yi duñu dem tool altine.

      Les cultivateurs ne vont pas au champ le lundi.

      beykat bi -- farmer 👩🏾‍🌾 (from bey -- to farm/cultivate).

      yi -- the (indicates plurality).

      duñu -- do not/no one (?).

      dem v. -- to go, leave, etc.

      tool bi -- field, orchard.

      altine ji -- (Arabic) Monday.

  18. 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...

  19. 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")
    2. 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?

    3. This connects the failure output to the previous task, which might create an infinity loop and waste your computing time - it is solely here for demonstrational purposes.
    1. Personally, I'm starting to think that the feature where it automatically adds xray.js to the document is more trouble than it's worth. I propose that we remove that automatic feature and just make it part of the install instructions that you need to add this line to your template/layout: <%= javascript_include_tag 'xray', nonce: true if Rails.env.development? %>
    1. The link name is not very helpful, it doesn’t explain what it does very well.
    2. Another big issue is that the config wasn’t really expressive enough. From the beginning Rails needed a way to say “only compile application.css and application.js, but compile ALL images” by default. With our previous interface, we’re limited to only strings.
    3. That’s pretty gnarly. While the name of the constant LOOSE_APP_ASSETS gives me some idea of what it does, it still takes a second to wrap your mind around. If you were trying to figure out what assets are being precompiled and you did a puts config.assets.precompile that lambda object would be utterly baffling.
    4. Another thing I don’t like: our asset behavior is decoupled from the assets. If you’re mucking around in your app/assets folder, then you have to first know that such a config exists, and then hunt it down in a totally different config folder. It would be nice if, while we’re working in asset land, we didn’t have to mentally jump around.
    1. Good intentions, but I doubt there's any relation of the origin of the terms blacklist/whitelist to race. There are many idioms and phrases in the English language that make use of colours without any racial backstories. I haven't met any black person (myself included) who was ever offended by the use of "blacklist".
    1. Literally, everything in this example can go wrong. Here’s an incomplete list of all possible errors that might occur: Your network might be down, so request won’t happen at all The server might be down The server might be too busy and you will face a timeout The server might require an authentication API endpoint might not exist The user might not exist You might not have enough permissions to view it The server might fail with an internal error while processing your request The server might return an invalid or corrupted response The server might return invalid json, so the parsing will fail And the list goes on and on! There are so maybe potential problems with these three lines of code, that it is easier to say that it only accidentally works. And normally it fails with the exception.
    2. And we can specify types of wrapped values in a function return annotation, for example Result[float, ZeroDivisionError] returns either Success[float] or Failure[ZeroDivisionError].
    3. we also wrap them in Failure to solve the second problem: spotting potential exceptions is hard
    4. exceptions are not exceptional, they represent expectable problems
    5. Exceptions are not exceptional
    6. Almost everything in python can fail with different types of exceptions: division, function calls, int, str, generators, iterables in for loops, attribute access, key access, even raise something() itself may fail. I am not even covering IO operations here. And checked exceptions won’t be supported in the nearest future.
    7. You still need to have a solid experience to spot these potential problems in a perfectly readable and typed code.
    8. print will never be actually executed. Because 1 / 0 is an impossible operation and ZeroDivisionError will be raised.