4,548 Matching Annotations
  1. Mar 2021
    1. <small><cite class='h-cite via'> <span class='p-author h-card'>Craig Mod</span> in Oh God, It's Raining Newsletters (<time class='dt-published'>03/26/2021 11:11:49</time>)</cite></small>

    1. Not to be confused with tree (graph theory), a specific type of mathematical object.

      Confusing: https://en.wikipedia.org/wiki/Tree_(data_structure) says

      Not to be confused with tree (graph theory) "Tree (graph theory)"), a specific type of mathematical object. but https://en.wikipedia.org/wiki/Tree_(graph_theory) redirects to https://en.wikipedia.org/wiki/Tree_structure and https://en.wikipedia.org/wiki/Tree_structure is in category Trees (data structures) So is one a subtype/hyponym of the other ... or what?? How are they related? Skimming the articles a bit, esp. the first paragraph which clearly states as much ( :) ), I believe the answer is: a tree (data structure) is an implementation (in a programming language) of / or a "type that simulates" a hierarchical tree structure. a tree (data structure) is the computer science analogue/dual to tree structure in mathematics

    2. Not to be confused with trie, a specific type of tree data structure. Not to be confused with tree (graph theory), a specific type of mathematical object.
    1. This should link to / explain the relationship to: https://en.wikipedia.org/wiki/Class_(computer_programming) (which I believe is a way of expressing / codifying semantic classes into source code).

      It should also link to / explain the relationship to: https://en.wikipedia.org/wiki/Type_theory

    2. (Not answered on this stub article)

      What, precisely, is the distinction/difference between a semantic class and a semantic field? At the very least, you would say that they are themselves both very much within the same semantic field.

      So, is a semantic class distinct from a semantic field in that semantic class is a more well-defined/clear-cut semantic field? And a semantic field is a more fluid, nebulous, not well-defined field (in the same sense as a magnetic field, which has no distinct boundary whatsoever, only a decay as you move further away from its source) ("semantic fields are constantly flowing into each other")?

      If so, could you even say that a semantic class is a kind of (hyponym) of semantic field?

      Maybe I should pose this question on a semantics forum.

    1. The words type, concept, property, quality, feature and attribute (all used in describing things) tend to be used with different verbs. E.g. Suppose a rose bush is defined as a plant that is "thorny", "flowering" and "bushy". You might say a rose bush instantiates these three types, or embodies these three concepts, or exhibits these three properties, or possesses these three qualities, features or attributes.
    1. semantic domain or semantic field

      What, then, is the difference between a semantic domain and a semantic field? The way they are used here, it's almost as if they are listing them in order to emphasis that they are synonyms ... but I'm not sure.

      From the later examples of basketball (https://hyp.is/ynKbXI1BEeuEheME3sLYrQ/en.wikipedia.org/wiki/Semantic_domain) and coffee shop, however, I am pretty certain that semantic domain is quite different from (broader than) semantic field.

    2. This uses techniques such as SIL International's Dictionary Development Process (DDP),[4][5] RapidWords, or software such as WeSay[6] or FLEx. These techniques rely on extensive lists of semantic domains that are relevant to vernacular languages.
    1. BIBLIOGRAPHY. - A large number of the works referred to in the text contain historical material. Among histories of the subject, see C. F. von Aretin, Systesnatische Anleitung zur Theorie and Praxis der Mnemonik (Sulzberg, 1810); A. E. Middleton, Memory Systems, Old and New (espec. 3rd rev. ed., New York, 1888), with bibliography of works from 1325 to 1888 by G. S. Fellows and account of the Loisette litigation; F. W. Colegrove, Memory (1901), with bibliography, pp. 353-3 6 1. (J. M. M.)

      This is likely worth checking out for its history.

    2. About the end of the 15th century Petrus de Ravenna (b. 1448) awakened such astonishment in Italy by his mnemonic feats that he was believed by many to be a necromancer. His Phoenix artis memoriae (Venice, 1491, 4 vols.) went through as many as nine editions, the seventh appearing at Cologne in 1608. An impression equally great was produced about the end of the 16th century by Lambert Schenkel (Gazophylacium, 1610), who taught mnemonics in France, Italy, and Germany, and, although he was denounced as a sorcerer by the university of Louvain, published in 1593 his tractate De memoria at Douai with the sanction of that celebrated theological faculty. The most complete account of his system is given in two works by his pupil Martin Sommer, published at Venice in 1619. In 1618 John Willis (d. 1628?) published Mnemonica; sive ars reminiscendi (Eng. version by Leonard Sowersby, 1661; extracts in Feinaigle's New Art of Memory, 3rd ed., 1813), containing a clear statement of the principles of topical or local mnemonics. Giordano Bruno, in connexion with his exposition of the ars generalis of Lull, included a memoria technica in his treatise De umbris idearum. Other writers of this period are the Florentine Publicius (1482); Johann Romberch (1533); Hieronimo Morafiot, Ars memoriae (1602); B. Porta, Ars reminiscendi (1602).

      Hunt down copies of all these.

    1. <small><cite class='h-cite via'> <span class='p-author h-card'>hyperlink.academy</span> in The Future of Textbooks (<time class='dt-published'>03/18/2021 23:54:19</time>)</cite></small>

    1. Now, if you also want deskopen to pass through any command-line parameters, you can instead use this slightly-modified version: #!/bin/sh desktop_file=$1 shift `grep '^Exec' "${desktop_file}" | sed 's/^Exec=//' | sed 's/%.//'` "$@" &
    1. When one is searching for it on the internet, there are many many people wondering how one can open .desktop files. It seems trivial, since one usually just has to click an item on the launcher so one thinks there must be some way.
    2. I am wondering if it wasn't faster for maintainers/developers who know the glib code to just provide a fix instead of writing comments on this issue.
    1. If you really want this, I suggest you write a little function that extracts the executable name from the .desktop file and runs it. Add these lines to your shell's initialization file (e.g. ~/.bashrc): runDesktop () { eval "$(awk -F= '$1=="Exec"{$1=""; print}' "$1")" } Then, you can run your .desktop file with runDesktop ~/Desktop/slack.desktop
    1. A solution is almost indicated in the question: hinder xdg-open from choosing exo-open. A brute-force approach is to copy /usr/bin/xdg-open to /usr/local/bin (/usr/local/bin is earlier in PATH unless PATH has been modified) and to patch it to use open_generic instead of exo_open (unlike the XFCE4-specific exo-open, open_generic does honor xdg mime types)
    1. neither knows what to do with naked domain. So gnome-open http://askubuntu.com works but not gnome-open askubuntu.com. Here is a small function to make it easier to type and accept the stripped down domain name. function go { gnome-open http://$1 ; }
    1. a Docker container running a very simple NodeJS web server with the Graphile library (and some additional Netflix internal components for security, logging, metrics, and monitoring) could provide a “better REST than REST” or “REST++” platform for rapid development efforts

      Give this a try.

    1. <small><cite class='h-cite via'> <span class='p-author h-card'>chrisaldrich</span> in From Print to OER Ebook to Obsidian (Hypothesis annotation) (<time class='dt-published'>03/15/2021 10:45:30</time>)</cite></small>

    1. <small><cite class='h-cite via'> <span class='p-author h-card'>Remi Kalir & Jeremy Dean</span> in Web Annotation as Conversation and Interruption (<time class='dt-published'>03/15/2021 00:21:05</time>)</cite></small>

    1. Very often in these monorepos, packages are so incredibly specific in functionality, the question then becomes why even have a separate package at all if it’s tightly coupled? Can you use these packages independently or are they tied to specific versions of other packages in the monorepo? It’ll probably be easier to remove the mask and just work as a monolith.
    1. But I believe the core philosophy of tiny modules is actually sound and easier to maintain than giant frameworks.
    2. 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.
    3. Small modules are extremely versatile and easy to compose together in an app with any number of other modules that suit your needs.
    4. 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. this only applies to end products which are actually deployed. For my modules, I try to keep dependency version ranges at defaults, and recommend others do the same. All this pinning and packing is really the responsibility of the last user in the chain, and from experience, you will make their life significantly more difficult if you pin your own module dependencies.
    2. I suspect you aren't seeing much discussion because those who have a reasonable process in place, and do not consider this situation to be as bad as everyone would have you believe, tend not to comment on it as much.
    1. The elimination of what is arguably the biggest monoculture in the history of software development would mean that we, the community, could finally take charge of both languages and run-times, and start to iterate and grow these independently of browser/server platforms, vendors, and organizations, all pulling in different directions, struggling for control of standards, and (perhaps most importantly) freeing the entire community of developers from the group pressure of One Language To Rule Them All.
    2. JavaScript needs to fly from its comfy nest, and learn to survive on its own, on equal terms with other languages and run-times. It’s time to grow up, kid.
    3. If JavaScript were detached from the client and server platforms, the pressure of being a monoculture would be lifted — the next iteration of the JavaScript language or run-time would no longer have to please every developer in the world, but instead could focus on pleasing a much smaller audience of developers who love JavaScript and thrive with it, while enabling others to move to alternative languages or run-times.
    4. While various shortcomings of the standard run-time library are the obvious, immediate reason for the creation of micro-packages
    5. 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. A product’s onceability is, to a certain extent, linked to its usefulness. If it is really useful, we will certainly go to considerable lengths to repair it.
    2. Even if the damned thing would be really helpful in the long run, I can't give it the time and attention needed to make it work again ...  Not right now. And ultimately never.
    3. Onceability can be the result of the exaggerated demand for un-memorable passwords.
    4. I searched for a replacement, but the list of plug-ins had 5000 items and the search function couldn't find anything of the same kind...
    1. <small><cite class='h-cite via'> <span class='p-author h-card'>Jeremy Cherfas</span> in IndieWeb chat (<time class='dt-published'>03/11/2021 14:46:39</time>)</cite></small>

    1. To the consternation of some users, 3.x employed Unicode variable names such as λ, φ, τ and π for a concise representation of mathematical operations. A downside of this approach was that a SyntaxError would occur if you loaded the non-minified D3 using ISO-8859-1 instead of UTF-8. 3.x also used Unicode string literals, such as the SI-prefix µ for 1e-6. 4.0 uses only ASCII variable names and ASCII string literals (see rollup-plugin-ascii), avoiding encoding problems.
    2. Microlibraries are easier to understand, develop and test. They make it easier for new people to get involved and contribute. They reduce the distinction between a “core module” and a “plugin”, and increase the pace of development in D3 features.
    1. Normally you should not register a named module, but instead register as an anonymous module: define(function () {}); This allows users of your code to rename your library to a name suitable for their project layout. It also allows them to map your module to a dependency name that is used by other libraries.
      1. Get out the city shapefile and overlay these values.
      2. Get the most current version of the voter registration database.
      3. Determine the number of voters who, according to the Spokane Journal of Business, took part in the 2018 school bond vote, but not the stadium advisory vote. (Geographically, these would be folks who live within SD81, but outside of the city limits.)
    1. ECMAScript is a programming language itself, specified in the document ECMA-262. In other words, ECMA-262 is the specification of the programming language ECMAScript. JavaScript is an implementation of ECMAScript which conforms to the ECMAScript specification. JavaScript implementations can also provide additional features not described in the specification.
    1. I'd suggest there ought to be config to disable source maps specifically, and specifically for either CSS or JS (not alwasy both), without turning off debug mode. As you note, debug mode does all sorts of different things that you might want with or without source maps.
    2. Meh... as I said earlier, I think using Webpack is the recommended way now. Another issue is there is no way to generate source maps in production.
    3. I don't myself understand what's going on, it clearly has something to do with source maps, but may also have to do with other sprockets changes.
    4. But yeah, I'm not sure how you would determine which was the "recommended way" really. I don't see anything in Rails docs saying either way.
    5. But last I have seen comments from DHH, he considered webpack(er) recommended for JS, but Sprockets still the preferred solution for (S)CSS.
    6. I don't really understand what's going on. Clearly source maps have something to do with it -- a source map feature that doesn't handle SCSS very well, apparently.
    7. Is there a PR to... something? sassc-rails? That would make the patch not necessary? (I don't know if there's any good way to monkey-patch that in, I think you have to fork? So some change seems required...) Should the defaults be different somehow? This is very difficult to figure out.
    8. I agree about lack of maintenance. It's probably because people use more and more Webpack.
    1. # This behavior can be disabled with: # # environment.unregister_postprocessor 'application/javascript', Sprockets::SafetyColons

      but it appears to no longer be possible in latest version...

    1. we want source maps in production (like DHH)
    2. I totally understand that there may be a majority still considering this a bad practice and thus keeping it disabled by default in production seem ok. But there could at least be an option to enable it for people who want to, no?
    3. After waiting years for sprockets to support this we were very happy to see that sprockets 4 officially added support (thanks ), but then when trying to upgrade we noticed there's actually no way to use it in production... (without brittle hacks mentioned above).
    4. I'd be happy to open a PR for this, but I'm not sure exactly what code needs to change. default_source_map.rb and source_map_utils.rb seem like candidates, but I'd appreciate guidance
    1. The way we do it currently is by calling load from inside of load, via different "pipelines" and processors which is quite elegant and completely impossible to work with.
    2. If I can find some time, maybe I can help pitch in somehow.
    3. I'm kinda stuck at the moment, going around in circles. Everything is really heavily coupled. I would like to get to the point where no load is called from within processors, but i'm not sure if that's possible. Currently the API and the caching strategies are fighting me at every step of the way. I have a branch where i'm hacking through some refactoring, no light at the end of the tunnel yet though :(
    4. Money could be good if it is spent to provide some of the above things. Money on it's own is hard because then it means I would have to spend time book-keeping and managing instead of programming.
    1. it's super hard to test master because i have no idea which gems need to be updated. is there a guide on how to take a rails 4.2 project to master sprockets without everything mysteriously exploding? ill try to make a repro case but its hard to tell where to even start
    1. Opal is a Ruby to JavaScript source-to-source compiler. It comes packed with the Ruby corelib you know and love. It is both fast as a runtime and small in its footprint.
    1. Hyperstack gives you full access to the entire universe of JavaScript libraries and components directly within your Ruby code.Everything you can do in JavaScript is simple to do in Ruby; this includes passing parameters between Ruby and JavaScript and even passing Ruby methods as JavaScript callbacks.There is no need to learn JavaScript, all you need to understand is how to bridge between JS and Ruby.
    1. Better yet, send them a link to this page to help them understand why and how to make an example app:
    2. If you end up finding and fixing a bug in your code, consider re-reading the documentation and seeing if that behavior of the library is unclear. Consider sending a documentation PR.
    3. Before a bug can be fixed, it has to be understood and reproduced. For every issue, a maintainer gets, they have to decipher what was supposed to happen and then spend minutes or hours piecing together their reproduction. Usually, they can’t get it right, so they have to ask for clarification. This back-and-forth process takes lots of energy and wastes everyone’s time. Instead, it’s better to provide an example app from the beginning. At the end of the day, would you rather maintainers spend their time making example apps or fixing issues?
    1. I think that over time the distinction is lost. My math teacher, 35 years ago stated "formulas are used in chemistry, in math we have equations". To this day, the word 'formula' in math seems wrong, but I'd accept it's used commonly.
    2. An equation is any expression with an equals sign, so your example is by definition an equation. Equations appear frequently in mathematics because mathematicians love to use equal signs. A formula is a set of instructions for creating a desired result. Non-mathematical examples include such things as chemical formulas (two H and one O make H2O), or the formula for Coca-Cola (which is just a list of ingredients). You can argue that these examples are not equations, in the sense that hydrogen and oxygen are not "equal" to water, yet you can use them to make water.
    1. We don’t want to invalidate the input if the user removes all text. They may need a moment to think, but the invalidated state sets off an unnecessary alarm.
    1. If you plan on using a gamepad with big picture mode I made a config that works perfectly so check it out.
    2. There are myriads of platformers around, it's an oversaturated market, and just like industrial designer Karim Rashid said about there being no excuse by this point to make an uncomfortable chair, there's no excuse by this point to make a boring patformer.
    1. Alxemes jiy ñów la lekkool di ubbi.

      C'est jeudi prochain la rentrée des classes.

      alxemes -- (Arabic) Thursday.

      jiy -- (?).

      ñów v. -- to come, to arrive.

      la -- can mean a lot of different things depending on context.

      lekkool bi -- (French: l'école) school. 🏫

      di v. -- be; mark of the imperfective affirmative not inactual.

      ubbi v. -- open, to start, begin, inaugurate.

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

    3. Fibar bi jàngal na taawan bu góor ni ñuy dagge reeni aloom.

      Le guérisseur a appris à son fils aîné comment on coupe les racines du Diospyros.

      fibar -- (fibar bi? the healer? as in feebar / fièvre / fever? -- used as a general term for sickness).

      bi -- the (indicates nearness).

      jàngal v. -- to teach (something to someone), to learn (something from someone) -- compare with jàng (as in janga wolof) and jàngale.

      na -- pr. circ. way, defined, distant. How? 'Or' What. function indicator. As.

      taaw+an (taaw) bi -- first child, eldest. (taawan -- his eldest).

      bu -- the (indicates relativeness).

      góor gi -- man; male.

      ni -- pr. circ. way, defined, distant. How? 'Or' What. function indicator. As.

      ñuy -- they (?).

      dagg+e (dagg) v. -- cut; to cut.

      reen+i (reen) bi -- root, taproot, support.

      aloom gi -- Diospyros mespiliformis, EBENACEA (tree).

      https://www.youtube.com/watch?v=BryN2nVE3jY

    4. Dafa ànd ak moroom yi àll ba, fori aloom.

      Il est allé dans la brousse ramasser des fruits de Diospyros avec ses camarades.

      dafa -- he/she.

      ànd v. / ànd bi -- to be together, to go together; copulate; going together, fellowship; placenta.

      ak -- and, with, etc.

      moroom mi -- comrade of the same age group, equal, companion, neighbor.

      yi -- the (plural).

      àll bi -- large expanse of uninhabited land, bush; distant, as opposed to home.

      ba -- the (indicates distance).

      for+i (for) v. -- to pick up.

      aloom bi -- edible fruit of Diospyros mespiliformis (aloom gi for the tree).

      https://www.youtube.com/watch?v=nL4iHgp5ejk

    5. Séentuwul woon ni dinañu ko alamaan.

      Il ne s'attendait pas à ce qu'on lui inflige une amende.

      "We didn't expect that we would be fined."

      séentu+wul (séentu) v. -- to seek to see from afar 👀, to scrutinize 🧐, to expect.

      woon -- he didn't (?).

      ni -- formats a verb (?)

      dinañu -- we will.

      ko -- her, him, it.

      alamaan v. -- (French: l'amende) give a fine.

      https://www.youtube.com/watch?v=QDv6KW-rpnE

    6. Sama nijaay aj na ñaari yoon.

      Mon oncle a effectué deux fois le pèlerinage à La Mecque.

      sama -- my.

      nijaay ji n. -- maternal uncle; term of reference and address to designate the husband, in conservative circles.

      aj (Arabic) v. -- make the pilgrimage to Mecca. 🕋; deceased ☠️ (for a religious personality).

      na -- he (?).

      ñaar+i (ñaar) -- twice; two. 2️⃣

      yoon wi n. -- lane, path, track 🛤; law, regulation, legislation; times.

    1. Dave Rupert has a good solution that uses an input's invalid event. Instead of using the :invalid pseudo selector, he adds a CSS class to the input when it becomes invalid. We will extend this approach by removing the CSS class when the element becomes valid again.
    1. Validating forms has notoriously been a painful development experience. Implementing client side validation in a user friendly, developer friendly, and accessible way is hard. Before HTML5 there was no means of implementing validation natively; therefore, developers have resorted to a variety of JavaScript based solutions.
    1. Try before you buy Here's a link to the game on Tabletopia: Judean Hammer on Tabletopia
    1. <small><cite class='h-cite via'> <span class='p-author h-card'>petermolnar</span> in #indieweb 2021-03-08 (<time class='dt-published'>03/08/2021 10:06:29</time>)</cite></small>

    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. This is the story of how a bill to save the vote and preserve a semblance of democracy for millions of Americans died at the hands of an intransigent, reactionary minority in the Senate, which used the filibuster to do its dirty work

      The author starts off by personifying "the bill" as something that was supposed to save millions of Americans, but rather was killed by Senators. He immediately provides a brief overview of the claim of his essay before developing his narrative. This way, the audience gets a glimpse of the issue that the author will tackle. Also, by using words such as "intransigent and reactionary", the audience already understands that the author is going to be criticizing the senators for their action.

    1. It is much easier to track what is going on within the activity. Instead of transporting additional state via ctx, you expose the outcome via an additional end event.

      Note: It's only super easy to see what's going on if you have the benefit of a diagram.

    2. This is my absolute favorite feature ever and the official reason for (re-)writing Trailblazer 2.1. It makes me happy every time I use it.
    3. So why the over-complication? What we got now is replicating a chain of && in the former version. This time, however, you will know which condition failed and what went in by using tracing. Look at the trace above - it’s impossible to not understand what was going on.
    4. Hey, that’s is an imaginary complication of our example - please don’t do this with every condition you have in your app.
    1. .The firstparadigm centres on institutional power: ‘Our schools, our government, our businessesand corporations are permeated with the view that neither individual nor group aretrustworthy. There must be power over, power to control. This hierarchal system isinherent in our whole culture’. The second paradigm takes the opposite view: ‘Givena suitable climate, humankind is trustworthy, creative, self-motivated, powerful andconstructive – capable of releasing undreamed-of-potentialities’

      there is an ongoing struggle in many areas of society, in schools, workplaces, religious organisations. the second paradigm doesn't seem to win over the first on a large scale, since significant change in any domain is a frustrating and never-ending process.

    2. importedfrom the business and commercial world.

      who decided this? who decides which measures of success are appropriate?

    3. target driven climate which has the potential to undermine theimportance of ‘relationship

      taking away from the very purpose of the practice

    Tags

    Annotators

  2. 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. 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. Subprocess will try to match the nested ends’ semantics to the tracks it knows. You may wire custom ends using Output.
    3. 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?

    4. Patching has no implicit, magical side-effects and is strongly encouraged to customize flows for a specific case in a quick and consise way.
    5. However, it can be a PITA if you want to customize one of those deeply nested components and add or remove a certain step, for example.
    6. While you could nest an activity into another manually, the Subprocess macro will come in handy.
    7. The macro automatically wires all of Validate’s ends to the known counter-part tracks.
    8. Since notify sits on the “failure” track and hence is “magnetic to” :failure, find_provider will be connected to it.
    9. 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. <small><cite class='h-cite via'> <span class='p-author h-card'>Cory Doctorow</span> in Pluralistic: 16 Feb 2021 – Pluralistic: Daily links (<time class='dt-published'>02/25/2021 12:20:24</time>)</cite></small>

      It's interesting to note that there are already two other people who have used Hypothes and their page note functionality to tag this article as to read, one with (to read) and another with (TODO-read).

    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. Sass variables, like all Sass identifiers, treat hyphens and underscores as identical. This means that $font-size and $font_size both refer to the same variable. This is a historical holdover from the very early days of Sass, when it only allowed underscores in identifier names. Once Sass added support for hyphens to match CSS’s syntax, the two were made equivalent to make migration easier.
    1. Keeping bootstrap-sass in sync with upstream changes from Bootstrap used to be an error prone and time consuming manual process. With Bootstrap 3 we have introduced a converter that automates this.
    1. Keep in mind that third party code with references to other files also processed by the asset Pipeline (images, stylesheets, etc.), will need to be rewritten to use helpers like asset_path.