371 Matching Annotations
  1. Jun 2024
    1. there's a huge disparity between state of law application of tech and what's 00:15:42 actually happening

      for - AI - law - too slow

    1. After Theseus, king of Athens and enemy of Minos, escaped from the labyrinth, King Minos suspected that Icarus and Daedalus had revealed the labyrinth's secrets and imprisoned them—either in a large tower overlooking the ocean or the labyrinth itself, depending upon the account.[1][2] Icarus and Daedalus escaped using wings Daedalus constructed from feathers, threads from blankets, clothes, and beeswax.[3] Daedalus warned Icarus first of complacency and then of hubris, instructing him to fly neither too low nor too high, lest the sea's dampness clog his wings or the sun's heat melt them.[3] Icarus ignored Daedalus's instructions not to fly too close to the sun, causing the beeswax in his wings to melt. Icarus fell from the sky, plunged into the sea, and drowned. The myth gave rise to the idiom, "fly too close to the sun." In some versions of the tale, Daedalus and Icarus escape by ship.[1][4]

      Minos suspected Theseus and Daedalus gave the secrets of the labyrinth to Ariadne/Theseus. They were imprisoned. They escaped via wings that Daedalus constructed. Icarus was instructed to not fly too high or too low. Too high, and his wings would be burnt. Too low, and his wings would dampen. Icarus flew too close to the sun, and plunged into the ocean. Hence the idiom "fly too close to the sun".

  2. May 2024
    1. While the RSpec team now officially recommends system specs instead, feature specs are still fully supported, look basically identical, and work on older versions of Rails.

      Whose recommendation should one follow?

      RSpec team's recommendation seems to conflict with this project's: https://rspec.info/features/6-0/rspec-rails/request-specs/request-spec/:

      Capybara is not supported in request specs. The recommended way to use Capybara is with feature specs.

    1. SO MOVED! This is a common statement which means nothing. One must state the actual motion so as to avoid confusion in the audience. Everyone has the right to know exactly what is being moved and discussed. "So moved!" is vague and pointless. Do not allow your club members to be vague and pointless.
  3. Apr 2024
    1. Ain't it possible that every message I send or forward will just be replaced to the outbox and will be send by Thunderbird in the background ? I really hate it that every message sends itself away, running on top of all other windows, and it makes me wait till it has been sent from reading my other messages...
    1. Compacting folders does nothing for me -- I don't know why. I compacted them today for the first time in about a year, and the folder size remained unchanged. I don't generally delete emails, so that's likely why, but that doesn't mean I need to keep local copies of 12.5GB of emails.
    1. for - Adverse Childhood Experiences - ACE - Aces Too High - childhood trauma - Intergenerational harm

      Summary - A great resource that examines how adverse childhood experiences turns into harmful adult behavior that perpetuates the cycle - Most of the most famous pathological leaders of the modern era, including contemporary ones are examined from the perspective of their ACE

  4. Jan 2024
    1. when you actually have chronic anything usually it's not a good result

      for - chronic disease - usually chronic is not a good sign - too much of a good thing turns out to be bad - it means too much of something, like inflammation will cause harm - when inflammation knob is stuck on high, it becomes a problem

      metaphor - inflammation and forest fire - If you are camping in the forest, a small fire keeps you warm and you can cook - Inflammation is like that small fire going out of control and burning the whole forest down

    1. i was just banned from reddit for 3 days for "threatening violence" in this comment

      you have to be really stupid (or evil) to interpret this comment as "threatening violence". but well, nothing new. hate maintainers, hate moderators, hate admins, ...

      Kinda crazy that something that every body does is taken away from them and they shut up and obey like they are the government's property or something.

      because people ARE property of the government

      if i would own my children, then i could kill them, just like i can kill my dog. but "my" children are property of the government, and if i "hurt" my children, or if i teach the "wrong" things to my children, then police bust my door, steal my children, throw me in jail, and put my children into a "normal" family

      you sound young, maybe 20. im 30, and i have some experience in this field... im officially labelled as "unfit for educating children" because of my radical views

      here is the ban message:

      Hi milahu2,

      Reddit is a vast network of communities that are created, run, and populated by people like you. In order to keep communities welcoming, safe, and great places to be, everyone who uses the platform operates by a shared set of rules.

      Banned 3-days for threatening violence

      We flagged the following as a potential policy violation:

      Content shared from milahu2 on 01/16/2024 UTC


      After reviewing, we found that you broke Rule 1 because you threatened violence or physical harm. Reddit is a place for creating community and belonging, not for threatening violence against people or animals. We don’t tolerate any behavior that threatens violence or physical harm against an individual, groups of people, places, or animals. Any communities or people that threaten violence towards an individual, group, animals, or place will be banned.

      As a result, we’re issuing a temporary 3-day ban on your milahu2 account, removing the violating content, and asking you not to break this rule again.

      Reddit and its communities are only what we make of them together, and we want you to continue enjoying Reddit while helping your fellow redditors and communities stay safe. We suggest reading and getting acquainted with Reddit’s Content Policy. A better understanding of these rules will help you avoid further actions from our admin team. If you do continue to break Reddit’s rules through this or any other Reddit account, you may face additional actions such as a permanent ban from the platform.

      If you feel like you didn’t break the rules, you can file an appeal any time within the next six months and we’ll take a second look.

      – Reddit Admin Team

      Note: This content was flagged by Reddit's automated systems. This decision was made without the assistance of automation.

      my appeal:

      not a single word in my comment is "threatening violence"

      do you understand the english language?

      • for: COP28 talk - later is too late, Global tipping points report, question - are there maps of feedbacks of positive tipping points?, My Climate Risk, ICICLE, positive tipping points, social tipping points

      • NOTE

        • This video is not yet available on YouTube so couldn't not be docdropped for annotation. So all annotations are done here referred to timestamp
      • SUMMARY

        • This video has not been uploaded on youtube yet so there is no transcription and I am manually annotating on this page.

        • Positive tipping points

          • not as well studied as negative tipping points
          • cost parity is the most obvious but there are other factors relating to
            • politics
            • psychology
          • We are in a path dependency so we need disruptive change

        • Pierre Fredlingstein, Uni of Exeter - Global carbon budget report
        • Rosalyn Conforth, Uni of Reading - Adaptation Gap report
        • Tim Lenton, Uni of Exeter - Global Tipping Report
      • Global Carbon Budget report summary

      • 0:19:47: Graph of largest emitters

        • graph
        • comment
          • wow! We are all essentially dependent on China! How do citizens around the world influence China? I suppose if ANY of these major emitters don't radically reduce, we won't stay under 1.5 Deg C, but China is the biggest one.
      • 00:20:51: Land Use Emissions

      • three countries represent 55% of all land use emissions - Brazil - DRC - Indonesia

      • 00:21:55: CDR

        • forests: 1.9 Gt / 5% of annual Fossil Fuel CO2 emissions
        • technological CDR: 0.000025% of annual Fossil Fuel CO2 emissions
      • 00:23:00: Remaining Carbon Budget

        • 1.5 Deg C: 275 Gt CO2
        • 1.7 Deg C. 625 Gt CO2
        • 2.0 Deg C. 1150 Gt CO2
      • Advancing an Inclusive Process for Adaptation Planning and Action

      • adaptation is underfinanced. The gap is:

        • 194 billion / year
        • 366 billion / year by 2030
      • climate change increases transboundary issues
        • need transboundary agreements but these are absent
        • conflicts and migration are a result of such transboundary climate impacts
        • people are increasing climate impacts to try to survive due to existing climate impacts

      -00:29:46: My Climate Risk Regional Hubs - Looking at climate risks from a local perspective. - @Nate, @SoNeC - 00:30:33 ""ICICLE** storyllines - need bottom-up approach (ICICLE - Integrated Climate Livelihood and and Environment storylines)

      • 00:32:58: Global Tipping Points

      • 00:33:46: Five of planetary systems can tip at the current 1.2 Deg C

        • Greenland Ice Sheet
        • West Antarctic
        • Permafrost
        • Coral Reefs - 500 million people
        • Subpolar Gyre of North Atlantic - ice age in Europe
          • goes in a decade - like British Columbia climate
      • 00:35:39

        • risks go up disproportionately with every 0.1 deg C of warming. There is no longer a business-as-usual option now. We CANNOT ACT INCREMENTALLY NOW.
      • 00:36:00

        • we calculate a need of a speed up of a factor of 7 to shut down greenhouse gas emissions and that is done through positive tipping points.

      -00:37:00 - We have accelerating positive feedbacks and if we coordinate policy changes with consumer behavior change and business behavior change to reinforce these positive feedbacks, we can help accelerate change in the other sectors of the global economy responsible for all the other emissions

      • 00:37:30

        • in the report we walk you through the other sectors, where their tipping points are and how we have to act to trigger them. This is the only viable path out of our situation.
      • 00:38:10

        • Positive tipping points can also reinforce each other
        • Question: Are there maps of the feedbacks of positive tipping points?
        • Tim only discusses economic and technological positive tipping points and does not talk about social or societal
  5. Dec 2023
    1. The Conversation’s senior editor had pulled the piece at the last minute, claiming it was “too polemical”. Unfortunately, the senior editor didn’t elaborate on their judgement (or contact me directly), so I can only guess that they were uncomfortable with my direct language and reference to the “generally supine media” – concerns all too easily hidden behind the façade of “too polemical”.
      • for: too controversial, too polemic, elite discomfort, ClimateUncensored censored!, Kevin Anderson - censored
    1. its easy to get lost in complexity here, but i prefer to keep it simple: our *only* problem is overpopulation, which is caused by pacifism = civilization. *all* other problems are only symptoms of overpopulation. these "financial weapons of mass destruction" (warren buffett) have the only purpose of mass murder = to kill the 95% useless eaters. so yes, this is a "controlled demolition" aka "global suicide cult". most of us will die, but we are happy...

      financial weapons of mass destruction: the useful idiots believe that they can defeat risk (or generally, defeat death) by centralization on a global scale. they want to build a system that is "too big to fail" and which will "live forever". they use all kinds of tricks to make their slaves "feel safe" and "feel happy", while subconsciously, everything is going to hell in the long run. so this is just another version of "stupid and evil people trying to rule the world". hubris comes before the fall, nothing new. their system will never work, but idiots must try... because "fake it till you make it" = constructivism, mind over matter, fantasy defeats reality, ...

      the video and soundtrack are annoying, they add zero value to the monolog.

  6. Nov 2023
    1. The problem is that when I want to create OAuth client ID in google, it does not accept ".test" domain for "Authorized redirect URIs". It says: Invalid Redirect: must end with a public top-level domain (such as .com or .org). Invalid Redirect: domain must be added to the authorized domains list before submitting. While it accepts .test domain for "Authorized JavaScript origins" part! I saw most of the tutorials when using socialite and google api they set these in google console. http://localhost:8000 and http://localhost:8000/callback/google and google accepts them without problem with domain and generate the key and secret but I am not using mamp and I am going to continue with valet. I would be so thankful if you guide me about what is the alternative domain for .test which works fine in valet and also google accepts it?
    1. So then they put it into lib only to find that they have to manually require it. Then later realize that this also means they now have to reboot their server any time they change the file (after a painfully long debugging time of "why what aren't my changes working?", because their lib folder classes are now second-class citizens). Then they go down the rabbit hole of adding lib to the autoload paths, which burns them because rake tasks then all get eager loaded in production. Then they inevitably realize anything inside app is autoloaded and make an app/lib per Xavier's advice.
    2. I think the symmetry of the naming between lib and app/lib will lead a fresh Rails developer to seek out the answer to “Why are there two lib directories?", and they will become illuminated. And it will prevent them from seeking the answer to “How do I autoload lib?” which will start them on a rough path that leads to me advising them to undo it.
  7. Oct 2023
    1. I don't understand the distinction between quality and state.

      Now that I mention it, neither do I. What's the difference between a quality and a state?

  8. Sep 2023
  9. Aug 2023
    1. 4. Too much couplingAnother issue I had with this is the coupling that it might introduce in your code. I do understand that our community in general is not very much interested in dealing with coupling and I am not an expert at this either, but I do get a feeling that this suppress method would lead to some very bad usages.For instance, why does the Copyable module needs to know about a class named Notification?
    1. rendered.should have_selector("#header") do |header| header.should have_selector("ul.navlinks") end Both of which silently pass - however, capybara doesn't support a :content option (it should be :text), and it doesn't support passing blocks to have_selector (a common mistake from Webrat switchers).
  10. Jul 2023
    1. The way to do this with Capybara is documented on StackOverflow but, unfortunately, the answer there is buried in a little too much noise. I decided to create my own tiny noise-free blog post that contains the answer. Here it is:
    2. I commonly find myself wanting to assert that a certain field contains a certain value.
    1. Lograge is an attempt to bring sanity to Rails' noisy and unusable, unparsable and, in the context of running multiple processes and servers, unreadable default logging output.
  11. Jun 2023
  12. Mar 2023
    1. he gained popularity, particularly among young men, by promoting what he presented as a hyper-masculine, ultra-luxurious lifestyle.

      Andrew Tate, a former kickboxer and Big Brother (17, UK) housemate, has gained popularity among young men for promoting a "hyper-masculine, ultra-luxurious lifestyle".

      Where does Tate fit into the pantheon of the prosperity gospel? Is he touching on it or extending it to the nth degree? How much of his audience overlaps with the religious right that would internalize such a viewpoint?

  13. Jan 2023
  14. Dec 2022
    1. 4NO POSTING OR UPLOADING VIDEOS OF ANY KINDTo protect the quality of our group & prevent members from being solicited products & services - we don't allow any videos because we can't monitor what's being said word for word. Written post only.

      annotation meta: may need new tag: - can't effectively monitor

    1. When configuring SMTP settings in an after_initialize block, the settings aren't picked up by ActionMailer. This leads to runtime errors, since ActionMailer tries the default settings.
  15. Nov 2022
    1. Since adequately performing economies use too much energy, other research has formulated low energy consumption levels satisfying human needs.  What would low energy life be like?  For starters, an end to private transportation, not just switching to electric vehicles.  People will have to rely on public transit and “active” transport (e.g., walking).

      Not going to be a possibility for most people

    2. Estimates put the level of energy use “compatible with avoiding 1.5ºC of global warming without relying on negative emissions technology” at around 7,500 kilowatt-hours per person per year.  Americans currently use more than ten times this level, so our energy use would need to decline drastically

      We use too much energy for this to be possible

    1. Many INDCs lack necessary details, such as clarity on sectors and gases covered, details on the impact of listed mitigation actions, different metrics to aggregate gases, details on base year or reference values from which reductions or improvements would be measured, or accounting practices related to land use and the use of specific market mechanisms (

      Countries were only concerned with delivering a result rather than giving good solutions

    2. About two thirds of the available budget for keeping warming to below 2[degrees]C have already been emitted

      no money for change

    3. The INDCs collectively lower greenhouse gas emissions compared to where current policies stand, but still imply a median warming of 2.6-3.1 degrees Celsius by 2100. More can be achieved, because the agreement stipulates that targets for reducing greenhouse gas emissions are strengthened over time, both in ambition and scope

      Agaisnt too late

    1. On the other hand, emissions from the building sector are expected to rise from 9 gigatonnes (Gt) in 2004 to 11 to 16 Gt in 2030, mainly due to economic growth in developing countries (IPCC 2007). Given climate change as a global constraint to future use of fossil fuels, it is the responsibility of the industrialized nations to develop an energy efficient building stock in order to facilitate economic development elsewhere in the world. Recent policy proposals (European Commision 2011; Kelly 2009) make similar arguments and suggest sectoral reduction targets of 80% or more for developed regions.

      Arguement for it is too late

    2. As heat losses of buildings are minimized during transformation, energy for hot water and appliances becomes the dominant contributor to sectoral energy demand. Reducing the sectoral carbon footprint by at least 50%, as required to limit global warming to 2°C, cannot be achieved by transforming the stock alone; additional measures such as lowering consumption from hot water generation or appliances and changes that impact lifestyle, such as smaller dwellings and more people per dwelling, are required.

      Against its too late

    1. I have DNS settings in my hosts file that are what resolve the visits to localhost, but also preserve the subdomain in the request (this latter point is important because Rails path helpers care which subdomain is being requested)
    2. I've developed additional perspective on this issue - I have DNS settings in my hosts file that are what resolve the visits to localhost, but also preserve the subdomain in the request (this latter point is important because Rails path helpers care which subdomain is being requested) To sum up the scope of the problem as it stands now - I need a way within Heroku/Capybara system tests to both route requests to localhost, but also maintain the subdomain information of the request. I've been able to accomplish one or the other, but haven't found a configuration that provides both yet.
    1. The Console now supports redeclaration of const statement, in addition to the existing let and class redeclarations. The inability to redeclare was a common annoyance for web developers who use the Console to experiment with new JavaScript code.
    1. Honestly, at this point, I don't even know what tools I'm using, and which is responsible for what feature. Diving into the code of capybara and cucumber yields hundreds of lines of metaprogramming magic that somehow accretes into a testing framework. It's really making me loathe TDD despite my previous youthful enthusiasm.

      opinion: too much metaprogramming magic

      I'm not so sure it's "too much" though... Any framework or large software project is going to feel that way to a newcomer looking at the code, due to the number of layers of abstractions, etc. that eventually were added/needed by the maintainers to make it maintainable, decoupled, etc.

    1. Check the "Auto-open DevTools for popups".

      Without this feature, when a pop-up opens without DevTools open, if it redirects, it will be too late to open DevTools and see the redirect logged...

      There is still a problem though: If the pop-up window closes, so does that DevTools. So you can't see logs or network logs (redierects) that happened right before it closed...

    1. Why was the SIGSTOP-ed process not responding to SIGTERM? Why does the kernel keeps it in the same state? Why did it get killed the moment it received the SIGCONT signal? If it was because of the previous SIGTERM signal, where was it kept until the process resumed?
  16. Oct 2022
    1. I'd like rsync to create the source dir structure on the remote, when I'm only synching a file in a sub-dir. At the moment it seems I need to do this in 2 commands, e.g.. ssh <remote> mkdir -p /backup/var/spool/cron/crontabs rsync -vauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/. Ideally, I'd like to be able to do this: rsync -Mvauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/.
    1. I'd like rsync to create the source dir structure on the remote, when I'm only synching a file in a sub-dir. At the moment it seems I need to do this in 2 commands, e.g.. ssh <remote> mkdir -p /backup/var/spool/cron/crontabs rsync -vauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/. Ideally, I'd like to be able to do this: rsync -Mvauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/. ...where M (make parents) is a new option that tells mkdir to do 'mkdir -p' on the remote target dir.
  17. Sep 2022
    1. it's syntactically correct, but it will check that none parameters are valid, just because additionalProperties work at siblings level, and no enter inside of allOf

      JSON Schema: problem: can't use additionalProperties with allOf to make a union

  18. Aug 2022
    1. It would completely change how I view mint.com. It would become a powerful mechanism for opening up my own access to my own financial data which is currently being locked away by my banks, credit card companies and other providers. All I get is a crappy UI from those places. Mint's UI is much better, but an API would completely change the game.
    1. I would like something to log and tag my spending instantly.
    2. My main issue with mint was having to correct transactions multiple times. Do it one day, do it again the next, then it finally sticks.
    1. How do I turn off the requirement to have a lock screen?Today, I'm suddenly unable to use any Google related apps on my phone, because I am now REQUIRED to set up a lock screen on my phone. I get that you want to be super-secure for businesses using enterprise devices. I am not a business. I'm some guy who just happens to have a domain name. My only "employee" is me. I have a two email addresses: My real first name, and the shorter version that most people call me. I do NOT want a lock screen on my phone. I don't want to be forced to give myself permission to use apps on my phone. Why am I now required to add all this bull$%^? Nobody is hacking my interwebs. Give me a f#$%^& break! I don't need a lock screen. I've been using this account for everything (gmail, youtube, etc) for over five years now. I'm not interested in deleting it and going back to my gmail.com account. I'm also not interested in being forced to click multiple times just to use my phone. Let me disable it.So, how do I turn this garbage off?
    1. It's a great way to test various limits. When you think about this even more, it's a little mind-bending, as we're trying to impose a global clock ("who is the most up to date") on a system that inherently doesn't have a global clock. When we scale time down to nanoseconds, this affects us in the real world of today: a light-nanosecond is not very far.
    2. There are many questions we can ask and answer about branch names. Each one is specific to one particular repository because all branch names are local to that particular repository. Any changes anyone makes in that repository affect only that one repository, at least at the time they make them.

      which assumption? well, people make the assumption that our local repo should know some fact about the remote repo, like its default branch, without actually asking the remote about itself

  19. Jul 2022
    1. Rails 3 seems is ignoring my rescue_from handler so I cannot test my redirect below.

      I have similar problem too

      404 errors raise ActiveRecord::RecordNotFound to the test

  20. May 2022
    1. DatabaseCleaner.strategy = :truncation, {:except => %w[spatial_ref_sys]}


    2. I spent some time trying to figure out why I was receiving: GetProj4StringSPI: Cannot find SRID (4326) in spatial_ref_sys From my tests. Of course SELECT * FROM spatial_ref_sys returned 0 rows.

      I had this problem too

  21. Apr 2022
    1. Book review

      Cook, Trevor. “Review: Blair, Ann M. Too Much to Know: Managing Scholarly Information Before the Modern Age. New Haven: Yale University Press, 2010. Pp. Xv, 397. ISBN 978-0-300-11251-1 (Hardcover) $45.” Renaissance and Reformation 33, no. 4 (December 12, 2011): 109–11. https://doi.org/10.33137/rr.v33i4.15975.

      Note that they've accidentally used the word "in" instead of "Before" in the title of the book.

    2. The bookitself participates in the history it recounts: it has a title page, table of contents,footnotes, a bibliography and an index to assist the reader, while the digitalcopy enables the reader to search for individual words and phrases as well asto copy-and-paste without disfiguring a material object.

      Some scholars study annotations as part of material culture. Are they leaving out too much by solely studying those physically left in the books about which they were made, or should we instead also be looking at other sources like commonplace books, notebooks, note cards, digital spaces like e-readers that allow annotation, social media where texts are discussed, or even digital marginalia in services like Hypothes.is or Perusall?

      Some of these forms of annotation allow a digital version of cut and paste which doesn't cause damage to the original text, which should be thought of as a good thing though it may separate the annotations from the original physical object.

  22. Mar 2022
    1. Software has gotten so much slower and more bloated that operating systems no longer run acceptably on spinning rust.
    1. In 1994, The Unix-Haters Handbook was published containing a long list of missives about the software—everything from overly-cryptic command names that were optimized for Teletype machines, to irreversible file deletion, to unintuitive programs with far too many options. Over twenty years later, an overwhelming majority of these complaints are still valid even across the dozens of modern derivatives. Unix had become so widely used that changing its behavior would have challenging implications. For better
  23. Jan 2022
  24. Dec 2021
  25. Nov 2021
    1. Could someone guide me how to set up chromedriver with selenium using chromium flatpak properly? I can't seem to find any tutorial doing it like this... I never had issues with chromedriver using the "old" sudo apt way and I also got it working using snapd. But since I am using Pop!_OS I'd like to just use flatpaks if there is no sudo apt repo.
  26. Oct 2021
    1. The issue seems to be that when there are multiple layouts configured, VS Code sets as key layout the first value for layout form setxkbmap -query, ignoring the current layout. If I switch to be en,de then VS Code uses the EN layout, as it is the first in the list. It would be handy if VS Code could use the current layout instead of the first from the list.
  27. Sep 2021
    1. Does this daemon benefit me in anyway or is it only used for mismatched resolutions like 1440p with a 1080p display?
    1. if you have 3 windows of the same web browser application running, Alt+Tab won’t let you switch between those windows
    1. After a bad leak from the pipe leading into my hot water heater left my floors soaked and damaged, I decided I wanted to be prepared in case there was a next time.
    1. WARNING in ./app/javascript/components/ComponentLibrary/Docs/Intro.md Module parse failed: Unexpected character '#' (1:0) You may need an appropriate loader to handle this file type.
    1. Usually you get this error if you change your password by some other means which fails to update the password for the keyring.
  28. Aug 2021
    1. But for this approach we fear the performance impact of creating iframes via JavaScript -- the html iframe would be rendered and loaded before the script would even start to execute.
    1. The problem is that, with the literal types, the includes call now gives a type error: // Error: Argument of type number is not assignable to 1 | 2 | 3 if(!legalValues.includes(userValue)) { throw new Error("..."); }
    1. Now consider we want to handle numbers in our known value set: const KNOWN_VALUES = Object.freeze(['a', 'b', 'c', 1, 2, 3]) function isKnownValue(input?: string | number) { return typeof(input) === 'string' && KNOWN_VALUES.includes(input) } Uh oh! This TypeScript compiles without errors, but it's not correct. Where as our original "naive" approach would have worked just fine. Why is that? Where is the breakdown here? It's because TypeScript's type system got in the way of the developer's initial intent. It caused us to change our code from what we intended to what it allowed. It was never the developer's intention to check that input was a string and a known value; the developer simply wanted to check whether input was a known value - but wasn't permitted to do so.
    1. That should work as expected and not be too verbose (or at least it doesn't repeat string literals anywhere)
    2. So is @Ryan Cavanaugh's answer the only viable solution? It seems extremely verbose...
    3. My question is specifically if there is a way to do user defined type guards using the type itself