1,216 Matching Annotations
  1. Nov 2022
    1. In other words, if you use Bash to run Jenkins, and then run docker stop, then Jenkins will never see the stop command!
    2. Now, Bash actually does the same thing (reaping zombies), so you're probably wondering: why not use Bash as PID 1?
    3. In other words, someone has to clean up after "irresponsible" parents that leave their children un-wait'ed, and that's PID 1's job.
    1. Let's look at a concrete example. Suppose that your container contains a web server that runs a CGI script that's written in bash. The CGI script calls grep. Then the web server decides that the CGI script is taking too long and kills the script, but grep is not affected and keeps running. When grep finishes, it becomes a zombie and is adopted by the PID 1 (the web server). The web server doesn't know about grep, so it doesn't reap it, and the grep zombie stays in the system.
    1. Glyph 0 must be assigned to a .notdef glyph. The .notdef glyph is very important for providing the user feedback that a glyph is not found in the font. This glyph should not be left without an outline as the user will only see what looks like a space if a glyph is missing and not be aware of the active font’s limitation.
    1. Consider a text file containing the German word für (meaning 'for') in the ISO-8859-1 encoding (0x66 0xFC 0x72). This file is now opened with a text editor that assumes the input is UTF-8. The first and last byte are valid UTF-8 encodings of ASCII, but the middle byte (0xFC) is not a valid byte in UTF-8. Therefore, a text editor could replace this byte with the replacement character symbol to produce a valid string of Unicode code points. The whole string now displays like this: "f�r".
    1. While there are many great answers regarding the "glyph not found" glyph, that won't help you actually detect it, as the text string in code will still have the character regardless of the font used to render it.
    1. A glyph can also represent more than one character at once. Take an f_f_f ligature as an example. It represents three f characters in a row. Ligatures do not have Unicodes, because the separate characters already have codes and the the fact that it’s a ligature does not change the meaning of its parts.
  2. Oct 2022
    1. Conversely, even before the mainstream began leeching off alternative cultures, the underground satirically appropriated from the mainstream.

      The mainstream is seen as the standard while the underground is seen as a copy or replica.

    1. The problem is that the caller may write yield instead of block.call. The code I have given is possible caller's code. Extended method definition in my library can be simplified to my code above. Client provides block passed to define_method (body of a method), so he/she can write there anything. Especially yield. I can write in documentation that yield simply does not work, but I am trying to avoid that, and make my library 100% compatible with Ruby (alow to use any language syntax, not only a subset).

      An understandable concern/desire: compatibility

      Added new tag for this: allowing full syntax to be used, not just subset

    2. You cannot use yield inside a define_method block. This is because blocks are captured by closures, observe: def hello define_singleton_method(:bye) { yield } end hello { puts "hello!" } bye { puts "bye!" } #=> "hello!"
    1. grammar Parser { rule TOP { I <love> <lang> } token love { '♥' | love } token lang { < Raku Perl Rust Go Python Ruby > } } say Parser.parse: 'I ♥ Raku'; # OUTPUT: 「I ♥ Raku」 love => 「♥」 lang => 「Raku」 say Parser.parse: 'I love Perl'; # OUTPUT: 「I love Perl」 love => 「love」 lang => 「Perl」
    1. It's really not always a better user experience to keep things in one browser... What if they are in a sign-up or check-out flow in your SPA, and at the last step they need to agree to some conditions in an external page? Unless you use a modal, opening in a new window would really be preferable to the user completely losing context and having to go through the whole process again.
    1. def initialize_copy(original_animal) self.age = 0 super end def initialize_dup(original_animal) self.dna = generate_dna self.name = "A new name" super end def initialize_clone(original_animal) self.name = "#{original_animal.name} 2" super end
    2. Are There Other Methods to Copy Something?
    3. An interesting fact here is that Rails deliberately chose to override the #initialize_dup method instead of the #initialize_copy method. Why would it do that? Let's investigate.
    1. I expect RuboCop to either make no suggestion on how to resolve the ambiguity, or to suggest something that does not change the semantics of the code as it stands.
    2. However, the code as it stands associates the block with bar, and if the code is currently working, the programmer should definitely not parenthesize the parameter, because it would change the meaning of the code.
    1. But this sounds like spreading fear and doubt when the Ruby parser has no such concepts :) {} always binds tightly to the call right next to it. This block {} will never go to using, unless it's rewritten as do ... end.
  3. Sep 2022
    1. First, to clarify - what is "code", what is "data"? In this article, when I say "code", I mean something a human has written, that will be read by a machine (another program or hardware). When I say "data", I mean something a machine has written, that may be read by a machine, a human, or both. Therefore, a configuration file where you set logging.level = DEBUG is code, while virtual machine instructions emitted by a compiler are data. Of course, code is data, but I think this over-simplified view (humans write code, machines write data) will serve us best for now...
    1. Why not use map, which we already have for collections? Generally speaking, the map function isn't just about collections (though that's usually how it's used in Ruby). map is more about putting an object in a context (a block in Ruby's case), modifying the object, and returning the modified object.
    1. I don't know about you guys but I like dots on the second line when combined with indentation : # Example 1 one.two.three .four # Example 2 my_array.select { |str| str.size > 5 } .map { |str| str.downcase }
    1. The server possibly can send back a 406 (Not Acceptable) error code when unable to serve content in a matching language. However, such a behavior is rarely implemented for a better user experience, and servers often ignore the Accept-Language header in such cases.
    1. Such schemas cannot easily be refactored without removing the benefits of sharing. Refactoring would require forking a local copy, which for schemas intended to be treated as an opaque validation interface with internal details that may change, eliminates the benefit of referencing a separately maintained schema in the first place.
    1. JSON Schema allows for additionalProperties both a boolean or an object value. true is interpreted as "additional properties follow no restrictions", false means "no additional restrictions", and an object is interpreted as a JSON schema applied to the property values (the empty object is thus equivalent to true).
    1. But others, including Garner, believe, I think rightly, that while it can be ok to omit the hyphen in compound-noun adjectives, the better practice is to include the hyphen to ensure no confusion (especially since including the hyphen never triggers a miscue).
  4. Aug 2022
    1. I recommend using the term “parallel” when the simultaneous execution is assured or expected, and to use the term “concurrent” when it is uncertain or irrelevant if simultaneous execution will be employed.
    2. Concurrency is about dealing with lots of things at once. Parallelism is about doing lots of things at once.
    3. Concurrency means that an application is making progress on more than one task at the same time (concurrently)
    1. Each commit should meet the following criteria: Have a well-written commit message. Has all tests passing when used on its own (e.g. when using git checkout SHA). Can be reverted on its own without also requiring the revert of commit that came before it. Is small enough that it can be reviewed in isolation in under 30 minutes or so.
    1. I feel very happy about them indeed because they take me to the destinations they promise (they're all nouns). Login doesn't take me to my login, which makes me sad. It does take me to a place where I can log in, however.
    1. "you can verb any noun". :) Though, comparing "ssh into a workstation" to "login to host.com", where "log in" exists, it's a bit like saying "entrance the building" when "enter the building" already works
    1. OAuth, or Open Authorization is a protocol for users to authorize websites to access their information without handing over a password.
    1. Following. I haven’t found anything in years. I’m planning on building my own scraper for my bank this winter if I can’t find anything by then
    1. Since facts and narratives live in different universes, we should avoid mixing them carelessly. Crossing the boundary between the two universes should always be explicit. A narrative should not include copies of pieces of facts, but references to locations in a fact universe. And facts should not refer to narratives at all.
    1. I thought something like git rev-parse --abbrev-ref origin/HEAD would work, but that just seems to show what the default branch was of the repo it was cloned from, at the time of cloning, provided that the remote we cloned from was named origin.

      good enough for my purposes (local git scripts/aliases)!

      ⟫ cat .git/refs/remotes/origin/HEAD ref: refs/remotes/origin/main

    2. When we have our git rev-parse examine our Git repository to view our origin/HEAD, what we see is whatever we have stored in this origin/HEAD. That need not match what is in their HEAD at this time. It might match! It might not.
    3. 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

  5. Jul 2022
    1. Patrician IV is an overhauling upgrade to Patrician III; so if you have not played the previous games in the Patrician series, starting with IV is really all you need. Also, the game of Patrician is very straightforward and addicting, so playing previous versions won't offer you anything unseen in Patrician IV.
    1. Let us briefly discuss three specific examples of concepts that seem particularly promising for theprospect of ‘good enough world’ and could become synergistically interrelated: (a) the social policy ofunconditional basic income, (b) the development of blockchains and (c) the idea of the offer networks

      !- claim : examples of a good enough world * Universal Basic Income (UBI) * Blockchain * Offer network

    2. A Good Enough World

      !- question : good enough world * This term seems a bit counter-intuitive as a "good enough world" is actually advocated as one of the better solutions for the future of our civilization.

    3. the Internet can potentially becomea backbone to a ‘global commons,’ an immense free space of information, products and services towhich everyone can contribute to and from which everyone can profit [51, 52 ].

      !- for : Indyweb * A "good enough" world is contingent on a global virtual commons * Indyweb can play a major role

    4. The human takeover needs to be nonviolent and genuinely creative. It can augment the entirehuman social system not by resolving the gridlock of all the colliding identities and trajectoriesmentioned in Section 2 but by adding a lifeline for humans to hold on to whenever they considermaking a decision that challenges and disrupts; whenever they allow a new thought to take shape;whenever they genuinely feel the genuine need to say ‘no,’ or ‘yes,’ but today must say otherwise.

      !- properties : human takeover * nonviolent communications * genuinely creative * provide a lifeline when choices true to one's heart emerge so that it can be supported and not fall by the weighside * must secure a "good enough" relationship between human and the social system

    5. The ‘ideal’ is nothing other thana representation of social conditioning and the installation of a personware module into the newbornhuman that tries to accord what is with what the social system projects. We acknowledge of course thatsome mediation is always needed. The baby sees the world and the social world in particular throughthe eyes of the parent and only afterwards autonomously. This mediation is crucial to the cognitivedevelopment of the person and cannot happen without a personware. But the personware can beconstructed such that it empowers the individual and does not subjugate it to the social demands.

      !- definition : good enough * From Donald Winnicot, a parent who is "good enough" is actually healthier for the child than the standard "ideal" parent. * A "good enough" parent does not force the child to choose between two aspects of wellbeing, both of which are necessary.

    1. This polemic identifies CS as the culprit. That seems empirically wrong. As stated, it's "not a prerequisite for most programming" even in theory, and in practice, there are mountains of GitHub programmers, at least, who don't have CS backgrounds. Non-CS folks probably account for most of the "frontend"/"full stack" development today. This has exacerbated the Tower of Babel, not improved it.

      HCI is CS—and that's what we should focus on. There's a fair bit of emphasis on engineering due, too. To be able to look at a problem and ask, "What should it take?" and ocnversely, "What isn't required here (contra cultural imperatives)?"

    1. Here’s a quick blog post about a specific thing (making FactoryBot.lint more verbose) but actually, secretly, about a more general thing (taking advantage of Ruby’s flexibility to bend the universe to your will). Let’s start with the specific thing and then come back around to the general thing.
    1. A more conservative workaround is find the gems that are causing issues and list them on the top of your Gemfile.

      good solution ... except that it didn't help/work

    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. now we talk i talk about a few ideas good regulators requisite variety self-organized criticality and then the 01:35:04 free energy principle from active inference um and uh maybe i'll just try to briefly talk mention what's what those means for what those ideas mean for people who 01:35:15 aren't familiar so good regulator really came from the good regular theorem or whatever it's called really came from cybernetics ash ashby yeah a lot his law of requisite 01:35:33 variety and uh the it's the concept is that a organism or a you know a system must be must be a model of that which it but 01:35:47 that needs to control

      These are technical terms employed in this model: * Good regulators * Requisite variety * Self-organized criticality * Free energy principle

  6. Jun 2022
    1. Embracing visions of a good life that go beyond those entailing high levels of material consumption is central to many pathways. Key drivers of the overexploitation of nature are the currently popular vision that a good life involves happiness generated through material consumption [leverage point 2] and the widely accepted notion that economic growth is the most important goal of society, with success based largely on income and demonstrated purchasing power (Brand & Wissen, 2012). However, as communities around the world show, a good quality of life can be achieved with significantly lower environmental impacts than is normal for many affluent social strata (Jackson, 2011; Røpke, 1999). Alternative relational conceptions of a good life with a lower material impact (i.e. those focusing on the quality and characteristics of human relationships, and harmonious relationships with non-human nature) might be promoted and sustained by political settings that provide the personal, material and social (interpersonal) conditions for a good life (such as infrastructure, access to health or anti-discrimination policies), while leaving to individuals the choice about their actual way of living (Jackson, 2011; Nussbaum, 2001, 2003). In particular, status or social recognition need not require high levels of consumption, even though in some societies, status is currently related to consumption (Røpke, 1999).

      A redefinition of a good life that decouples it from materialism is critical to lowering carbon emissions. Practices such as open source Deep Humanity praxis focusing on inner transformation can play a significant role.

    2. In this respect, relational notions of a good quality of life, such as ‘buen vivir’ from Latin America (D'Alisa, Demaria, & Kallis, 2014; Gudynas, 2011; Hopkins, 2008), may be key to achieving long-term sustainable outcomes

      relational notions of a good life buen vivir from Latin America

    1. The dominant idea is one of attention, by which a representation at a position is computed as a weighted combination of representations from other positions. A common self-supervision objective in a transformer model is to mask out occasional words in a text. The model works out what word used to be there. It does this by calculating from each word position (including mask positions) vectors that represent a query, key, and value at that position. The query at a position is compared with the value at every position to calculate how much attention to pay to each position; based on this, a weighted average of the values at all positions is calculated. This operation is repeated many times at each level of the transformer neural net, and the resulting value is further manipulated through a fully connected neural net layer and through use of normalization layers and residual connections to produce a new vector for each word. This whole process is repeated many times, giving extra layers of depth to the transformer neural net. At the end, the representation above a mask position should capture the word that was there in the original text: for instance, committee as illustrated in Figure 1.
    1. Kahler et al. (2011)and Kahler (2010) found that wild rice populations in lakes and rivers at the landscape scale tend to behighly distinct from one another and that the St. Louis River estuary may have its own “genetic identity”(Kern and Kahler 2014).

      Highly distinct populations with own genetic identity. Check out these papers for in depth info on Manomin genetic diversity - Kahler et al 2011, Kahler 2010, Kern and Kahler 2014

    1. Logically, if you just want a distinct list of event_id values, what order they occur in should be irrelevant. If order does matter, then you should add the start_time to the SELECT list so that there is context for the order.
    2. The ORDER BY clause can only be applied after the DISTINCT has been applied. Since only the fields in the SELECT statement are taken into consideration for the DISTINCT operations, those are the only fields may be used in the ORDER BY.
  7. May 2022
    1. 1/ It fits into existing spec based testing infrastructure nicely, including running on travis, code coverage using SimpleCov, switching between generating a profile (RubyProf), a benchmark (Benchmark::IPS) or normal test run. 2/ Some of my benchmarks do have expect clauses to validate that things are working before invoking the benchmark.

      Answering the question:

      I don't understand the point of putting it in a spec. What does that gain you over using benchmark-ips the normal way?

    1. Giants that prefer the hyphenated spelling—Merriam-Webster, The Chicago Manual of Style, and The New Yorker, have a good reason for doing so. E-mail is a compound noun, made out of two words—“electronic” and “mail.” The e in e-mail is an abbreviation for “electronic,” and it’s used in a lot of other words as well—e-commerce, e-learning, and e-business, for example. There are also other compound nouns formed from an abbreviation and a noun, like the H-bomb, which is short for hydrogen bomb. The general rule of hyphenation in compound words that combine a single letter (or a number) and a word is to hyphenate them. So, based on tradition, e-mail is the correct way to do it.
    1. When chatting with my father about the proton research he summed it up nicely, that two possible responses to hearing that how we measure something seems to change its nature, throwing the reliability of empirical testing into question, are: “Science has been disproved!” or “Great!  Another thing to figure out using the Scientific Method!” The latter reaction is everyday to those who are versed in and comfortable with the fact that science is not a set of doctrines but a process of discovery, hypothesis, disproof and replacement.  Yet the former reaction, “X is wrong therefore the system which yielded X is wrong!” is, in fact, the historical norm.
  8. Apr 2022
    1. It's always a good idea to avoid things like 'both', since it's not future-proof — if we decided we wanted to support method overrides via headers, for example (which is sometimes used to get around firewalls that disallow non-GET/POST requests), then 'both' would need to become 'all', which would be a breaking change.
    1. The backslash character does not concatenate any strings. It prevents the line-break from meaning that those two lines are different statements. Think of the backslash as the opposite of the semicolon. The semicolon lets two statements occupy one line; the backslash lets one statement occupy two lines.
    2. Think of the backslash as the opposite of the semicolon. The semicolon lets two statements occupy one line; the backslash lets one statement occupy two lines.
    1. Convolution Demo. Below is a running demo of a CONV layer. Since 3D volumes are hard to visualize, all the volumes (the input volume (in blue), the weight volumes (in red), the output volume (in green)) are visualized with each depth slice stacked in rows. The input volume is of size W1=5,H1=5,D1=3W1=5,H1=5,D1=3W_1 = 5, H_1 = 5, D_1 = 3, and the CONV layer parameters are K=2,F=3,S=2,P=1K=2,F=3,S=2,P=1K = 2, F = 3, S = 2, P = 1. That is, we have two filters of size 3×33×33 \times 3, and they are applied with a stride of 2. Therefore, the output volume size has spatial size (5 - 3 + 2)/2 + 1 = 3. Moreover, notice that a padding of P=1P=1P = 1 is applied to the input volume, making the outer border of the input volume zero. The visualization below iterates over the output activations (green), and shows that each element is computed by elementwise multiplying the highlighted input (blue) with the filter (red), summing it up, and then offsetting the result by the bias.

      Best explanation/inllustration of a convolution layer.and the ways the number relate.

    1. Think the mere existence of a file is effectively like writing a require call for them, which is executed on demand (autoload) or upfront (eager load).
    1. Will be executed right after outermost transaction have been successfully committed and data become available to other DBMS clients.

      Very good, pithy summary. Worth 100 words.

      The first half was good enough. But the addition of "and data become available to other DBMS clients" makes it real-world and makes it clear why it (the first part) even matters.

    1. SELECT lateral_subquery.* FROM posts JOIN LATERAL ( SELECT comments.* FROM comments WHERE (comments.post_id = posts.id) LIMIT 3 ) lateral_subquery ON true WHERE posts.id
    1. infer is there to say you know you are declaring a new type (in the conditional type's scope) - much like you have to write var, let or const to tell the compiler you know you're declaring a new variable.
    1. Let's say the user is in the process of selecting some files. The names don't indicate anything. So she has to listen and select.
    1. Starting from random noise, we optimize an image to activate a particular neuron (layer mixed4a, unit 11).

      And then we use that image as a kind of variable name to refer to the neuron in a way that more helpful than the the layer number and neuron index within the layer. This explanation is via one of Chris Olah's YouTube videos (https://www.youtube.com/watch?v=gXsKyZ_Y_i8)

  9. Mar 2022
    1. # Allows you to just run "pry" inside a Rails app directory and get # everything loaded as rails c does. Inside a Bundler directory does # what bundle console does.
    1. his serves as a good example of apt-gets stability. In apt, the name was changed to be more user friendly, while in apt-get the name remains unchanged so as not to break compatibility with old scripts.
    1. No need to construct strings that then need to be deconstructed later.
    2. In any significant project I worked in the last 15 years, logging text messages resulted in a large amount of strings which was hard to make sense of, thus mostly ignored.

      hard to make sense of, thus mostly ignored

    1. Grids like these are user-hostile—a clear choice to prioritize aesthetics over experience. In order to see what any given app does, I have to either:

      1. Figure it out by the name alone
      2. Click each one to fetch the relevant info (and wait for it to load)
      3. Mouse over each item to read the title text
  10. Feb 2022
    1. Is the name "delegated type" up for review? I don't see any delegation happening in the code. It looks more like a "subtype", or "secondary type", or something like that.
  11. inst-fs-iad-prod.inscloudgate.net inst-fs-iad-prod.inscloudgate.net
    1. umbaba said, 'Enkidu, what you have spoken is evil: you, a hireling, dependent for your bread! In envy and for fear of a rival you have spoken evil words.' Enkidu said, ‘Do not listen, Gilgamesh: this Humbaba must die. Kill Humbaba first and his servants after

      Humbaba reminds me a lot of Goliath, and since he tried to trick Enkidu, maybe cunning like the devil.

    2. he heavens roared and the earth roared again, daylight failed and darkness fell, lightnings flashed, fire blazed out, the clouds lowered, they rained down death. Then the brightness departed, the fire went out, and all was turned to ashes fallen about us. Let us go down from the mountain and talk this over, and consider what we should do

      I thought this might be an early representation of the devil or evil, with horns and fire. Although it could have contributed to later representations of the devil or hell, it might have just showed how great a deed the two did in killing Humbaba. The scale of what they did might have made an impact in how greatly they were seen though in the descriptions of Uruk at the beginning of the story, so maybe it starts to show the impact of one or two people, like some kind of savior?

  12. Jan 2022
    1. export const fibonacci = function (n, initialData) { return readable( { loading: true, error: null, data: initialData, }, (set) => { let controller = new AbortController(); (async () => { try { let result = await fibonacciWorker.calculate(n, { signal: controller.signal }); set({ loading: false, error: null, data: result, }); } catch (err) { // Ignore AbortErrors, they're not unexpected but a feature. // In case of abortion we just keep the loading state because another request is on its way anyway. if (err.name !== 'AbortError') { set({ loading: false, error: err, data: initialData, }); } } })(); return () => { controller.abort(); }; } ); };
    1. Maybe once the core onError lifecycle is implemented (if maintainers decide to go that way) everyone will discover you're right and an implementation will be built in. I think that's probably what's going to happen. But until real life has proved it, it's usually best to go for the smallest most broadly applicable solution. I can definitely imagine <svelte:error> eventually being a thing, but it's a pretty dramatic change compared to an added importable function.
    2. I think the issue is that it's not totally perfect. It doesn't define what should happen in parent components, it's not as flexible as onError and it doesn't allow you (for instance) to nest a svelte:head inside, or decide what to do with the rest of the rendering. What do you do with <div>My component</div> in your example? What about changing the <title>? I assume you can inspect the error...does <svelte:error> allow specifying which error types to expect?
    3. Boilerplate is only boilerplate if it's the same everywhere, which it shouldn't be.
    4. Additionally, if you're writing a notification display in every single component, wrapped in a <svelte:error> tag, that's the very definition of boilerplate.

      In other words, adding a svelte:error tag wouldn't help much.

    1. The most obvious time you'd encounter a 401 error, on the other hand, is when you have not logged in at all, or have provided the incorrect password.
    2. As mentioned in the previous article, the 403 error can result when a user has logged in but they don't have sufficient privileges to access the requested resource. For example, a generic user may be attempting to load an 'admin' route.
    1. Meaning if you have your own roll-your-own login process and never use HTTP Authentication, 403 is always the proper response and 401 should never be used.
    2. While this seems to me like it's probably an accurate interpretation of the old RFC 2616, note that RFC 7231 defines the semantics of a 403 differently, and in fact explicitly states that "The client MAY repeat the request with new or different credentials."
    3. it depends on the application but generally, if an authenticated user doesn't have sufficient rights on a resource, you might want to provide a way to change credentials or send a 401.

      A 403 doesn't tell the client / user agent what the next step is or provide a way to change credentials.

      So maybe a 302 redirect is the best answer after all? Even though it sadly lacks the nice semantic distinction that 401/403 provide...

    4. FORBIDDEN: Status code (403) indicating the server understood the request but refused to fulfill it. User/agent known by the server but has insufficient credentials. Repeating request will not work, unless credentials changed, which is very unlikely in a short time span.
    5. This may be because it is known that no level of authentication is sufficient (for instance because of an IP blacklist), but it may be because the user is already authenticated and does not have authority.
    1. The intended behavior for the code snippet above is to reactively update b when a changes allows b temporarily go "out-of-sync" of a when calling update, setting b to 42 in this case, b is not always a * 2 however, if a changes again, b will be updated back to a * 2, instead of staying at 42
    1. When you give an element a width of 100% in CSS, you’re basically saying “Make this element’s content area exactly equal to the explicit width of its parent — but only if its parent has an explicit width.” So, if you have a parent container that’s 400px wide, a child element given a width of 100% will also be 400px wide, and will still be subject to margins, paddings, and borders — on top of the 100% width setting.
    1. For example, given a website's normal communication method is the internet, out-of-band communication may be by a voice call.
    1. A good riddance from the ultra realistic modern 2021 games . Or maybe its my personal opinion that most games towards the better side should be like 16-bit only. It certainly took me back to the era of Nintendo when I frankly used to enjoy gaming the most. The look and feel of Tobe's quite resonates with good old konami games, Contra, adventure island, Super Mario, Circus Charlie, Dangerous Dave.
    1. It seems like it could be a good game but its really poorly executed,
    2. Unique concept that could have end up as a great game, but sadly got destroyed by lack of polish .
  13. Dec 2021
    1. The transformer model introduces the idea of instead of adding another complex mechanism (attention) to an already complex Seq2Seq model; we can simplify the solution by forgetting about everything else and just focusing on attention.
    1. Just FYI, there is a nice way to "expect a change" in RSpec. You don't have to use it, what you have is fine, just thought I'd share. expect { widget.paper_trail.update_columns(name: "Bugle") }.to(change { widget.versions.length }).from(1).to(2)
    1. For what it's worth, accessing attributes with [] is not the same as using send. The latter will call the accessor method, which is what you want 99/100.
  14. Nov 2021
    1. When the embedded document has the same origin as the embedding page, it is strongly discouraged to use both allow-scripts and allow-same-origin, as that lets the embedded document remove the sandbox attribute — making it no more secure than not using the sandbox attribute at all.
    1. The selective-second-order-with-skips model is a useful way to think about what transformers do, at least in the decoder side. It captures, to a first approximation, what generative language models like OpenAI's GPT-3 are doing.
    1. An exit determined by how much public good has been created by the project rather than quarterly profit.

      Yes! We could actually rehabilitate the concept of a corporation as a living body if compensation for public good was the foundation for economic currency.

    1. The following figure presents a simple functional diagram of the neural network we will use throughout the article. The neural network is a sequence of linear (both convolutional A convolution calculates weighted sums of regions in the input. In neural networks, the learnable weights in convolutional layers are referred to as the kernel. For example Image credit to https://towardsdatascience.com/gentle-dive-into-math-behind-convolutional-neural-networks-79a07dd44cf9. See also Convolution arithmetic. and fully-connected A fully-connected layer computes output neurons as weighted sum of input neurons. In matrix form, it is a matrix that linearly transforms the input vector into the output vector. ), max-pooling, and ReLU First introduced by Nair and Hinton, ReLU calculates f(x)=max(0,x)f(x)=max(0,x)f(x)=max(0,x) for each entry in a vector input. Graphically, it is a hinge at the origin: Image credit to https://pytorch.org/docs/stable/nn.html#relu layers, culminating in a softmax Softmax function calculates S(yi)=eyiΣj=1NeyjS(y_i)=\frac{e^{y_i}}{\Sigma_{j=1}^{N} e^{y_j}}S(yi​)=Σj=1N​eyj​eyi​​ for each entry (yiy_iyi​) in a vector input (yyy). For example, Image credit to https://ljvmiranda921.github.io/notebook/2017/08/13/softmax-and-the-negative-log-likelihood/ layer.

      This is a great visualization of MNIST hidden layers.

    1. The Query word can be interpreted as the word for which we are calculating Attention. The Key and Value word is the word to which we are paying attention ie. how relevant is that word to the Query word.

      Finally

    1. Finally, I think Actions are great for animations, because you will definitely need to apply the same logic to many different elements. One of my favorite examples are FLIP animations, where a change in DOM position can be animated. For example shuffling a list of items. I will not dive deep into the topic in this article: I've written about some techniques in this article about FLIP animations in React and in this article about how to create spring animations with Web Animation API. Although they are not about Svelte, at the end of the day it all boils down to manipulating the HTML element directly. And Svelte Actions are a great place to do it.
    1. For example, if we had a room of tall people wearing hats, and another room of Spanish speakers wearing hats, after combining those rooms, the only thing we know about every person is that they must be wearing a hat.
    1. an international questionnaire designed to capture teachers’ general teaching characteristics and experience, self-efficacy teaching online, fostering online presence and institutional support transitioning to online teaching as a result of Covid-19
      1. Намерени решения на проблеми и добри практики в областта на електронното обучение в условия на пандемия
    1. So it actually replaces the file, not update? If that file is hard-linked, the the other link is unaffected?
    1. To review, the Forget gate decides what is relevant to keep from prior steps. The input gate decides what information is relevant to add from the current step. The output gate determines what the next hidden state should be.Code DemoFor those of you who understand better through seeing the code, here is an example using python pseudo code.
    1. considering people rarely make meta posts about how great their question was received, it's pretty expected that it'd be net negative.
    1. why is Session not assignable to WithAdditionalParams<Session>? Well, the type WithAdditionalParams<Session> is a subtype of Session with includes a string index signature whose properties are of type unknown. (This is what Record<string, unknown> means.) Since Session does not have an index signature, the compiler does not consider WithAdditionalParams<Session> assignable to Session.
  15. Oct 2021
    1. const str = 'mañana mañana' const strReverse = str.split('').reverse().join('') // => "anãnam anañam" // notice how the first word has an ã rather ñ
    1. Desktop files are NOT executed. The line inside them that has an executable command line is the one that gets executed. The rest of the file is parsed by the Desktop Environment.
    1. const fetchWithJSONHeaders = applyDefaults(fetch, { headers: { "Content-Type": "application/json" } }); const fetchWithTextHeaders = applyDefaults(fetch, { headers: { "Content-Type": "application/text" } }); // Fetch JSON content const response = await fetchWithJSONHeaders("/users", { method: "GET" });
    1. This function allows you to modify (or replace) a fetch request for an external resource that happens inside a load function that runs on the server (or during pre-rendering). For example, your load function might make a request to a public URL like https://api.yourapp.com when the user performs a client-side navigation to the respective page, but during SSR it might make sense to hit the API directly (bypassing whatever proxies and load balancers sit between it and the public internet).
    1. Today, countries, municipalities and NGOs are the entities that supposedly take care of common goods, but their capacity to do so is very limited due to their centralized structure. They are limited by the relative ineffectiveness of centralized constructs — in sense-making, scalable action, engagement and alignment of interests, and more severely, by the personal interests of the people steering them, which often override their interest to take care for the benefit of the community they are in charge of steering. Indeed, neglecting such common goods is one of the biggest problems of humanity in almost every possible domain and circle we can think of.

      Pith articulation of the central problem of central, hierarchical human governance systems.

    1. For example, there is no point in defining reloadable Rack middleware, because changes would not be reflected in the instance stored in the middleware stack anyway
  16. Sep 2021
    1. My question is, wye is a sanitary tee directional? I maintain that a two way sweep would be a more efficient vent.
    1. Does this daemon benefit me in anyway or is it only used for mismatched resolutions like 1440p with a 1080p display?
    1. If your configuration is not provided by a name server (like the information given in /etc/hosts) those tools will not show them, because they directly ask the name server.
    1. Question: Why a cable for a wireless keyboard? Answer: .noScriptDisplayLongText { display : none; } <style> .noScriptNotDisplayExpander { display : none; } .noScriptDisplayLongText { display : block; } </style> because it is not a wireless keyboard...
    1. These thing can save you literally thousands of dollars associated with repair of water damage. I have installed one under every sink, dishwasher, behind every toilet, washing machine and refrigerator (ice maker water supply). Essentially, any place where there is a water supply to a faucet or appliance.
    1. When we describe a language as type-checked, we mean that the language won't let you perform operations invalid for the type. Neither statically nor dynamically typed languages will let you multiply strings together, call a number in the place of a function, etc. A language without type checking would let you do all of those things without complaint.
    1. Conversely, the more dynamically typed the language is, the less I am using an IDE and the more I am using a text editor. Of course, my productivity plummets at that point. Refactoring becomes more difficult and more (completely) reliant on unit tests to ensure they are done properly.
    1. TypeScript is an extension of JavaScript. You can think of it as JavaScript with a few extra features. These features are largely focused on defining the type and shape of JavaScript objects. It requires that you be declarative about the code you're writing and have an understanding of the values your functions, variables, and objects are expecting.While it requires more code, TypeScript is a fantastic means of catching common JavaScript bugs while in development. And for just that reason, it's worth the extra characters.
    1. It is advised to inline any css @import in component's style tag before it hits css-loader. This ensures equal css behavior when using HMR with emitCss: false and production.
    2. Webpack's resolve.mainFields option determines which fields in package.json are used to resolve identifiers. If you're using Svelte components installed from npm, you should specify this option so that your app can use the original component source code, rather than consuming the already-compiled version (which is less efficient).
    1. I feel like app/packs (or something like it) is a good name because it communicates to developers that it's not just JavaScript that can be bundled, it's also CSS, images, SVGs — you name it. I realize what can be bundled is wholly dependent on the bundler you use, but even esbuild supports bundling CSS. So couldn't this possibly be confusing?
    1. Some would argue that the phrase ''survival of the fittest'' is tautological, in that the fittest are defined as those that survive to reproduce.
    1. have a philosophy that if someone can provide any more meaningful information to a problem even if it indirectly solves the problem, I think that should also be rewarded.
    2. The important thing to understand is that there is no such thing as a class method in Ruby. A class method is really just a singleton method. There is nothing special about class methods. Every object can have singleton methods. We just call them "class methods" when the object is a Class because "singleton method of an instance of Class" is too long and unwieldy.
  17. Aug 2021
    1. So for each word, we create a Query vector, a Key vector, and a Value vector. These vectors are created by multiplying the embedding by three matrices that we trained during the training process.
    1. I always had to set the height of them literally almost 50% taller than the content itself to accommodate for the innards growing when the form was submitted with errors (the error messaging expanded the height). If I didn’t, the submit button would get cut off making the form un-submittable.
    1. An essay is good if it has sprung from necessity

      If someone has a personal need to write about something then their passion for the topic will hopefully shine through and make it a great essay. Saying "an essay is good if it has sprung from necessity".. is just not true in my opinion. I might need to write about pollen in Australia for a class. If i am not passionate about pollen my essay probably won't be that great.

    1. The TypeScript team has made it clear. They do not follow semver. "minor" (X.X) releases can contain breaking changes. . The fact that someone has made a bad policy clear, does not mean that the policy is therefore good. Major releases (X) have very little meaning. This negates the usefulness of using such versioning in the first place.
    2. If you dig into the details, you will see that the TypeScript team take breaking changes very seriously and with consideration.
    3. I think the TS team generally tries to minimize breaking changes from version to version and don't do so unless there is a good reason.
    1. which seems to resolve the issue for me and makes no casts, ensuring that Typescript can keep doing its good job of widening as much as necessary and narrowing as much as possible without me having to claim I know better than the compiler. I'm posting it here since it doesn't seem to have been mentioned anywhere.

      makes no casts, ensuring that Typescript can keep doing its good job of widening as much as necessary and narrowing as much as possible without me having to claim I know better than the compiler.

    1. * Now it's correct within the laws of the type system, but makes zero practical sense, * because there exists no runtime representation of the type `Date & string`. * * The type system doesn't care whether a type can be represented in runtime though.

      new tag?: makes zero practical sense

      makes zero practical sense because there exists no runtime representation of the type

    2. What I don't understand is why you need to make it explicit? Given: function isBarAlsoFoo(obj: Bar): obj is Foo; Without resorting to any, how can we get any code to typecheck in which you pass an object that's not a Bar to isBarAlsoFoo()?